Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
HOOL_v1
//+------------------------------------------------------------------+
//|                                                         HOOL.mq4 |
//|                                         Copyright © 2009, LeMan. |
//|                                                 b-market@mail.ru |
//+------------------------------------------------------------------+
#property  copyright "Copyright © 2009, LeMan."
#property  link      "b-market@mail.ru"
//----
#property  indicator_separate_window
#property  indicator_buffers 2
#property  indicator_color1  Green
#property  indicator_color2  Red
#property  indicator_width1  2
#property  indicator_width2  2
//----
double     ExtBuffer1[];
double     ExtBuffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init() 
  {
//----
   IndicatorBuffers(2);
   IndicatorDigits(Digits);
//----
   SetIndexBuffer(0,ExtBuffer1);
   SetIndexBuffer(1,ExtBuffer2);
//----
   SetIndexStyle(0,DRAW_HISTOGRAM);
   SetIndexStyle(1,DRAW_HISTOGRAM);
//----
   IndicatorShortName("HOOL");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| HOOL Indicator                                                   |
//+------------------------------------------------------------------+
int start() 
  {
   int    limit,i;
   int counted_bars=IndicatorCounted();
   if(counted_bars<0) return(-1);
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
   if(counted_bars==0) limit--;
//----
   for(i=limit; i>=0; i--) 
     {
      ExtBuffer1[i] = NormalizeDouble((High[i]-Open[i])*MathPow(10,Digits),0);
      ExtBuffer2[i] = NormalizeDouble((Low[i]-Open[i])*MathPow(10,Digits),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 ---