Page 1 of 1

Exit on same day close

Posted: Thu Nov 12, 2009 10:35 pm
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.

Posted: Thu Nov 12, 2009 10:57 pm
by LeviF
Try putting your exit orders in the "entry order filled" script.

Posted: Thu Nov 12, 2009 11:38 pm
by weird
Thanks Levijean,

I used the following code where suggested,


broker.ExitAllUnitsAtLimitClose(0)

appears to work a treat.

Much thanks !