# How to code the below strategy: Buy and Sell: based on the crossover of ‘Ehlers Fisher transform indicator’

How to code the below strategy: Buy and Sell: based on the crossover of ‘Ehlers Fisher transform indicator’

The Fisher transform formula is: y = 0.5 * ln ((1+x)/(1-x))   can not be coded in tradescript

you can use it in ambroker

```study(title="Fisher Transform Indicator by Ehlers Strategy", shorttitle="Fisher Transform Indicator by Ehlers")
Length = input(10, minval=1)
xHL2 = hl2
xMaxH = highest(xHL2, Length)
xMinL = lowest(xHL2,Length)
nValue1 = 0.33 * 2 * ((xHL2 - xMinL) / (xMaxH - xMinL) - 0.5) + 0.67 * nz(nValue1[1])
nValue2 = iff(nValue1 > .99,  .999,
iff(nValue1 < -.99, -.999, nValue1))
nFish = 0.5 * log((1 + nValue2) / (1 - nValue2)) + 0.5 * nz(nFish[1])
pos =	iff(nFish > nz(nFish[1]), 1,
iff(nFish < nz(nFish[1]), -1, nz(pos[1], 0)))
barcolor(pos == -1 ? red: pos == 1 ? green : blue )
plot(nFish, color=green, title="Fisher")
plot(nz(nFish[1]), color=red, title="Trigger")```

Thanks Algo for the reply. Its unfortunate we can not use the same in Tradescript.
Is there any way we code the same Tradescript? When one can code on moving average or MACD indicator etc (Crossover coding strategies) in Trade script, I assumed this can coded as well.
Is there any limitation in the tradescript, due to which we can not code the ‘Fisher Transform Indicator’ cross over strategy.
Regards,
Thulasee Ram

Yes there is limitation as per formula of fisher transfer it is not possible with tradescript