MTF strategy triggers in the past when trading real time

FMcap

New member
I've been working in TOS for about 3 months now. I never used it much because it does not provide for full automation. However, I've found I really like the stock indicators and the entire platform and is now my preferred trading platform. I recently began creating strategies in TOS, because it is so easy to quickly write a fairly complex strategy and backtest. I've never put much stock in backtests, because they are very rarely accurate. The more complex the strategy, the less likely any backtest results are accurate. This is almost always the case on MTF strategies. However, I've started noticing some interesting behavior following MTF strategies in real-time.

Have you experienced trades that trigger in the past when trading them in real time? I have a MTF strategy that has a primary of 1 min and secondary of 3 min. The strategy looks at the 3 min for confirmation. Many times, I'll get trades that "appear" 2 bars back. Many times they appear then disappear. Clearly these trades are looking at the 3 min bar to confirm that the trade is good. And as that 3 min bar has yet to complete, it triggers and un-triggers the trade on the 1 min chart.

When creating the strategy, my intention was to look at the 3 bar, in it's real time state, at the close of each 1 min bar. It is less than helpful to have a trade get triggered 3 bars back after the 3 min bar finally closes. Additionally, this greatly skews any backtesting results as it will include trades that you could have never executed in real time. Is there a way to only have a 1 min trade get triggered based on the state of the 3 min bar in real time? Both in real-time and during backtesting? I can't find any documentation on how TOS processes bars in a MTF strategy.

In other platforms, this is a very common issue during backtesting strategies, but not real-time. To overcome this, you have to replay the historical data in tick sequence so the platform can build each bar series as it happened in real time. It's very resource intensive, but you can then evaluate exactly what the 3 min bar looked like as a 1 min bar was closing. I don't believe TOS is behaving this way. It's making a trade decision on the 1 min based on the final disposition of the 3 min.
 

rad14733

Well-known member
VIP
@FMcap Welcome to the usethinkscript forums... It sounds like you are learning the inefficiencies of backtesting and MTF, at least in Thinkorswim... I believe the crux of the problem stems from the inadequacy of the AddOrder() function itself...To be blatantly honest, I find backtesting using AddOrder() in Strategies to be utterly frustrating... I've found that manually backtesting is far more productive and realistic... OnDemand is yet another poorly implemented feature that will most likely never see improvements...

Did you have a specific question or were you just reflecting on your experiences to date...???
 

FMcap

New member
I was just wondering if I was missing something. Like some property to have TOS not make a trade in the past. I fully expect strategies to make fictitious trades during a backtest, it's just surprising to see it happen in real time. Sounds like this is just the nature of the beast. Obviously, the closer the time frames are together, the more likelihood that both bars will be open at the same time, leading to this behavior.
I'll continue to use the platform for trading and generating ideas quickly. I'll just rewrite them on other platforms to test where I know I can mitigate this behavior. I have to do this anyway if I want to automate the strategy.
 

FMcap

New member
@rad14733 Yes, automation is one of the first capabilities I looked for, which is unfortunate. But if they turned it on, they would be overwhelmed with unhappy customers losing money relying on their strategies. I for one, would like to see it turned on, but I doubt it will ever happen.
Hence, any strategy that has potential, I end up writing in another platform. Problem is, I like a lot of the indicators in TOS that are not available in other systems. I've ended up writing a lot of indicators in NT8 and MT5.
 

rad14733

Well-known member
VIP
There is no "turning it on", it would have to be coded into the platform and that has never been done... It's not like it was there and then turned off... And the capabilities of AddOrder() are lacking for proper implementation... You can code Conditonal Orders, however... There are videos on YouTube that explain it in detail...
 

rad14733

Well-known member
VIP
As a developer, my guess is that they have coded it, at some point, and made a decision to not deploy. But, just a guess.

This platform was originally designed mainly for retail investors and I don't believe that it was ever coded into the platform... Regardless, I doubt we will ever see auto-trading, but you never know... I think they have enough problems in other areas that require attention... I've heard that their coding team is quite small these days...
 
Thread starter Similar threads Forum Replies Date
YungTraderFromMontana A Re-Painting Heiken MTF Strategy Strategies 52
K ADX MTF Custom 0
R MTF Labels and a Question Questions 0
F Previous H/L MTF Questions 2
R MTF Script: changing signals via input? Questions 3

Similar threads

Top