Multi Timeframe Indicators - page 739

Mladen Rakic
153912
Mladen Rakic  
rkhan1:
Hi M

Your right

This is the Macd I have been using , I am comparing to yours

This is the code, does it look right to you

//+------------------------------------------------------------------+

//| MACD with crossing.mq4 |

//| Copyright © 2004, MetaQuotes Software Corp. |

//| MetaTrader 5 Trading Platform / MetaQuotes Software Corp. |

//+------------------------------------------------------------------+

#property copyright ""

#property link ""

//---- indicator settings

#property indicator_separate_window

#property indicator_buffers 3

#property indicator_color1 Gold

#property indicator_color2 Red

#property indicator_color3 Gray

#property indicator_width1 2

//---- indicator parameters

extern int FastEMA=12;

extern int SlowEMA=26;

extern int SignalSMA=9;

//---- indicator buffers

double MacdBuffer[];

double SignalBuffer[];

double HistogramBuffer[];

//---- globals

int maxLines;

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

SetIndexStyle(0,DRAW_LINE);

SetIndexStyle(1,DRAW_LINE);

SetIndexStyle(2,DRAW_HISTOGRAM);

//

SetIndexBuffer(0,MacdBuffer);

SetIndexBuffer(1,SignalBuffer);

SetIndexBuffer(2,HistogramBuffer);

//

SetIndexLabel(0,"MACD");

SetIndexLabel(1,"Signal");

SetIndexLabel(2,"MACD-Signal");

//

SetIndexDrawBegin(1,SignalSMA);

IndicatorDigits(Digits+1);

IndicatorShortName("MACD("+FastEMA+","+SlowEMA+","+SignalSMA+")");

return(0);

}

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

int deinit()

{

DeleteLines();

return(0);

}

//+------------------------------------------------------------------+

//| Moving Averages Convergence/Divergence |

//+------------------------------------------------------------------+

int start()

{

double crossing;

int limit,i;

int counted_bars=IndicatorCounted();

//----

if(counted_bars>0) counted_bars--;

limit=Bars-counted_bars;

//----

for(i=0; i<limit; i++) MacdBuffer=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);

for(i=0; i<limit; i++)

{

SignalBuffer=iMAOnArray(MacdBuffer,Bars,SignalSMA,0,MODE_SMA,i);

HistogramBuffer=MacdBuffer - SignalBuffer;

}

//----

DeleteLines();

for(i=WindowBarsPerChart(); i>0 ;i--)

{

crossing=(MacdBuffer-SignalBuffer)*(MacdBuffer-SignalBuffer);

if (crossing < 0)

{

maxLines+=1;

ObjectCreate("MacdCross"+maxLines,0,0,Time,0);

ObjectSet("MacdCross"+maxLines,OBJPROP_COLOR,DimGray);

ObjectSet("MacdCross"+maxLines,OBJPROP_STYLE,STYLE_DOT);

}

}

return(0);

}

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

void DeleteLines()

{

for(int i=1;i<=maxLines;i++) ObjectDelete("MacdCross"+i); maxLines=0;

}

//+------------------------------------------------------------------+

can you tell me how to add MTF to this one just for knowledge

Thx

That one is using SMA for signal line - it is the same as the built in metatrader one

studbiol
100
studbiol  
mladen:
rkhan1 This is the updated version : mtf_ma_with_shift_nmc.mq4

Dear mladen,

is it possible to make it two colored?

William Snyder
9492
William Snyder  
studbiol:
Dear mladen, is it possible to make it two colored?

Studbiol, added a multi colored option.

studbiol
100
studbiol  

My next question to the generous programmers:

The attached indicator seems to be a good indicator. Is it a kind of Solarwind or ZigZag? Does it repaint?

If it is not a repainting one could someone please have look why it doesn't show up on TF > 240 min. and perhaps make it work.

Thanks in advance.

Files:
Mladen Rakic
153912
Mladen Rakic  
studbiol:
My next question to the generous programmers:

The attached indicator seems to be a good indicator. Is it a kind of Solarwind or ZigZag? Does it repaint?

If it is not a repainting one could someone please have look why it doesn't show up on TF > 240 min. and perhaps make it work.

Thanks in advance.

studbiol

Gan high low activator does not repaint.

As of why it does not show : better to use some other version (since this one is coded to work only intraday, and some errors in it also)

Jan Fouquaert
584
Jan Fouquaert  

Hi Mladen and Mrtools,

Would you be as kind and would it be possible to make this amazing beauty MTF ?

Files:
Ali
5
Ali  

Hi traders,

does anybody have version of the Accelerator Oscillator with period setting?

its realy necessary.

tanx

Best Regards

Ali

Mladen Rakic
153912
Mladen Rakic  
za_trader:
Hi traders,

does anybody have version of the Accelerator Oscillator with period setting?

its realy necessary.

tanx

Best Regards

Ali

Here you go : accelerator_periods.mq4

airquest
373
airquest  
Wulong10:
Hi Mladen and Mrtools, Would you be as kind and would it be possible to make this amazing beauty MTF ?

Testing some stuff, try it.

Jan Fouquaert
584
Jan Fouquaert  

Thank you Airquest, I didn't know you could code too.

I will test it right away.

You should test it too, it's an incredible indicator with a lot of potential.

At least, that's what I think ...