Ok, when I enter a trade TraceOrders tells me...
Entered internal PlaceOrder() method at 4/4/2007 11:30:00 AM: Action=SellShort OrderType=Limit Quantity=2 LimitPrice=1.3414 StopPrice=0 SignalName=EXTREME short 3 4/4/2007 11:30:00 AM' FromEntrySignal=''
The TrailStop get's set to it's initial value, which is 12 ticks...
Entered internal SetStopTarget() method at 4/4/2007 11:30:00 AM: Type=TrailStop FromEntrySignal='EXTREME short 3 4/4/2007 11:30:00 AM' Mode=Ticks Value=12 Currency=0 Simulated=False
Then I run my TrackTrade() in OnBarUpdate()...
if (Position.MarketPosition != MarketPosition.Flat) {
if (Position.GetProfitLoss(Close[0], PerformanceUnit.Points) >= 4){
int stopLoss = 2;
Print("Setting stop to "+stopLoss+" in "+instrumentName+" at "+Time[0]);
SetTrailStop(orderName, CalculationMode.Ticks, stopLoss, false);
}
The Print() outputs properly, indicating that this indeed get's called, however,TraceOrders does not display that the TrailStop() get's changed from 12 to 2.
Steer me in the right direction please.
Comment