When I originally read about "stoptypenbar" I thought it would trail a stop
loss 1 pip under nbars.

This would mean that with a value of 1 the stop would move up every bar and
as soon as price went 1 pip below the previous bar the trail stop would be
hit.  A value of two would mean that the stop would move up every bar and as
soon as price went one pip below the  bar two bars before the trail stop
would be hit etc.

What code would work for this type of trailing stop which would not limit
gains as per the "stoptypenbar" setting in Amibroker?

thanks

Reply via email to