Multi timeframe – MTF indicators for ProRealTime
Forums › ProRealTime English forum › ProBuilder support › Multi timeframe – MTF indicators for ProRealTime
- This topic has 145 replies, 48 voices, and was last updated 1 month ago by druby.
Tagged: mtf, mtf indicators
-
-
09/16/2021 at 8:16 AM #177689
This is the same one as above, that can be used in straategies:
1234567891011121314151617181920212223242526272829303132333435363738394041// Multiple TFs (example)//Timeframe(Daily,UpdateOnClose)sma1 = average[5,0](close)Timeframe(4h,UpdateOnClose)sma2 = average[5,0](close)Timeframe(1h,UpdateOnClose)sma3 = average[5,0](close)Timeframe(30 minute,UpdateOnClose)sma4 = average[5,0](close)Timeframe(15 minute,UpdateOnClose)sma5 = average[5,0](close)Timeframe(5 minute,UpdateOnClose)sma6 = average[5,0](close)Timeframe(8h,UpdateOnClose)sma7 = average[5,0](close)Timeframe(1 minute,UpdateOnClose)sma8 = average[5,0](close)Timeframe(default,UpdateOnClose)sma9 = average[5,0](close)Timeframe(Daily,default)sma10 = average[5,0](close)Timeframe(Daily,UpdateOnClose)sma11 = average[5,0](close)Timeframe(5 minute,default)sma12 = average[5,0](close)//return sma1 as "sma1",sma2 as "sma2",sma3 as "sma3",sma4 as "sma4",sma5 as "sma5",sma6 as "sma6",sma7 as "sma7",sma8 as "sma8",sma9 as "sma9",sma10 as "sma10",sma11 as "sma11",sma12 as "sma12"buy at -close limit//graphonprice sma1graphonprice sma2graphonprice sma3graphonprice sma4graphonprice sma5graphonprice sma6graphonprice sma7graphonprice sma8graphonprice sma9graphonprice sma10graphonprice sma11graphonprice sma1209/16/2021 at 8:48 AM #177692Tnx for that. So to understand TimeFrame keyword, why have you used the below 3 timeframes in the same code? How are they different from each other?Timeframe(default,UpdateOnClose)Timeframe(Daily,default)Timeframe(Daily,UpdateOnClose)The time frames I want to cover are:1 hr2 hr3 hr4 hr5 hr6 hr7 hr8 hr9 hr10 hr &11 hrSo how do you suggest I set up the code including Default, UpdateonClose etc?09/16/2021 at 9:04 AM #177694Timefrane(default,UpdateOnClose) is mispelled. Actually it can be used, but UpdateOnClose is redundant with the DEAFAULT TF, as it can’t be any different, it is ALWAYS executed when a bar closes and cannot be update while that bar is forming. The difference between the two keywords is useful with its multiple TFs, which can be accessed while the bar is forming, UpdateOnClose updates variables when that bar closes, while Default updates variables when the DEFAULT bar closes (i.e. when the higher bar is forming).
Those two with Timeframe(Daily,UpdateOnClose) are the same, I wrote them just to show that you can use that keyword multiple times in a scattered way, there’s no need for them to be in any order.
Timeframe(Daily,UpdateOnClose) and Timeframe(Daily,Default) are different, as explained above.10/31/2021 at 9:48 PM #18070310/31/2021 at 10:55 PM #180708Amer,
There is a function for that added in PRT v11 gettimeframe, returning the time-frame on seconds.
See
11/01/2021 at 7:39 AM #180717Hallo,vielen Dank für die Beiträge. Die neue Funktion erleichtert die taktische Vorgehensweise in der Systematik unheimlich.Wie würden Sie ein MACD(12,26,9)[D1] und MACD(12,26,9)[H4] und MACD(12,26,9)[H1] in einem Indikator codieren?Ausgabe ist ein Histogramm! 😉Grus Vjper
Hi there, Thanks for the contributions. The new function makes the tactical approach in the system a lot easier. How would you code a MACD (12,26,9) [D1] and MACD (12,26,9) [H4] and MACD (12,26,9) [H1] in one indicator? Output is a histogram! 😉 Grus Vjper
11/01/2021 at 8:09 AM #18071911/04/2021 at 3:37 PM #18096211/04/2021 at 8:14 PM #18098905/16/2022 at 2:42 PM #193248Hi…
Having a problem when backtesting with my indicator(s) which have ‘TimeFrame’ code in them.
When using indicators as stand alone everything works fine with chart plotting what’s expected, but if I try to backtest I get error:-
“Backtest can’t start because of a parsing error in the code: line 1, column 0.”
I’ve investigated the code and narrowed it down to the ‘TimeFrame’ command which ended up on line1 column 0
Still get error with just basic code if ‘TimeFrame’ used, which error’ed on line1 column 0.
All errors point to a line/column where the ‘timeFrame’ command is
Can someone verify if you can backtest with indicator’s using the ‘TimeFrame’ command .
05/16/2022 at 2:50 PM #19325105/28/2022 at 11:22 AM #194060Hi everyone,
How can I display the SMA of a given timeframe ON THE GRAPH of a lower timeframe?
For instance, I want to display the SMA20 100 ticks on the 50 ticks chart.Please see attached a screenshot, I can only get in in a separate panel.
Here is the code I used (sorry I could not find how to add it in the specific PRT code window)
TIMEFRAME(100 ticks, UPDATEONCLOSE)
ind=Average[20](close)
return indThank you!
05/30/2022 at 5:11 PM #194209Hi everyone,
How can I display the SMA of a given timeframe ON THE GRAPH of a lower timeframe?
For instance, I want to display the SMA20 100 ticks on the 50 ticks chart.
Please see attached a screenshot, I can only get in in a separate panel.
Here is the code I used (sorry I could not find how to add it in the specific PRT code window)
TIMEFRAME(100 ticks, UPDATEONCLOSE)
ind=Average[20](close)
return ind
Thank you!
@robertogozzi @Nicolas, do you guys know by any chance?05/30/2022 at 5:28 PM #194212Add the indicator on the price chart, see how: How to add an Indicator On Price
1 user thanked author for this post.
05/30/2022 at 6:16 PM #194214 -
AuthorPosts