Canada
Posts: 1 since Jan 2014
Thanks Given: 0
Thanks Received: 0
|
Hello guys, these are a few simple indicators that I use on ToS. Can anyone help me to convert it into easylanguage? thanks alot!
declare lower;
input length = 10;
input averageType = AverageType.SIMPLE;
def strat = close("VIX")/close("VXV");
plot MovAvg = MovingAverage(averageType,strat,length);
MovAvg.SetPaintingStrategy(PaintingStrategy.LINE);
MovAvg.AssignValueColor(if MovAvg < 0.92 then color.Green else color.RED);
alert(MovAvg > 0.92, "VIX/VXV ratio is over 0.92! Current value is" + MovAvg, alert.bar, Sound.Ring);
-----------------------------------------------------------------------------------
declare lower;
input length = 10;
input lookback = 15;
input averageType = AverageType.SIMPLE;
def ratioa = close("VIX") / close("VXV");
def MovAvga = MovingAverage(averageType, ratioa, length);
def ratiob = close("VIX")[lookback] / close("VXV")[lookback];
def MovAvgb = MovingAverage(averageType, ratiob, length);
plot direction = MovAvga / MovAvgb - 1;
direction.setpaintingStrategy(PaintingStrategy.HISTOGRAM);
direction.AssignValueColor(if direction < 0 then Color.GREEN else Color.RED);
# alert(MovAvg < 0.93, "VXV/VIX ratio is under! Current value is" + MovAvg, alert.bar, Sound.Ring);
---------------------------------------------------------------------------------------
declare lower;
input length = 21;
def closeLog = Log(close[1] / close[2]);
def SDev = stdev(closeLog, length)* Sqrt(length / (length – 1));
def m= SDev * close[1];
plot spike = (close[0] – close[1]) / m;
spike.setPaintingStrategy(PaintingStrategy.HISTOGRAM);
spike.AssignValueColor(if close > close[1] then Color.UPTICK else if close < close[1] then Color.DOWNTICK else GetColor(1));
def currentSpike = (AbsValue(close – close[1])) / m;
Alert(currentSpike >= 1.0, "Spike >= 1.0!", Alert.TICK, Sound.Chimes);
|