Multi Timeframe Indicators - page 720

 
rkhan1:
Hi Mladen

you coded this indy for 2 lines ,

now can you add option for 3 line

Regards

Wouldn't that be too much (since it is in a subwindow, crossing of the 3 values would just add lag)?

 

Hi,

I have programmed many MTF indicators that way:

int iTF1 = iBarShift(NULL, TF1_Timeframe, Time);

Sto_Sig_2 = iStochastic(NULL,TF1_Timeframe, TF1_KPeriod, TF1_DPeriod, TF1_Slowing, TF1_Method ,TF1_Price, 1, iTF1+2)

But if I use this, I see for the past values f.e. of PERIOD_D1 only the same value all the hole day long.

If I am calling

Sto_Sig_2 = iStochastic(NULL,PERIOD_D1, TF1_KPeriod, TF1_DPeriod, TF1_Slowing, TF1_Method ,TF1_Price, 1, 0)

in my EA, so I get different values all over the day (even from the past days).

Now how can I calculate a mtf-indicator with shows me the the different mft values f.e. in H1 from D1? So I don't really want to get the close value. I hope you can understand my question.

Lot's of thanks!

 
sunshineh:
Hi,

I have programmed many MTF indicators that way:

int iTF1 = iBarShift(NULL, TF1_Timeframe, Time);

Sto_Sig_2 = iStochastic(NULL,TF1_Timeframe, TF1_KPeriod, TF1_DPeriod, TF1_Slowing, TF1_Method ,TF1_Price, 1, iTF1+2)

But if I use this, I see for the past values f.e. of PERIOD_D1 only the same value all the hole day long.

If I am calling

Sto_Sig_2 = iStochastic(NULL,PERIOD_D1, TF1_KPeriod, TF1_DPeriod, TF1_Slowing, TF1_Method ,TF1_Price, 1, 0)

in my EA, so I get different values all over the day (even from the past days).

Now how can I calculate a mtf-indicator with shows me the the different mft values f.e. in H1 from D1? So I don't really want to get the close value. I hope you can understand my question.

Lot's of thanks!

How is your TF1_Timeframe defined?

 

TF1_Timeframe is f.e. 1440 and I use it on my H1 Chart.

 
sunshineh:
TF1_Timeframe is f.e. 1440 and I use it on my H1 Chart.

No. I meant how did you declare it? As int, double, string?

 

I don't know if it would add lag

you are the professional coder here , I just wanted to test

anyways you could remove LAG

Regards

 
mladen:
MACD cross zero separate (originally posted here https://www.mql5.com/en/forum/173574/page260 ) updated for new metatrader 4 : macd_cross_zero_separate_mtf_nmc.mq4

This one too (originally from the same post) : macd_cross_zero_mtf_nmc.mq4

 

hi mladen you dont answer my question in post 7203

it is urgent to me

 

I defined it as int.

So it is really understandable for my, to get all over the day the same value because

int iTF1 = iBarShift(NULL, TF1_Timeframe, Time);

returns always the shift value from the given time to the start of the day.

So if I put this shift value into

Sto_Sig_2 = iStochastic(NULL,TF1_Timeframe, TF1_KPeriod, TF1_DPeriod, TF1_Slowing, TF1_Method ,TF1_Price, 1, iTF1+2)

I am getting always the close value for (iTF1+2)-Bars ago.

But how can I change this behaviour, so that I can get every hour the daily Sto-Value to that time?

I can get it, what I backtest an EA.

 
sunshineh:
I defined it as int.

So it is really understandable for my, to get all over the day the same value because

int iTF1 = iBarShift(NULL, TF1_Timeframe, Time);

returns always the shift value from the given time to the start of the day.

So if I put this shift value into

Sto_Sig_2 = iStochastic(NULL,TF1_Timeframe, TF1_KPeriod, TF1_DPeriod, TF1_Slowing, TF1_Method ,TF1_Price, 1, iTF1+2)

I am getting always the close value for (iTF1+2)-Bars ago.

But how can I change this behaviour, so that I can get every hour the daily Sto-Value to that time?

I can get it, what I backtest an EA.

Newest builds of metatrader 4 can not visual back test multi time frame indicators (some internal functions are working wrong in visual back test - even build 654 too). See the attached example, try it and you will see what happens. And there are more built in functions that are working completely wrong in visual back test. In ne builds of metatrader visual back test is not the brightest part ot trading platform (if there is a bright part at all)