Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Can Ninjatrader perform autotrading without problems?
I can't tell from your post but was it a 4 tick loss in backtesting because it exited on the same bar as the entry. If so, that can be fixed by checking to make sure CurrentBar != entryBar;
Can you help answer these questions from other members on NexusFi?
I want to emphasize that backtesting is the most important aspect in strategy development. Of course you need to understand how to do it properly. In your example you need a tick data series for the execution.
If done correctly backtesting will be exactly as replay and live trading.
I agree that aside from slippage, the strategy should be the same in BT, replay, and live. However, there are bar types that cause problems and don't backtest the same as replay and live. The NT provided renko and linebreak bartypes are 2. Other issues that can cause problems with BT are any tick based bartype may not be the same at times because of timestamp issues. From what I understand tick data doesn't have timestamps until they are written to the historic data server. So, those timestamps are artificial in a sense. At times, they are wrong and cause your BT orders to show up in different locations on your chart that aren't even close to the right place. I was using the Viper system at one time and their strategies were built for either volume or tick data, can't remember which. They were horrible. I'd have trades that didn't even show up in backtesting but were there in live and vice versa.
Couple other things to consider is that your default session needs to have a definite end time like 11:59 PM. That way a bar that is in progress at 11:59 PM will be terminated at 11:59 and a new bar will start each day. This solves the problem of looking at a chart one day, seeing an entry at a specific time and going back to that entry tomorrow or any other time in the future and that same entry isn't there. That's because you start your chart from a different day each time you look at it. Therefore your first bar is different causing every bar after that to be different from when you first looked at that pattern. So by having your session start over each day the way I described, you are forcing your backfill data to be the same every time. Much better chance of having those patterns the same from day to day whether you have 1 day or backfill data or 100.
You really must sync your computer time with an atomic clock every day. I use a free utility called Abouttime. https://arachnoid.com/abouttime. I've used it for years and never worry about it. Works well.
There are other issues as well but I can't seem to remember them right now. I'll add to this post if I remember.
I have to say BetterRenko works perfectly. Just had to give a plug to aslan who wrote the BR.
Could you elaborate on what "correctly" is? According to you comment you must have something specific you can give us as opposed to all of us going back and forth on what can and can't be done.