I've got a strategy that sets a trailing stop upon execution. The trailing stop does not trail the price though. After reading the helpfile, I believe it's because I've used SetTrailStop outside of OnBarUpdate. I had done this intentionally thinking the TrailStop would automatically trail.
If I shift SetTrailStop inside of OnBarUpdate, does it place a new order / cancel previous order on every tick? If it does, does it know not to place the order if the tick is lower than the previous tick (for a long)?
Thanks
Comment