Download MetaTrader 5

OsMA with Moving average line (signal) please

To add comments, please log in or register
We have launched Spanish and Portuguese versions of the website. Try them!
Forex Trader
114255
Forex Trader 2008.02.05 04:50 
Hello members

Has anyone seen or can anybody assist with alteration of the standard MT4 OsMA by adding a 'signal' line (moving average) of the histogram values similar to what is done on the MaCD?

Many thanks

FxN
Forex Trader
114255
Forex Trader 2008.02.12 22:06  
Paste this in:


//+------------------------------------------------------------------+
//|                                                         OsMA.mq4 |
//|                      Copyright © 2004, MetaQuotes Software Corp. |
//|                                       http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property  copyright "Copyright © 2004, MetaQuotes Software Corp."
#property  link      "http://www.metaquotes.net/"
//---- indicator settings
#property  indicator_separate_window
#property  indicator_buffers 3
#property  indicator_color1  Silver
#property  indicator_color2  PowderBlue
#property  indicator_color3  Red
#property  indicator_width1  2
//---- indicator parameters
extern int FastEMA=12;
extern int SlowEMA=26;
extern int SignalSMA=9;
//---- indicator buffers
double     OsmaBuffer[];
double     MacdBuffer[];
double     SignalBuffer[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- 2 additional buffers are used for counting.
   IndicatorBuffers(3);
//---- drawing settings
   SetIndexStyle(0,DRAW_HISTOGRAM);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexStyle(2,DRAW_LINE);
   SetIndexDrawBegin(0,SignalSMA);
   IndicatorDigits(Digits+2);
//---- 3 indicator buffers mapping



Forex Trader
114255
Forex Trader 2008.02.19 07:59  
Thanks Phy for your kind help

I will see if it does the trick

Regards

FxNorth
AtayeSystems
136
AtayeSystems 2015.08.12 20:25  
Forex Trader:
Paste this in:


I tried this but it did not work. There seems to be a whole lot of code missing when I compared it to the code of the standard OSMA indicator. Please help.
To add comments, please log in or register