Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
PVD$FL
#property  indicator_chart_window
#property  indicator_buffers 4
#property indicator_color1 Red
#property indicator_width1 3      
#property indicator_color2 DodgerBlue
#property indicator_width2 3
#property indicator_color3 Tomato
#property indicator_width3 3
#property indicator_color4 DodgerBlue
#property indicator_width4 3
double ExtMapBuffer0[];
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double buf0,buf1,buf2,buf3;
int init()
  {
   SetIndexBuffer(0,ExtMapBuffer0);
   SetIndexBuffer(1,ExtMapBuffer1);
   SetIndexBuffer(2,ExtMapBuffer2);
   SetIndexBuffer(3,ExtMapBuffer3);
   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,3);
   SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,3);
   SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,2);
   SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,2);
}
   return(0);
int start(){
 datetime TimeArray[];
   int i,limit,y=0,counted_bars=IndicatorCounted();
   ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),1440); 
   limit=Bars-1;
   for(i=0,y=0;i<limit;i++)
  {while (Time[i]<TimeArray[y]) y++;
   buf0=iMA(Symbol(),1440,1,0,MODE_EMA,PRICE_OPEN,y);
   buf1=iMA(Symbol(),1440,1,0,MODE_EMA,PRICE_OPEN,y+1);
   buf2=iMA(Symbol(),0,2,0,MODE_SMA,PRICE_WEIGHTED,i);
   buf3=iMA(Symbol(),0,2,0,MODE_SMA,PRICE_WEIGHTED,i+1);
   ExtMapBuffer0[i]=(buf0);
   ExtMapBuffer1[i]=(buf0);
   ExtMapBuffer2[i]=(buf2);
   ExtMapBuffer3[i]=(buf2);
   if ((buf0>buf2))ExtMapBuffer3[i]=EMPTY_VALUE;
   if ((buf0>buf2))ExtMapBuffer1[i]=EMPTY_VALUE;}   
   return(0);
  }

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---