Setpercenttrailing / update on every tick

Questions about MultiCharts and user contributed studies.
LMC1
Posts: 50
Joined: 28 Apr 2013
Has thanked: 29 times
Been thanked: 1 time

Setpercenttrailing / update on every tick

Postby LMC1 » 03 Jun 2015

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.

User avatar
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

Postby JoshM » 03 Jun 2015

Any way to make 'setpercenttrailing' update on every tick ?
SetPercentTrailing already updates on every tick intra-bar, according to its wiki page:
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.
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?


Return to “MultiCharts”