Indicators Used
Miscellaneous
2
Views
0
Downloads
0
Favorites
BEEP_MA_v1_0
//+------------------------------------------------------------------+
//| BEEP_MA_v1.0.mq4 |
//| Copyright © 2010, Khlystov Vladimir |
//| cmillion@narod.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, Khlystov Vladimir"
#property link "cmillion@narod.ru"
//--------------------------------------------------------------------
#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 DarkOrange
#property indicator_color2 Yellow
#property indicator_color3 Aqua
#property indicator_color4 Lime
#property indicator_color5 Tomato
#property indicator_color6 Red
#property indicator_color7 Magenta
#property indicator_color8 MediumOrchid
extern int period_1 = 1;
extern int period_2 = 15;
extern int period_3 = 40;
extern int period_4 = 70;
extern int period_5 = 115;
extern int period_6 = 150;
extern int period_7 = 175;
extern int period_8 = 200;
extern int width = 3;
double Buffer1[];
double Buffer2[];
double Buffer3[];
double Buffer4[];
double Buffer5[];
double Buffer6[];
double Buffer7[];
double Buffer8[];
//+------------------------------------------------------------------+
int init()
{
SetIndexStyle(0,DRAW_LINE,EMPTY,width);
SetIndexBuffer(0,Buffer1);
SetIndexLabel(0,DoubleToStr(period_1,0));
SetIndexStyle(1,DRAW_LINE,EMPTY,width);
SetIndexBuffer(1,Buffer2);
SetIndexLabel(1,DoubleToStr(period_2,0));
SetIndexStyle(2,DRAW_LINE,EMPTY,width);
SetIndexBuffer(2,Buffer3);
SetIndexLabel(2,DoubleToStr(period_3,0));
SetIndexStyle(3,DRAW_LINE,EMPTY,width);
SetIndexBuffer(3,Buffer4);
SetIndexLabel(3,DoubleToStr(period_4,0));
SetIndexStyle(4,DRAW_LINE,EMPTY,width);
SetIndexBuffer(4,Buffer5);
SetIndexLabel(4,DoubleToStr(period_5,0));
SetIndexStyle(5,DRAW_LINE,EMPTY,width);
SetIndexBuffer(5,Buffer6);
SetIndexLabel(5,DoubleToStr(period_6,0));
SetIndexStyle(6,DRAW_LINE,EMPTY,width);
SetIndexBuffer(6,Buffer7);
SetIndexLabel(6,DoubleToStr(period_7,0));
SetIndexStyle(7,DRAW_LINE,EMPTY,width);
SetIndexBuffer(7,Buffer8);
SetIndexLabel(7,DoubleToStr(period_8,0));
return(0);
}
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
int start()
{
int i,j,limit,counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(i=0; i<limit; i++)
{
Buffer1[i]=iMA(NULL,0,period_1,0,MODE_EMA,PRICE_CLOSE,i);
Buffer2[i]=iMA(NULL,0,period_2,0,MODE_EMA,PRICE_CLOSE,i);
Buffer3[i]=iMA(NULL,0,period_3,0,MODE_EMA,PRICE_CLOSE,i);
Buffer4[i]=iMA(NULL,0,period_4,0,MODE_EMA,PRICE_CLOSE,i);
Buffer5[i]=iMA(NULL,0,period_5,0,MODE_EMA,PRICE_CLOSE,i);
Buffer6[i]=iMA(NULL,0,period_6,0,MODE_EMA,PRICE_CLOSE,i);
Buffer7[i]=iMA(NULL,0,period_7,0,MODE_EMA,PRICE_CLOSE,i);
Buffer8[i]=iMA(NULL,0,period_8,0,MODE_EMA,PRICE_CLOSE,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
---