I'm having some intermittent trouble with the following;
I am using this line of code to save the prior trade as a private double in the variables section.
protected override void OnPositionUpdate(IPosition position)
{
if (position.MarketPosition == MarketPosition.Long) priorTrade = position.AvgPrice;
Print(Instrument.FullName + " " + position.AvgPrice);
}
I loaded the strategy today which should have placed a long limit to buy, when it didn't I removed this line of code below referencing the prior trade and reloaded the strategy which placed the order.
priorTrade != gNumb().Line4[0]
Regards,
suprsnipes

Comment