Does anyone know how I can change the partially modified script below so as to not display the inputs. I received the following errors:
Incompatible parameter: "XLRE" at 10:5
Expected double at 10:5
Expected class com.devexperts.tos.thinkscript.data.SymbolType at 17:29
Expected class com.devexperts.tos.thinkscript.data.SymbolType at 17:76
Thanks!
Incompatible parameter: "XLRE" at 10:5
Expected double at 10:5
Expected class com.devexperts.tos.thinkscript.data.SymbolType at 17:29
Expected class com.devexperts.tos.thinkscript.data.SymbolType at 17:76
Code:
#
# TD Ameritrade IP Company, Inc. (c) 2015-2023
#
declare lower;
def price1 = FundamentalType.CLOSE;
def price2 = FundamentalType.CLOSE;
def symbol1 = ("SPY");
def symbol2 = ("XLRE");
def multiplier1 = 1.0;
def multiplier2 = 1.0;
def fastLength = 4;
def slowLength = 40;
def averageType = AverageType.SIMPLE;
plot Ratio = (multiplier1 * Fundamental(price1, symbol1)) / (multiplier2 * Fundamental(price2, symbol2));
plot FastAvg = MovingAverage(averageType, Ratio, fastLength);
plot SlowAvg = MovingAverage(averageType, Ratio, slowLength);
Ratio.DefineColor("Up", Color.UPTICK);
Ratio.DefineColor("Down", Color.DOWNTICK);
Ratio.AssignValueColor(if Ratio >= Ratio[1] then Ratio.Color("Up") else Ratio.Color("Down"));
FastAvg.SetDefaultColor(GetColor(1));
SlowAvg.SetDefaultColor(GetColor(4));
Thanks!