as I can not connect to zenfire after the upgrade to NTx18 I´m working round with my scripts to see what I can improve. I have a simple idea now but this doesn´t work: I want to add a SetTrailStop if there is an overfill. So I added to my "longstrategy" (where there should only be long trades referring to the conditions) in case of shorts (I added in OnBarUpdate as I understand from the helpguide that SetTrailStop will not work in OnExecution):
else if (Position.MarketPosition == MarketPosition.Short)
SetTrailStop(CalculationMode.Ticks, 12);
When I do simulate an overfill with simulated datafeed there is no trailstop for my overfill.
and there is also no trailstop with
SetTrailStop("", CalculationMode.Ticks, 12, false);
Thank you!
Best regards
Tony
Comment