Author: �����
Engulfing
Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
Engulfing
//+------------------------------------------------------------------+
#property copyright "ë¸êñóñ"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Aqua
#property indicator_color2 Violet

double Up[],Dn[];
//+------------------------------------------------------------------+
int init()
{
   SetIndexBuffer(0,Up);
   SetIndexBuffer(1,Dn);

   SetIndexStyle(0,DRAW_ARROW);
   SetIndexStyle(1,DRAW_ARROW);

   SetIndexArrow(0,233);
   SetIndexArrow(1,234);

   return(0);
}
//+------------------------------------------------------------------+
int start()
{   
  int i,CountBars=Bars-1;

  for(i=0; i<CountBars; i++)
  {
    Up[i]=0.0; Dn[i]=0.0;

    if(Close[i+1]>Open[i+1] && Close[i+2]<Open[i+2] && Close[i+1]>Open[i+2] && Open[i+1]<=Close[i+2]) { Up[i]= Low[i+2]; }
    if(Close[i+1]<Open[i+1] && Close[i+2]>Open[i+2] && Close[i+1]<Open[i+2] && Open[i+1]>=Close[i+2]) { Dn[i]=High[i+2]; }
  }

  return(0);
}
//+------------------------------------------------------------------+
int deinit() { 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 ---