Indicators Used
Miscellaneous
0
Views
0
Downloads
0
Favorites
go_v2
//+------------------------------------------------------------------+
//| go.mq4 |
//| Copyright © 2006, Victor Chebotariov |
//| http://www.chebotariov.com/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Victor Chebotariov"
#property link "http://www.chebotariov.com/"
extern int period = 174;
extern int ma_shift = 0;
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 LightSeaGreen
//---- buffers
double ExtMapBuffer1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorShortName("GO");
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Go |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
//----
i=Bars-counted_bars-1;
while(i>=0)
{
ExtMapBuffer1[i]=(iMA(NULL,0,period,ma_shift,MODE_SMA,PRICE_CLOSE,i)-iMA(NULL,0,period,ma_shift,MODE_SMA,PRICE_OPEN,i))/Point;
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
---