Multi Timeframe Indicators - page 414

 

Mrtools

Would it be possible for you to add MTF option in this indicator ?

Thanks in advance

new_sfractals.mq4

Files:
 

I think that mrtools is resting on this weekend so here is this version

affandiz:
Mrtools

Would it be possible for you to add MTF option in this indicator ?

Thanks in advance

new_sfractals.mq4
Files:
 

Ask for programming help

mladen:
Multi time frame version of the Stochastic of T3 indicator (the one that was originally posted here : Stochastic Oscillator ) with some explanation as of what is it exactly and how does it work

Hi Mladen,

I wanted to add arrows and alerts when the main line crosses the signal line of this indicator using the corresponding routines from your other indicator codes but I was not able to get it to work

Would you please help me out, what is wrong in my attempt?

Regards,

Chrisstoff

 

Thank you

mrtools:
Hi Chrisstoff, You were close, here's a fixed version.You will probably see it in the code better than me explaining, my explaining is not to good sometimes.

Hello MrTools,

Thank you for your help, it is much appreciated. Well, I have already looked into the code and seen some of my mistakes...

Regards,

Chrisstoff

 
mrtools:
Hi Chrisstoff, You were close, here's a fixed version.You will probably see it in the code better than me explaining, my explaining is not to good sometimes.

thank you for this

 
mladen:
I think that mrtools is resting on this weekend so here is this version

thanks a lot...

 
mladen:
I think that mrtools is resting on this weekend so here is this version

hi mladen it is posible to make the indi show more arrow like in second picture?

i try to create mtf indicator using icustom like attached but its make my laptop hang.

thanks in advance

mtf_sfractals_alert.mq4

Files:
 

Multipair Multitimeframe

MLaden, MrTools and anyone else?

I have a multi pair multi timeframe custom indicator that I wrote. I store my pairs in a pair array and the time frames in a session arrlay. What I want to do is to initially calculate the first dozen bars, 0 to 12, of a iCustom call to a special MACD I wrote and then to determine the MACD zero crossovers and the MACD Signal crossovers during this time. Thereafter, I only need to make the iCustom calls for the uncounted bars.

So, I calculate the counted_bars and limit in the standard manner and then do a MathMin on limit and 12. Next 3 loops are setup, one for the pair, one for the time frame and one for the bars to be calculated.

What I am finding is that the initial limit of 12 gets called 4 times for one pair (not always the same pair and not the chart pair) then the chart pair gets called once for the same bar and then calculations reset and the time frame limit changes from 12 to 2. After this, the print diagnostics generally show the pairs ascend by their index. However, there are many cases where there is an index gap or an index reset or even sometimes just one line of the diagnostics.

Can anyone explain what is happening? Is this problem being caused by incoming ticks to either the chart window or the two iCustom calls. What happens when an indicator is in the middle of calculations and another tick arrives? I thought the indicator finished and this tick ignored when the next one came in.

The other possibility I considered was there was a buffer overflow on the Experts tab due to the relative slowness of printed output. However, from examining the index that this is highly unlikely.

Finally, is it possible to call the calculation function once from the init() function and eliminate the need for the special case in the start() function.

Here is the relevant code

If anyone has any suggestions, I'd like to know, either on this thread of through a private message. Your ideas and suggestions will be appreciated as I have spent considerable time trying to identify and fix this problem.

void Calculate_MAsAndMACDs(int index, int session, int bar,int limit, int counted_bars)

{

string pair;

pair=Symbols.Pair;

int previous=bar+1;

macd= iCustom(pair,Session.Period[session],File.MACD, 3,4,3,8,13,false,1,bar);

signal=iCustom(pair,Session.Period[session],File.MACD, 3,4,3,8,13,false,0,bar);

Print(Symbols," Counted Bars-b ",index," ",bar," ",Bars," ",IndicatorCounted()," ",limit," ",counted_bars);

MACD.Trend=1;

if(macd<signal) MACD.Trend=-1;

if(macd > signal && macd[previous] < signal[previous]) {MACD.CrossOverTime=Time; MACD.CrossOverTimeValue=1;}

if(macd signal[previous]) {MACD.CrossOverTime=Time; MACD.CrossOverTimeValue=-1;}

if(MACD.CrossOverTime == 0) MACD.CrossOverTime=Time[ActiveCrossOverBars+1];

if(macd >0. && macd[previous] <0.) {MACD.CrossedTime=Time; MACD.CrossedTimeValue=1; }// Print("crossed up ",bar," ",MACD.CrossedTimeValue);}

if(macd 0.) {MACD.CrossedTime=Time; MACD.CrossedTimeValue=-1;}// Print("crossed dn ",bar," ",MACD.CrossedTimeValue);}

//if(Symbols == "XAUUSD")

Print(Symbols," Counted Bars-b ",index," ",bar," ",Bars," ",IndicatorCounted()," ",limit," ",counted_bars," ",DoubleToStr(macd,7)," ",DoubleToStr(macd[previous],7)," ",TimeToStr(MACD.CrossedTime,TIME_MINUTES)," ",TimeToStr(Time,TIME_MINUTES)," ",MACD.CrossedTimeValue);

if(MACD.CrossedTime == 0) MACD.CrossedTime=Time[ActiveCrossOverBars+1];

if(macd >= macd[previous]) MACD.Slope=1; else MACD.Slope=-1;

MACD.Signal.Trend=1;

if(signal<signal[previous]) MACD.Signal.Trend=-1;

}

int start()

{

int Y.Height,session,index,xpos,counted_bars=IndicatorCounted(), elements=ActiveCrossOverBars+2;

if(counted_bars<0) return(-1);

if(counted_bars>0) counted_bars--;

int limit = MathMin(Bars-counted_bars,Bars-1);

limit = MathMin(limit,elements);

for(int i=0;i<Session.Order.Number;i++)

{

session=Session.Order;

for(index=0;index<Symbols.Number;index++)

{

Print(Symbols," Counted Bars-a ",index," ",-1," ",Bars," ",IndicatorCounted()," ",counted_bars," ",limit);

ArrayResize(macd,elements); ArrayResize(signal,elements);

for(int k=limit;k>=0;k--) Calculate_MAsAndMACDs(index, session, k, limit, counted_bars);

}

}

return(0);

Files:
diagnostics.jpg  216 kb
 

hi , i need your help to make this indicator in MTF version ...

thanks alot for your help

Files:
ut_fast.mq4  26 kb
 

Dear mladen and mrtools

Will you be so kind to add MTF option to the

two indicators attached?

Thank you very much for your time

Dan

Reason: