First, many thanks for this, that did exactly what I was looking for with
calcualting the stop values (both sell and buy, sell is very similar but signs
are reversed)
I am now trying to prevent the stops from widening and have been unable to
achieve this:
TradeStation:
if fixValue < (L - finalBuyStop ) then displayBuyStop = (L - fixValue) else
displayBuyStop = finalBuyStop;
I translated this as:
displayBuyStop = IIf(averagePrice >= Ref(averagePrice, -1) &&
Ref(averagePrice,-1) >= Ref(averagePrice,-2), Ref(finalBuystop,-1),
finalBuystop);
But I am finding that the stop still widens. (still need to code the flip over
and not displaying when the trend is down)
The other problem I am battling with is having the the sellStop working in the
same way and automatically changing over. In TradeStation I finish up with two
indicators which displays large dots.
Is it better to use a staircase display in this case?
Many thanks in advance
Marinus
--- In [email protected], "mac_bosh" <m...@...> wrote:
>
> Hi,
>
> Something like this ...
>
> initialBuyStop =
> iif(averagePrice > Ref(averagePrice, -1)
> && Ref(averagePrice,-1) < Ref(averagePrice,-2), LOW - fixValue,
> initialBuyStop);
>
>
> finalBuyStop = iif(fixValue < LOW - initialBuyStop, LOW - fixValue,
> initialBuyStop);