Miscellaneous
0
Views
0
Downloads
0
Favorites
Multi_RSI_AM_
//+------------------------------------------------------------------+
//| Multi_RSI(AM).mq4 |
//| Andrey Matvievskiy |
//| |
//+------------------------------------------------------------------+
#property copyright "Andrey Matvievskiy"
#property link ""
#property indicator_separate_window
#property indicator_buffers 8
#property indicator_color1 Red
#property indicator_color2 Orange
#property indicator_color3 Gold
#property indicator_color4 Lime
#property indicator_color5 Aqua
#property indicator_color6 DodgerBlue
#property indicator_color7 MediumPurple
#property indicator_color8 Silver
#property indicator_minimum 0
#property indicator_maximum 100
#property indicator_level1 50
#property indicator_levelcolor LightSlateGray
//---- input parameters
extern int RSI_Period1 = 5;
extern int RSI_Period2 = 7;
extern int RSI_Period3 = 9;
extern int RSI_Period4 = 11;
extern int RSI_Period5 = 14;
extern int RSI_Period6 = 17;
extern int RSI_Period7 = 20;
extern int RSI_Period8 = 23;
extern int Price = 0; // Low/High 0, Close/Close 1
double Buffer1[] ;
double Buffer2[] ;
double Buffer3[] ;
double Buffer4[] ;
double Buffer5[] ;
double Buffer6[] ;
double Buffer7[] ;
double Buffer8[] ;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0, Buffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1, Buffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2, Buffer3);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3, Buffer4);
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4, Buffer5);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5, Buffer6);
SetIndexStyle(6,DRAW_LINE);
SetIndexBuffer(6, Buffer7);
SetIndexStyle(7,DRAW_LINE);
SetIndexBuffer(7, Buffer8);
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
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=limit; i>=0; i--)
{
//----
Buffer1[i] = iRSI (NULL,0,RSI_Period1,Price,i);
Buffer2[i] = iRSI (NULL,0,RSI_Period2,Price,i);
Buffer3[i] = iRSI (NULL,0,RSI_Period3,Price,i);
Buffer4[i] = iRSI (NULL,0,RSI_Period4,Price,i);
Buffer5[i] = iRSI (NULL,0,RSI_Period5,Price,i);
Buffer6[i] = iRSI (NULL,0,RSI_Period6,Price,i);
Buffer7[i] = iRSI (NULL,0,RSI_Period7,Price,i);
Buffer8[i] = iRSI (NULL,0,RSI_Period8,Price,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
---