MTF Sequential Setup
Forums › ProRealTime English forum › ProOrder support › MTF Sequential Setup
- This topic has 48 replies, 8 voices, and was last updated 4 years ago by robertogozzi.
Tagged: mtf, Multiple Time Frames
-
-
12/03/2019 at 1:01 PM #114115
Festive greetings. I was hoping someone can help. I’m a bit stuck with multi timeframe analysis – have been testing out a few strategies. Sometimes the trade is executed as expected, sometimes not. Also when you backtest in some cases it states the entry and exit time is exactly the same and shows a profit or loss when technically it should be 0. I think this is true in a lot of cases actually – the ‘nbr bars’ shows many 0s yet in the ‘abs perf’ there are profits or losses – therefore the overall profit/loss figure is not right. I cant tell whether this is coding issue or an issue with multi timeframe?
The code is below is an example using 10 hours and 10 mins as the default
12345678910111213141516171819202122232425defparam cumulateorders=truetimeframe(10 hour,updateonclose)myrsi1=rsi[10](close)timeframe(default)myrsi2=rsi[4](close)// BUY conditionsBullish0 = myrsi1>70 and myrsi2 crosses over 30IF Bullish0 THENbuy 2 perpoint AT MARKETset stop trailing 10ENDIF// SELL ConditionsBearish0 = myrsi1<30 and myrsi2 crosses under 70IF Bearish0 THENSELLSHORT 2 perpoint AT MARKETset stop trailing 10ENDIF12/03/2019 at 1:13 PM #114116SET STOP TRAILING is known to be inaccurate, replacing it with a Trailing Stop code snippet is recommended.
You can take a look at Nicolas’code https://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/, you’ll find many examples on the forum. You can also find other snippets that mimick a trailing stop function.
12/03/2019 at 1:44 PM #114120Hello Roberto, hope all is well.
Its the same issue without the trailing stop loss. Cant understand why in a lot of cases when backtesting it says nbr bars = 0 (entry time and exit time is the same) – yet it shows profit or loss.
Also why some trades do not happen even thought they meet the criteria; shows up in the backtest but not in actual trades.
Not had these issues when using standard timeframe (i.e. without multi timeframes)
12/03/2019 at 3:15 PM #114132The same bars is because it opens a trade, then the trailing stop (starting from 10 and a predefined step of 1), due a pullback within the same bar, exits the trade with either a profit or a loss.
It is very likely that in a 10-minute bar the price moves more than 10 pips; it also may occur that there’s an immediate pullback.
Be warned that if you enter more positions, despite being at different prices, ALL positions are exited at the same STOP level. ProOrder doesn’t keep separate SL’s for each position opened!
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on