Exit on same day close

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
weird
Full Member
Full Member
Posts: 14
Joined: Fri Oct 16, 2009 10:33 pm
Location: Sydney, Australia
Contact:

Exit on same day close

Post by weird »

Hi, hope this has not been covered elsewhere, trying to work out the code for entering on say the open, and exiting at the price of the same day close, so the trade is only open for one day.

Any help appreciated.
LeviF
Roundtable Knight
Roundtable Knight
Posts: 1436
Joined: Mon Dec 22, 2003 12:24 pm
Location: Des Moines, IA
Contact:

Post by LeviF »

Try putting your exit orders in the "entry order filled" script.
weird
Full Member
Full Member
Posts: 14
Joined: Fri Oct 16, 2009 10:33 pm
Location: Sydney, Australia
Contact:

Post by weird »

Thanks Levijean,

I used the following code where suggested,


broker.ExitAllUnitsAtLimitClose(0)

appears to work a treat.

Much thanks !
Post Reply