1st in an installment, how to migrate your long term (days, months, years) Forex strategy to short term (minutes).
Earlier this evening I was trying to explain NT auto-trading to my son who has never traded. I'm a get-rich-slowly sort (100% / month on paper) and he's young, the get-rich-fast 30-something sort with no platform experience.
We threw up the canned SimpleMAStrategy and backtested on 6 months spot Forex data in NT7.
It performed badly, as expected, so I showed him how to tweak it by unlocking the code to establish his own test bed, make changes, backtest again, and keep backtesting manually until he's ready to optimize.
To make a long story short, I've never been profitable fooling around with SimpleMA or trying to trade the 1 minute spot Forex market by bot, but to my surprise tonight SimpleMA optimized to countertrend trading on 1 minute data, and kept optimizing the same way after repeated tests.
This means apparently the canned strategy is desperate to reverse the roles of fast and slow SMA for 1 minute spot currency data at the moment. Specifically it wants to replace the slow SMA with the bar close and turn the fast SMA into the slow SMA, essentially making the fast crossover of the close the opposite signal (e.g., buy instead of sell and vice versa).
We've all seen this from time to time, but I've never seen anything so robust in short time frame auto-trading.
The bottom line appears to be, SMA in a bot works over the long haul if price action is random (ranging) if you trade counter trend, which it does most of the time, and fails badly if price action begins to trend, which it does 20-30% of the time. No surprises there.
The object of this thread therefore is to decide whether this result is a flash in the pan or otherwise how to determine the onset of trending in 1 minute spot Forex data. I'll share the strategy in the next post, but in the meantime welcome any posts from folks dealing with the same issue.
As usual constructive contributors will own the final bot if it turns out to be profitable, and excuse me it turns out I've badly miscalculated
Will do as soon as I re-stabilize NT7 .... it looks like the infamous "Failed to execute DB job 'ExecutionUpdateJob': ObjectSpace: Entity Object was not Updated - NinjaTrader.Cbi.Execution" error has persisted to Version 7.0.1000.2
Edited to add: this issue started a few hours after I started forward sim testing the short time frame strategy on the EUR.CAD pair while another strategy was running live on same instrument (the strategy that feeds & clothes me :-/). Given the problem NT has with virus checkers I'm getting the feeling NT may have a bug in its file handler(s) (related to locking? race condition?), including the database.
Last edited by bnichols; March 7th, 2011 at 09:17 AM.
Just an interim installment. With the original post I meant to show one way strategy backtesting can lie. The idea was to share the solution, with the expectation readers would be wiser.
I already knew the best optimized (apparently profitable) strategy would fail in real-life short time frame spot Forex trading mostly due to spread--it's how Forex brokers make money, after all .
I couldn't continue the chapter without knowing the next chapter--what everybody want's to know--how to make a short time frame Forex bot profitable.
At the time I thought it would be simple. Turns out not to be
You have to know how to trade your instrument in your time frame profitably to program a bot.
Since the first boastful post I've been actively discretionary trading short term spot Forex "with extreme prejudice" to learn how and am only now approaching profitability. It will be a while before I can educate a bot.