Indicators Used
Miscellaneous
0
Views
0
Downloads
0
Favorites
HMA - Ogeima
//+------------------------------------------------------------------+
//| HMA - Ogeima.mq4 |
//| Copyright © 2006, Ogeima |
//| ph_bresson@yahoo.com |
//| Develloped on request for FXiGoR |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Ogeima & FXiGoR"
#property link "ph_bresson@yahoo.com"
#property indicator_chart_window
#property indicator_buffers 5
#property indicator_color1 MediumBlue
#property indicator_color2 SkyBlue
#property indicator_color3 SkyBlue
#property indicator_color4 SkyBlue
#property indicator_color5 SkyBlue
//---- input parameters
extern double period=20;
extern double factor=2.0;
extern double period_divider=2.0;
extern double smoothing_power=0.5;
extern int method=3;
extern int price=0;
extern int time_frame = 0;
//---- buffers
double ExtMapBuffer1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE, STYLE_SOLID, 3);
SetIndexBuffer(0,ExtMapBuffer1);
//----
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);
int x = 0;
int power = MathPow(period, smoothing_power);
int e = Bars - counted_bars + period + 1;
double vect[], trend[];
if(e > Bars) e = Bars;
ArrayResize(vect, e);
ArraySetAsSeries(vect, true);
for(x = 0; x < e; x++)
vect[x] = factor*iMA(NULL,time_frame, period/period_divider, 0, method, price, x)-iMA(NULL, 0, period, 0, method, price, x);
for(x = 0; x < e-period; x++)
ExtMapBuffer1[x] = iMAOnArray(vect, 0, power, 0, method, x);
return(0);
}
//+------------------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---