Indicators Used
Miscellaneous
0
Views
0
Downloads
0
Favorites
MTF_MA
//+------------------------------------------------------------------+
//| MTF_MA.mq4 |
//| omelette |
//| omelette@oceanfree.net |
//+------------------------------------------------------------------+
#property copyright "omelette"
#property link "omelette@oceanfree.net"
#property indicator_chart_window
extern int MA_Type = 0;
extern int MA_Price = 0;
extern int MA_TF = 60;
extern int MA_Period = 10;
double MA_buff[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,3,Yellow);
SetIndexBuffer(0,MA_buff);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//----
int i = Bars - counted_bars + 1;
while (i >= 0)
{
MA_buff[i] = iMA(NULL,MA_TF,MA_Period,0,MA_Type,MA_Price,i);
i--;
}
//----
return(0);
}
//+------------------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---