Hi there! A few weeks back I wrote a thinkscript strategy that gave fairly promising results. Because you can't automate through TOS, I decided to give props for futures a try (Apex). I am a complete newbie to C# and the ninjatrader/rithmic platforms altogether but slaved away to replicate my TS strategy in NS. Futures in general are also relatively new to me (my experience is mostly day trading options, but more recently spx 0dte). As I backtest with historical data, I get good results with tick data series but even better ones with Heiken Ashi (Minute, 1). I'll also add that the way it works out to be is fairly high frequency (a few seconds to a few minutes)... planning to tinker this as well, especially for the sake of commissions. I am aware that backtesting is inherently inaccurate and using something like heiken ashi is even worse, but at the same time would like to optimize what data I do feed to the strategy when it will come time for live deployment. How can I mimic live market data in the best possible way/what settings can I tweak to make it more representative of real information? I've seen something about playback and market replay but it doesn't seem to work with my strategy, even if I am watching the chart move with the replay (I'll call it user error for now). This may also come from my own ignorance about how futures work but when it comes to backtesting certain instruments, my impression is that they exist on a quarterly basis and therefore don't reflect what would actually happen if you threw the strategy at ES for a year? Any input/ feedback or advice for this is greatly appreciated! This is also my first post here so a general hello to everyone! <3 TL;DR Heiken Ashi YTD backtest (I am highly skeptical and feel that it needs a harsh reality check)
Totally FUBAR, because in Q1 there's no trading in the Sep ES contract. How NT is even pulling historical data for a contract that had no volume for nearly 3 months is beyond me. Plus you are basing price on ask, when it should be last. Your best bet is to run it in 3 month increments for the front month and then switch. So Mar contract until mid-March, June contract until mid-June, etc. And as mentioned above, include commish and slippage, 1-2 ticks.
Hi tess, I may be staying the obvious here, but if you are back testing on HA candles, the HA open/close levels do not reflect the underlying standard candle open/close levels. I fell into that issue with some early algo back testing, buying and selling at HA open/close levels which are very different to where price actually is at. It's fine to take signals from HA but just ensure you are not using their open/close to indicate the price bought or sold at. Your drawdown is miniscule compared to profit, especially in a sample of over 46000 trades. That's a red flag for me that something is amiss. The implied probability of your average win to lose ratio is around 33% but your win rate is 43%. Do you really have a 10% edge here, that would be massive. Too massive to be real in my experience. Not trying to shoot you down, just pointing out a couple of things that seem off. TDUK
The first test I always do is run it in MANUAL REPLAY MODE. Then you see for each tick where HA really is. You are right that it can give you a hugely different outcome. Each value on the screen is only valid for the close of that candle ( 1, 5, 15, 60 minutes...) and can be very different between the open and the close of the candle. So you cannot use the HA except for the close and only use that value in future. You should always be careful with testing strategies and do some of them manually, tick by tick to see if the software works correctly. For example: testing in replay to see at what price we cross a certain MA. Tick by tick goes very slow, so you can test every 25 ticks. If you do that you will get a wrong result because NT will not test tick by tick anymore. It will skip 24 ticks and just test tick 25. So if it crosses, you don't know when it crossed. Tick 2? Tick3?...Tick 24? $17 per trade is also a very small amount, less than 2 ticks... EDIT: I think HA levels estimate what the levels are for that candle based on available data. That's why they are different from reality. And that's why they change constantly till the close of the candle. HA candles are not calculated as standard candles. Color of the bodies can be different and change many times while the candle is not finished.