Indicators Used
Miscellaneous
0
Views
0
Downloads
0
Favorites
GBPUSD_sample
//+------------------------------------------------------------------+
//| GBPUSD.mq4 |
//| Copyright © 2005-2006, tWiMC Computers |
//| mchistyakov@wwf.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005-2006, Ìèõàèë ×èñòÿêîâ"
#property link "mchistyakov@wwf.ru"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_level1 50
#property indicator_levelcolor Olive
#property indicator_levelwidth 1
extern int RSI=21;
double ind_buffer1[];
double ind_buffer2[];
int init()
{
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1);
SetIndexDrawBegin(0,0);
SetIndexDrawBegin(1,0);
IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+4);
if(!SetIndexBuffer(0,ind_buffer1) && !SetIndexBuffer(1,ind_buffer2))
Print("cannot set indicator buffers!");
IndicatorShortName("GBPUSD");
SetIndexLabel(0,"GBP");
SetIndexLabel(1,"USD");
return(0);
}
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i<limit; i++)
ind_buffer1[i]=iRSI("GBPJPY",0,RSI,PRICE_TYPICAL,i);
for(int j=0; j<limit; j++)
ind_buffer2[j]=iRSI("USDJPY",0,RSI,PRICE_TYPICAL,j);
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
---