Indicators Used
0
Views
0
Downloads
0
Favorites
SimpleRSI&_MA
//+------------------------------------------------------------------+
//| SimpleRSI&MA.mq4 |
//| Copyright(c) 2010 Masaru Sasaki |
//| |
//+------------------------------------------------------------------+
//
// uÆÓv
// *±ÌvOÉîÃs×Ìʶµ½áQA¹¸ÈÇÉ¢Ä
// ìÒÍêØÌÓCð¢Ü¹ñB
//
// uà¾v
// *RSIlÆRSIlðÚ®½Ïµ½lð\¦µÜ·B
// úÔÌWÝèÍA14ÆÈÁĨèÜ·B
// ñÂÌüÌNXª»fÆÈÁĢܷB
// AÚ®½ÏüÌíÞÍSMAA¿iÍIlÅ·B
// vO~OÌûKpÉ쬵½×Asõª éÆv¢Ü·ÌÅA
// gp·éêÍÝè²Óº³¢B
//
// QlÐFFX^g[_[üå PanRolling
//
#property copyright "Copyright(c) 2010 Masaru Sasaki"
#property link "http://www.metaquotes.net"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Cyan
#property indicator_minimum 0
#property indicator_maximum 100
#property indicator_level1 30
#property indicator_level2 70
// wWobt@
double RSI_Buf[];
double RSI_MA_Buf[];
// úÔ
extern int RSI_period = 14;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
// wWobt@폀
SetIndexBuffer(0, RSI_Buf);
SetIndexBuffer(1, RSI_MA_Buf);
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int i;
int limit = Bars - IndicatorCounted();
if( counted_bars == 0 ) limit = limit - RSI_period - 1;
// RSIlÌvZ
for( i = limit-1; i >= 0; i-- ){
RSI_Buf[i] = iRSI(NULL, 0, RSI_period,PRICE_CLOSE, i);
}
if( counted_bars == 0 ) limit = limit - RSI_period - 1;
// RSIÚ®½ÏlÌvZ
for( i = limit-1; i >= 0; i-- ){
RSI_MA_Buf[i] = iMAOnArray(RSI_Buf, 0, RSI_period, 0, MODE_SMA, 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
---