Hi,
I use 2 hour bar in one of my charts, so the stop exit level set by 'Setpercenttrailing' will become very 'outdated' when a two hour bar is complete. The price may have gone very high and back down substantially so the max give back amount is much more than what I prefer.
On the other hand, I found 'Intrabar order generation' not suitable for my signal so I did not enable it.
Any way to make 'setpercenttrailing' update on every tick ?
Thanks.
Setpercenttrailing / update on every tick
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Setpercenttrailing / update on every tick
SetPercentTrailing already updates on every tick intra-bar, according to its wiki page:Any way to make 'setpercenttrailing' update on every tick ?
Is there perhaps something else in your code causing the 'outdated' behaviour? Do you, for example, use the `SetPercentTrailing()` keyword conditionally in an if statement?The SetPercentTrailing function is evaluated intra-bar and not only on close of a bar, and can exit within the same bar as the entry.