IndEngulfingV1.0

Author: Safe-Forex.ru
Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
IndEngulfingV1.0
ÿþ//+-------------------------------------------------------------------------------------------------------------------------------------------------+

//|  07@01>BG8:: 8=052 =4@59                                                                                                                      |

//| =48:0B>@:   Engulfing (IndEngulfingV1.0)                                                                                                       |

//| >GB0:       minaev.work@mail.ru                                                                                                                |

//| !:09?:       live:minaev.work                                                                                                                   |

//+-------------------------------------------------------------------------------------------------------------------------------------------------+

#property copyright "Safe-Forex.ru"

#property link      "http://safe-forex.ru"

#property strict

#property indicator_chart_window

#property indicator_buffers 2



double upArrow[]; //AB@5;:8 225@E

double dnArrow[]; //AB@5;:8 2=87

double indent;    //>BABC? 4;O @8A>20=8O AB@5;:8

//+-------------------------------------------------------------------------------------------------------------------------------------------------+

int OnInit(void)

{

   SetIndexBuffer(0,upArrow); SetIndexArrow(0,233); SetIndexStyle(0,DRAW_ARROW,EMPTY,1,clrGreen); SetIndexLabel(0,"KGL5 ?>3;>I5=85");

   SetIndexBuffer(1,dnArrow); SetIndexArrow(1,234); SetIndexStyle(1,DRAW_ARROW,EMPTY,1,clrRed); SetIndexLabel(1,"54256L5 ?>3;>I5=85");

   

   indent=3*_Point; if(_Digits==3||_Digits==5) indent*=10*_Point;

   

   return INIT_SUCCEEDED;

}

//+-------------------------------------------------------------------------------------------------------------------------------------------------+

int OnCalculate(const int rates_total,const int prev_calculated,const datetime &time[],const double &open[],const double &high[],const double &low[],

                const double &close[],const long &tick_volume[],const long &volume[],const int &spread[])

{

   if(prev_calculated==0) //8I5< ?0BB5@=K 2 8AB>@88

      for(int i=Bars-1;i>1;i--) {

         if(open[i]>close[i]&&open[i-1]<close[i-1]&&close[i]>=open[i-1]&&open[i]<close[i-1]) upArrow[i-1]=low[i-1]-indent; //1KGL5 ?>3;>I5=85

         if(open[i]<close[i]&&open[i-1]>close[i-1]&&close[i]<=open[i-1]&&open[i]>close[i-1]) dnArrow[i-1]=high[i-1]+indent; //<54256L5 ?>3;>I5=85

      }

   if(prev_calculated>0) { //8I5< B5:CI85 ?0BB5@=K

      if(open[2]>close[2]&&open[1]<close[1]&&close[2]>=open[1]&&open[2]<close[1]) upArrow[1]=low[1]-indent; //1KGL5 ?>3;>I5=85

      if(open[2]<close[2]&&open[1]>close[1]&&close[2]<=open[1]&&open[2]>close[1]) dnArrow[1]=high[1]+indent; //<54256L5 ?>3;>I5=85

   }

   return rates_total;

}

//+-------------------------------------------------------------------------------------------------------------------------------------------------+

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 ---