Cookiemonster64 said:
30K, I could try to convert it to TOS if you shared the source. I'm not great at ThinkScript but have been trying to learn.
I couldn't get this to compile and I'm too lazy to do the rest. This is TOS.
input rsiPeriod = 13;
input rsiPrice = close;
input signalSmoothing = 7;
input bollingerLength = 34;
input bollingerStdDev = 2.0;
def rsi = RSI(rsiPrice, rsiPeriod);
def bollingerBasis = reference BollingerBands(rsiPrice, bollingerLength, bollingerStdDev).MidLine;
def bollingerUpper = reference BollingerBands(rsiPrice, bollingerLength, bollingerStdDev).UpperBand;
def bollingerLower = reference BollingerBands(rsiPrice, bollingerLength, bollingerStdDev).LowerBand;
def TDI = (rsi - bollingerLower) / (bollingerUpper - bollingerLower) * 100;
def signalLine = MovingAverage(AverageType.SIMPLE, TDI, signalSmoothing);
def ema5 = ExpAverage(close, 5);
def ema12 = ExpAverage(close, 12);
def longEntry = TDI crosses above 50 and ema5 crosses above ema12;
def shortEntry = TDI crosses below 50 and ema5 crosses below ema12;
plot BuySignal = longEntry;
BuySignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
BuySignal.SetDefaultColor(Color.GREEN);
plot SellSignal = shortEntry;
SellSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
SellSignal.SetDefaultColor(Color.RED);