I have a 1min BarOnClose=false strategy that I have been running without problems on a realtime basis.
I would like to change the functionality to use it simply as batch uploader of bracket-orders to Interactive Brokers.
I would like to run it after the close as this is what I add/subtract from to derive the respective StopIn Long/Short levels.
I suppose the best way to run it (please offer alternatives) is as a backtest on a folder of the Tradeable instruments.
It would then fire the OCA groups acrros to IB after each instrument test.
Which order functions would I best use to place contingent OCA's?
Which feature/flafg do I use to allow the orders to be delivered as Inactive so they can be checked in the IB Trrader Workstation before manually being activated by a trader?
protected override void Initialize()
{
Add(PeriodType.Day, 1);
CalculateOnBarClose = false;
}
protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
if (Bars.FirstBarOfSession)
{
firstDailyOpen = Open[0];
lastDailyClose = Closes[1][0];
}
Because I am putting the orders in before the next open in the case of Equities, and after in the case of the 24hr FX market, I want to check if the last bar read was the end of the final daily session or start of the next incomplete session
Can you please suggest which functions to look at.
Thanks
Comment