Multi Timeframe Indicators - page 495

 

Hi MLaden and Mr tools,

About this rsx indicator of Mr tools, do you succed to obtain the 4 colors ?

If it's not possible I will understand and I will close the discussion about it

Perhaps with the arrows that Marco wanted ?

Thanks a lot to you and have a nice day

Zilliq

 

Dear mladen,

First a big thanks to your quick response and hard work ! Perhaps the best I've seen among all the forex boards (FF, SteveH, MQL4) where most folks are content to give out 'hints' as opposed to solving a problem like you have been doing on your board. Maybe you should start charging $20-25 per request since obviously this takes time and effort, and the amount is not a burden- it is shared equitably.

Second, I will go over your code even though I am a newbie, but it will give me practice. I ran your upgraded mq4 with Instance 1 and Instance 2 separately, and it gives me an M1 display both times but in a vertical stack.

1. How do I run almostUniqueIndex in a 4 TF loop in the same indi, with different TFs specified?

2. What I really want is to have 4 TF displays side by side (horizontally), not vertically, since vertical displays can always be done running each indi instance in a separate window for each TF specified. My objective is to be able to save vertical space so I can run side-by-side displays of CSS in 4 different TFs in a single window, then run another indi in the chart above or below..

I would very much appreciate your further help here. And any links/references to learning MQL4 efficiently (beyond the dry worded MQL4 official doc online) would also be helpful.

Cheers,

Athar.

mladen:
atharmian

As far as speed is concerned, it is using multiple symbols and you can not speed it up when it is trying to collect data from all the symbols it should

As far as drawing is concerned and as far as labels and multiple instances are concerned this one more or less solves it (it uses liner interpolation for drawing it - if you want the "step like" look you have to rewrite the indicator to work differently)

__________________________

PS : to allow multiple instances, set the "almostUniqueIndex" to unique value for each new instance you attach to the same chart
 

Dear mladen,

Oh, as reminder to my first post, and my identification of code errors:

The single TF per instance for CSS indi is already available as the original CSS. See below, with the updated CSS v 1.0.8 which supposedly runs faster- Topic 2: Currency Strength Slope.

I was attempting to modify it for MTF in same window, and then ran into problems explained in my first post that you had replied.

stevehopwoodforex.com • View topic - Baluda Indicators

This is the horizontal, same window MTF display I want. Unluckily hanover uses his RS calculation; I need CSS calculation as above.

Recent Strength indicator @ Forex Factory (first chart, 2nd window.)

So, in both your and my code, the j loop in Start() for effecting 4 TF iterations in the same instance (same window) iterates only once.

Only the first TF is displayed, i.e., the chart and text table for M1.

The IndexShift and horizontalOffset iterations are used to shift the chart and table for each following TF, i.e., M5, M15 and M30. The iBarShift is used because MQL4 doc says it need be used for MTF plots in the same window (without iBarShift there is again only the first M1 TF display.) Bars are formed differently in each TF and have to be identified with either iBarShift or ArrayCopy.

Maybe the problem is the return(0) at the end of the j loop in Start(). But when I comment out return(0) out of the j loop, the MT4 hangs, without any display. Moving return(0) or return() below the loop gives me parenthesis errors.

I hope that the loop and shifts and iBarShift code are OK otherwise. There must be a simple error here I cannot locate as a newbie ...

Have a nice weekend,

Athar.

 
atharmian:
Dear mladen,

Oh, as reminder to my first post, and my identification of code errors:

The single TF per instance for CSS indi is already available as the original CSS. See below, with the updated CSS v 1.0.8 which supposedly runs faster- Topic 2: Currency Strength Slope.

I was attempting to modify it for MTF in same window, and then ran into problems explained in my first post that you had replied.

stevehopwoodforex.com • View topic - Baluda Indicators

This is the horizontal, same window MTF display I want. Unluckily hanover uses his RS calculation; I need CSS calculation as above.

Recent Strength indicator @ Forex Factory (first chart, 2nd window.)

So, in both your and my code, the j loop in Start() for effecting 4 TF iterations in the same instance (same window) iterates only once.

Only the first TF is displayed, i.e., the chart and text table for M1.

The IndexShift and horizontalOffset iterations are used to shift the chart and table for each following TF, i.e., M5, M15 and M30. The iBarShift is used because MQL4 doc says it need be used for MTF plots in the same window (without iBarShift there is again only the first M1 TF display.) Bars are formed differently in each TF and have to be identified with either iBarShift or ArrayCopy.

Maybe the problem is the return(0) at the end of the j loop in Start(). But when I comment out return(0) out of the j loop, the MT4 hangs, without any display. Moving return(0) or return() below the loop gives me parenthesis errors.

I hope that the loop and shifts and iBarShift code are OK otherwise. There must be a simple error here I cannot locate as a newbie ...

Have a nice weekend,

Athar.

Why don't you post the original code (without the changes that should have made it multi time frame)?

 

supply & demand zones indicator MTF

Dear mladen,

I found the attached indicator for supply & demand zones.

It works fine also during backtest but only for the current timefrrame.

If you choose a higher timeframe it works fine live but it doesn't paint area on backtest.

Could you modify it in order to work properly (paint higher timeframes areas on current period ) during backtest ?

Thanks in advance

Andrea

 
andreatrade:
Dear mladen,

I found the attached indicator for supply & demand zones.

It works fine also during backtest but only for the current timefrrame.

If you choose a higher timeframe it works fine live but it doesn't paint area on backtest.

Could you modify it in order to work properly (paint higher timeframes areas on current period ) during backtest ?

Thanks in advance

Andrea

Andrea

How do you test it for higher time frame?

As far as I see that is not a multi time frame indicator

 

Sorri Mladen,

I've posted the wrong indicator.

This is the correct one :

 

Dear mladen,

Here attached is the code that I tried to modify for MTF, for which I made above error remarks.

Hopefully I have been able to better communicate this time.

Athar.

Files:
 
andreatrade:
Dear mladen,

I found the attached indicator for supply & demand zones.

It works fine also during backtest but only for the current timefrrame.

If you choose a higher timeframe it works fine live but it doesn't paint area on backtest.

Could you modify it in order to work properly (paint higher timeframes areas on current period ) during backtest ?

Thanks in advance

Andrea

Andrea

When testing higher time frame in back test, metatrader "knows" the future values already (it is using real time frame data not the simulated higher time frame data). And since that indicator is made to work on current bar, values (objects) are drawn in the future relative to the tested period.

See the example : object are there but you don't see them since they are way in the "simulated future" instead in the "simulated present"

_____________

PS: used the attached indicator for testing

 

Dear Mladen and/or MrTools,

Is it possible to programm arrows into the chart as written below? It would be a convinient and grateful solution for using this indicator drawing the arrows directly into the chart.

Really thanks a lot. Regards Marco320

Marco320:
Dear MLaden,

Could you programm arrows in the RSX indicator. (e.g. screenshot attached)

It should be nice to see the arrow after the first bar closed. (or as quickly after confirmation of the colour changing)

Thx a lot for your cooperation and a nice weekend.

Marco320
Reason: