Here's my reproducible strategy test code:
protected override void Initialize() {
CalculateOnBarClose = true;
TraceOrders = true;
EntriesPerDirection = 1000;
EntryHandling = EntryHandling.AllEntries;
}
protected override void OnBarUpdate() {
double hi = High[1] + (10*TickSize);
double lo = Low [1] - (10*TickSize);
Print("Bar " +CurrentBar +" Buy "+lo +" Sell " +hi);
EnterLongLimit ( 1, lo );
EnterShortLimit( 1, hi );
}
Here's the output:
Bar 148 Buy 1920.25 Sell 1926.75
5/16/2010 3:10:01 PM Entered internal PlaceOrder() method at 5/16/2010 3:10:01 PM: Action=Buy OrderType=Limit Quantity=1 LimitPrice=1920.25 StopPrice=0 SignalName='' FromEntrySignal=''
5/16/2010 3:10:01 PM Entered internal PlaceOrder() method at 5/16/2010 3:10:01 PM: Action=SellShort OrderType=Limit Quantity=1 LimitPrice=1926.75 StopPrice=0 SignalName='' FromEntrySignal=''

Comment