Namor
New member
Hello Ben,
How would you alter this script to mute the Stochastic signal, leaving only the IFT signal with accompanying alarms?
How would you alter this script to mute the Stochastic signal, leaving only the IFT signal with accompanying alarms?
Code:
# TD Ameritrade IP Company, Inc. (c) 2012-2020
#
declare lower;
input price = close;
input length = 30;
input slowingLength = 5;
input over_bought = 60;
input over_sold = 30;
def rainbow = reference RainbowAverage(price = price, averageType = AverageType.WEIGHTED);
plot Stochastic = sum(rainbow - Lowest(rainbow, length), slowingLength) / (sum(Highest(rainbow, length) - Lowest(rainbow, length), slowingLength) + 0.0001) * 100;
def normStochRainbow = 0.1 * (Stochastic - 50);
plot IFT = 100 / (1 + exp(-2 * normStochRainbow));
plot OverBought = over_bought;
plot OverSold = over_sold;
Stochastic.SetDefaultColor(GetColor(1));
IFT.SetDefaultColor(GetColor(2));
OverBought.setDefaultColor(GetColor(5));
OverSold.setDefaultColor(GetColor(5));
Last edited by a moderator: