# Alerts for Fisher Transform crossovers?

#### Ian_Tai

##### New member
I've been using the Fisher Transform with amount of success. Wondering if anyone has a version with an audible alert when the Fisher Transform Indicator crosses. I've looked high and low. But doesn't seem to exist.

#### BenTen

Staff member
Staff
VIP
Try this:

Code:
``````#
# TD Ameritrade IP Company, Inc. (c) 2007-2019
#

declare lower;

input price = hl2;
input length = 10;

def maxHigh = Highest(price, length);
def minLow = Lowest(price, length);
def range = maxHigh - minLow;
def value = if IsNaN(price)
then Double.NaN
else if IsNaN(range)
then value[1]
else if range == 0
then 0
else 0.66 * ((price - minLow) / range - 0.5) + 0.67 * value[1];
def truncValue = if value > 0.99 then 0.999 else if value < -0.99 then -0.999 else value;
def fish = 0.5 * (log((1 + truncValue) / (1 - truncValue)) + fish[1]);

plot FTOneBarBack = fish[1];
plot FT = fish;
plot ZeroLine = 0;

FTOneBarBack.SetDefaultColor(GetColor(1));
FT.SetDefaultColor(GetColor(8));
ZeroLine.SetDefaultColor(GetColor(5));

def bull_cross = FT crosses above FTOneBarBack;
def bear_cross = FT crosses below FTOneBarBack;

#### Ian_Tai

##### New member
Thank you. Before posting I figured out Arrows to mark the cross. Here's the entire code:

Code:
``````#
# TD Ameritrade IP Company, Inc. (c) 2007-2019
#

declare lower;

input price = hl2;
input length = 10;

def maxHigh = Highest(price, length);
def minLow = Lowest(price, length);
def range = maxHigh - minLow;
def value = if IsNaN(price)
then Double.NaN
else if IsNaN(range)
then value[1]
else if range == 0
then 0
else 0.66 * ((price - minLow) / range - 0.5) + 0.67 * value[1];
def truncValue = if value > 0.99 then 0.999 else if value < -0.99 then -0.999 else value;
def fish = 0.5 * (log((1 + truncValue) / (1 - truncValue)) + fish[1]);

plot FTOneBarBack = fish[1];
plot FT = fish;
plot ZeroLine = 0;

FTOneBarBack.SetDefaultColor(GetColor(1));
FT.SetDefaultColor(GetColor(8));
ZeroLine.SetDefaultColor(GetColor(5));

def bull_cross = FT crosses above FTOneBarBack;
def bear_cross = FT crosses below FTOneBarBack;

plot arrow = if FT crosses above FTOneBarBack then fish else Double.NaN;
arrow.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
arrow.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
arrow.SetDefaultColor(Color.GREEN);

plot arrowD = if FT crosses below FTOneBarBack then fish else Double.NaN;
arrowD.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
arrowD.SetPaintingStrategy(PaintingStrategy.ARROW_Down);
arrowD.SetDefaultColor(Color.RED);

Last edited by a moderator:

#### TrueDepth

##### Member
VIP
Thread starter Similar threads Forum Replies Date
fibonacci alerts Questions 0
Laggy scanner alerts Questions 1
Sending alerts to discord Playground 2
Strategy Alerts In ThinkOrSwim Strategies 0
Help wanted on Strategy Alerts Questions 4