I came across this indicator on TradingView. The author said he added additional EMAs (13+21+55) into the code (which I did not) because you can easily do that in ThinkorSwim. Turned out this is the same version as
the one converted by
@skynetgen. I didn't want it to go to waste so I'm just dropping it here
You just treat it like a simple SMA crossover strategy and trade in the direction it's going.
View attachment 5383
thinkScript Code
Code:
# Blue Magik SSL
# I assume this is based on the popular SSL indicator
# Assembled by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/i85H2tZ8-blue-magik/
input period = 10;
input len = 10;
def smaHigh = simpleMovingAvg(high, len);
def smaLow = simpleMovingAvg(low, len);
def Hlv = if close > smaHigh then 1 else if close<smaLow then -1 else Hlv[1];
def sslDown = if Hlv< 0 then smaHigh else smaLow;
def sslUp = if Hlv< 0 then smaLow else smaHigh;
plot up = sslUp;
plot down = sslDown;
up.SetDefaultColor(GetColor(1));
down.SetDefaultColor(GetColor(0));