MTF in BackTesting
Thank you for the tip, I will try it.
on the shift, my question was how do you look at the values of the H4 indicator on the H1 time frame. The Data Window clearly shows intermediate values which if possible I would like to access as they are different from the H4 Bar 1 or 2 values. I am hoping there is a way to "get" at them which involves a different type of access than iCustom. These intermediate values look like Metatrader is calling the H4 indicator on every H1 bar close and calculating the intermediate H4 values and storing them on the H1 time frame bars.
as you might noticed, on 1h chart, your mtf indi will always force the intermediate value of 4h to be the same, that's why up to 4 recent bars could repaint and they are always the same, which represents the bar0 value on 4h chart at any given point.
Not on my chart, the Data Window clearly shows 3 different values for H4 intermediate intervals. My interest lies in one of the indices is a buy/sell arrow which only paints on an intermediate value and you are correct sometimes it is repainted but I still would like to access it.
If I ever find the solution, I'll let you know. I do appreciate your suggestions
PL dot MTF?
Hi coders on forex-tsd,
I am in need of this indi in multi timeframe. Can some one please kindly help? I heard that it is a simple MA (H+L+C)/3 shift 1. Great thanks in advance.
Here you go!
ps) forgot to mention you don't need the other indicator in indicators folder for this to work!
Updated version posted here : https://www.mql5.com/en/forum/173574
iCustom Needs ALL Parameters
Not sure if you've made more progress with this or not...so here's my suggestions...
You asked earlier..."If you use iCustom in an EA and do not pass it any parameters, does it use it's defaults. And if you pass it only the first couple of it's parameters but not all, does it use the defaults for the rest. My indications are that it does."
iCustom usually requires ALL parameters to be included... There may be some exceptions, but it's better to be safe to include them all.
In some cases I have disabled (// blanked) all the "externs" in the indicators that the EA uses...to make it much simpler to use the indicators in my iCustoms with a higher confidence that I am getting the correct values. That way I just need to add the buffer and bar shift and not worry about parameters.
Otherwise...it's better to add ALL the parameters in the iCustom statements.
Secondly, if you are actually seeing the intermediate values from your indicators in your Data Window...then they should be retrievable with your iCustom statements, and also your Print and Comments should be able to show the values once you got them with your iCustom.
Regarding the Buy/Sell arrows - look in the indicators directly to see which buffers they are using...then use those buffers in the iCustom statements.
Hope this helps,
Hello Robert and ChristinaLi
Thanks for both of your responses. Regarding partial lists in iCustom, I agree, it is better to include all. I was wondering if anyone had experienced the partial list results as I have.
Since the last post, I have done extensive testing using the Strategy Tester and have found the following:
When you make the iCustom call, use Null in the second parameter for time. Pass the time you want through your indicator call. Comparing my results to the Data Window values, I found every 6th call for the higher D1 indicator, were accurate. The next succeeding five bars were approximately correct. I believe what is happening is that the iCustom call to the higher time frame is using the "intermediate bar 1 close" value to put in the corresponding bar of the lower time frame. I say approximately because when my Gann indicator flips to use the low, I believe Metatrader overwrites the original values with a linear interpolation to be able to draw a straight line from the higher value to the lower value. I found the values were approximately 7 pips or so off.
In addition, I am running H4 D1 test on the Strategy Tester on a tick by tick basis. I am attaching a shot with two charts. The top one is Running the Strategy Tester and the Bottom is using a standard chart synchronized to the same time. Notice the two are generally in agreement, but there are exceptions where the tester and actual differ somewhat, these are marked with arrows in the lower, active, chart.
Regarding the Buy Sell arrows, I cannot obtain their values in the slower, D1, iCustom call for their respective indices. I think there is a Metatrader draw bug as when the low dips below the Gann line, the arrow is displayed on the chart but if the bar closes above the line, then I think Metatrader is zeroing out the wrong bar, e.g it put it in the nth bar but it zeroes out either the nth+1 or nth-1 due to the bar change. If you stop and start, the pseudo arrows disappear just like a redraw problem but if you do not restart, they will remain on the chart continuously.
So to conclude, I believe that you can use MTF indicators successfully in the Strategy Tester although you must be cognizant of the potential difference due to time period interpolations. Also if you are using open prices only to facilitate your testing, be sure you understand its implications for the indicators you are calling.
Hope it helps
custom time frame
I have a question, if some good soul would point me in to right direction....
I trade on range bars, which means i make "off line chart" in mt4. That means custom time frame chart (1m, 7m,...), which means
that many of the multi tf indicators dont work, since they are coded for regular time frames (1m,15m,30m,60m,...)
For example, I like MTF_NonLagMAv7.1_4TF_Bar.mq4, but it shows only specified time frames.
So my question is, does anyone have similar indicator to this one, in which i could select specific custom TF?
Many many thanks!
You gave me the right thing I has been searching for long. Great thanks for your generosity. Best wishes to you.
I would like a MTF TASSKIT please.
also the gann bars would be cool if they havent been made.
Thanks in advance.