Geo_InnerBar

Author: Copyright � 2012, Geokom
Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
Geo_InnerBar
//+------------------------------------------------------------------+
//|                                                 Geo_InnerBar.mq4 |
//|                                   Copyright © 2012, Geokom FX Lab|
//|                                             geokom2004@yandex.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2012, Geokom"
#property link      "geokom2004@yandex.ru"
// Geo_InnerBar - îòîáðàæåíèå âíóòðåííèõ áàðîâ 
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Olive // 
#property indicator_width1 1

//---- input parameters
double ExtMapBuffer1[];
//double ExtMapBuffer2[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   SetIndexStyle(0,DRAW_HISTOGRAM);
//   SetIndexArrow(0,241);
   SetIndexBuffer(0,ExtMapBuffer1);
   IndicatorShortName("Geo_InnerBar ");
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int counted_bars=IndicatorCounted();
   if(counted_bars<0) return(-1);
   if(counted_bars>0) counted_bars--;
   int limit=Bars-counted_bars;
   if(counted_bars==0) limit-=1+1;

   for(int i=0; i<limit; i++)
     {
      if((High[i]<High[i+1]) && (Low[i]>Low[i+1])) {ExtMapBuffer1[i]=1;}
      else  {ExtMapBuffer1[i]=0;}
     }

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