Automating an Open Range Breakout

Questions about MultiCharts and user contributed studies.
KeyDiver
Posts: 8
Joined: 29 May 2010
Location: Trinity, Florida

Automating an Open Range Breakout

Postby KeyDiver » 29 May 2010

An "Open Range Breakout" system uses data up through today's close to determine a distance from tomorrow's opening price where it will either buy long or sell short. This is the strategy buy statement right out of one such system-

if MarketPosition = 0 then Buy ("Long") Next Bar at Open of Tomorrow + range Stop;

This works very well with historical data on both charts and in the Backtester. I tested it today when the market is closed. This statement produced an immediate live order. The order price was yesterday's open price plus the calculated offset. The symbol was 6AM0, the Australian Dollar on Globex. Now, the symbol dictionary tells me this contract is closed today, Saturday afternoon.

Can you explain 1) why this code put in a live order when the market was closed, and 2) what should be done to ensure that this strategy statement will work the same live as it does on history bars?

Thanks.

User avatar
TJ
Posts: 6583
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 970 times
Been thanked: 1907 times

Re: Automating an Open Range Breakout

Postby TJ » 01 Jul 2010

... 2) what should be done to ensure that this strategy statement will work the same live as it does on history bars?

Thanks.


always do live tests of your code on paper trading account before
going live on real money account.

KeyDiver
Posts: 8
Joined: 29 May 2010
Location: Trinity, Florida

Re: Automating an Open Range Breakout

Postby KeyDiver » 01 Jul 2010

... 2) what should be done to ensure that this strategy statement will work the same live as it does on history bars?

Thanks.


always do live tests of your code on paper trading account before
going live on real money account.


All testing orders are done on paper trade accounts. Read closely, the problem is that MC produced a live order at a time when the contract's market was closed. In my view, this says that MC is ignoring the Session Times as defined in QuoteManager.


Return to “MultiCharts”