Thanks for your reply and clarification.
So your situation is that you enter a position and you have no stop. When your profit reaches +1% of your entry then you want to apply a trailing stop of 0.1%.
To do that you will have to use your logic to calculate the 1% level and once price has reached that level, in OnBarUpdate() you would have to enable the SetTrailStop.
You see, when you put the SetTrailStop in the initialize method it immediately places the trailstop as soon as you enter but this is not what you want. So you will have to apply the SetTrailstop in the OnBarUpdate when price reaches the +1% level.
You can certainly tie each trailstop with each entry by using the signals names.
Comment