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.
- Printer-friendly version
- Login to post comments
Recent blog posts
- New Release: v3.0.3 - Everything Except Autotrading
- 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

Recent comments
20 weeks 5 days ago
35 weeks 6 days ago
41 weeks 4 days ago
41 weeks 4 days ago
48 weeks 1 day ago
49 weeks 3 days ago
1 year 4 weeks ago
1 year 4 weeks ago
1 year 6 weeks ago
1 year 11 weeks ago