Automated Trading Machine (ATM) makes it simple to remove fear and greed from your trading. Automated trading is no longer just for the rich or nerdy. Our revolutionary software runs on your computer, using your trading rules, but none of your emotions. There's just one requirement - you know how to use a mouse. Learn more...
PWB#6 - The Forward Look
I heard a common mistake when creating a backtesting program, is to use the close price of a bar for decision making during that same bar.
The problem is, until that bar is finished, you don't know what the close price will be. You know it while backtesting because it's historical data. But not in real-time trading, and real-time trading is what backtesting is trying to emulate.
And it might not be so obvious that this is going on. If you're explicitly using the close price, then sure, it's obvious. But if you're using an indicator value that is calculated from the close, you might not realise.
Anything related to the close of the bar, can only be acted upon in the next bar.
Thanks to Trader Eyal for this one.
Recent blog posts
- Mid July 2010 Update
- Start of June 2010 Update
- New Release: v3.0.2 - Copy, better error message, more options
- New Release: v3.0.1 - The Stabilise-ening
- Ah, The First Bug [Fixed in v3.0.1]
- New Release: v3.0.0 - The Rewrite
- Start of February 2010 Update
- End Of 2009 Update
- New Release: v2.0.10
- New Release: v2.0.9 - Free
Recent comments
- API
1 week 3 days ago - Just added this wiki entry to
2 weeks 3 days ago - Ok thanks for clarifying
2 weeks 3 days ago - First let me explain the
2 weeks 3 days ago - Hey Sharky
Just wondering
2 weeks 4 days ago - Thanks for the reply Sharky.
2 weeks 4 days ago - Hi Anthony, thanks for your
2 weeks 4 days ago - Or you can go with
4 weeks 6 days ago - Which version?
9 weeks 4 days ago - Same bug here
9 weeks 5 days ago

Comments
Post new comment