- I EnterLong/EnterShort using quantity and a signal name (which I call "signalName"). signalName is a global variable.
- In OnOrderUpdate (where OrderState == OrderState.Filled and order.Name equals signalName), I call a function to set a trail stop
- In this function, I attempt to set a trail stop using the format: SetTrailStop(signalName, CalculationMode.Price, target, true)
Unfortunately, the trail stop doesn't get set. I never see an order generated for it.
If I SetTrailStop without the signal name (for example, with CalculationMode.Ticks and a value), it works.
Am I doing something wrong? Is SetTrailStop position level -- e.g., can I set it at an order level? I don't get an error message -- it just fails quietly. Thanks in advance.
Comment