glendale ca usa
Posts: 97 since Sep 2017
Thanks Given: 11
Thanks Received: 88
|
declare lower;
#FLIPPER_FISHER_CCI
def hh0 = Highest(high, 30);
def ll0 = Lowest(low, 30);
def result0 = if hh0 == ll0 then -100 else (hh0 - high) / (hh0 - ll0)* (-100);
plot WR0 = if result0 >= 0 then 30 else result0 +4;
#WR0.ASSignValueColor(if wr0 >WR0[1] then color.green ELSE if wr0<WR0[1] then color.RED else color.gray);
WR0.SETDefaultColor(COLOR.WHITE);
WR0.SETLineWeight(2);
input lengthPercent = 30;#60#30
input over_BoughtPercent = -20;
input over_SoldPercent = -80;
#input price = close;
input averageTypePercent = AverageType.WILDERS;
#William
PLOT MIDDLE = 0;
middle.setStyle(curve.LONG_DASH);
#PLOT line = -20;
#line.setPaintingStrategy(paintingStrategy.DASHES);
def hh = Highest(high, lengthPercent);
def ll = Lowest(low, lengthPercent);
def result = if hh == ll then -100 else (hh - close) / (hh - ll) * (-30);
plot WR = if result >= -20 then 20 else result;
WR.HIDE();
WR.ASSignValueColor(if wr >0 then color.green ELSE if wr <0 then color.RED else color.gray);
def hh_ = Highest(high, lengthPercent);
def ll_ = Lowest(low, lengthPercent);
def result_ = if hh_ == ll_ then -30 else (hh_ - close) / (hh_ - ll_) * (-100);
#plot WR2_ = -if result_ >= -20 then 20 else result_;
#white line
plot WR_ = -if result_ <= -20 then 20 else result_;
WR_.SETLineWeight(2);
WR_.SETDefaultColor(COLOR.WHITE);
WR_.assignValueColor(if wr_<= -20 then color.red else color.white);
WR_.HIDE();
##============================================
################################
#####################################
#####################################
##FIHER###############################
input priceF = hl2;
input lengthF = 4;
def maxHigh = Highest(priceF, lengthF);
def minLow = Lowest(priceF, lengthF);
def range = maxHigh - minLow;
def value = if IsNaN(priceF)
then Double.NaN
else if IsNaN(range)
then value[1]
else if range == 0
then 0
else 0.66 * ((priceF - minLow) / range - 0.5) + 0.67 * value[1];
def truncValue = if value > 0.99 then 0.999 else if value < -0.99 then -0.999 else value;
def fish = 0.5 * (Log((1 + truncValue) / (1 - truncValue)) + fish[1]);
##PERCENT WILLIAM RSI ### ### 5MIN####
###########################
input lengthPercent5 = 14;#30
input over_BoughtPercent5 = -20;#20
input over_SoldPercent5 = -100;#80
#input price = close;
input averageTypePercent5 = AverageType.WILDERS;
def hh5 = Highest( high, lengthPercent5);
def ll5 = Lowest(low, lengthPercent5);
def result5 = if hh5 == ll5 then -100 else (hh5 - close) / (hh5 - ll5) * (-100);
plot WR5 = if result5 > 0 then 0 else result5 / 100;
WR5.HideBubble();
WR5.Hide();
WR5.SetDefaultColor(GetColor(1));
WR5.AssignValueColor(if WR5 < over_SoldPercent then Color.MAGENTA else if WR5 > over_BoughtPercent then Color.CYAN else Color.YELLOW);
WR5. SetLineWeight (2);
WR5.HIDE();
###########################################################
#MIXED FT WITH WR5 ################ ADDED SMA FOR SMOOTHING
plot FTWR5 = -4 * fish / .3 * WR5 ;#/SMA;
FTWR5.HideBubble();
#FTWR5.SetDefaultColor (Color.YELLOW);
FTWR5.AssignValueColor(if FTWR5 > 0 then Color.YELLOW else if FTWR5 < 0 then Color.DARK_GRAY else Color.CURRENT);
#FTWR5.SetLineWeight(2);
FTWR5.SetLineWeight(2);
FTWR5.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
FTWR5.setLineWeight(5);
FTWR5.AssignValueColor( IF FTWR5>0 AND FTWR5<.9 THEN COLOR.WHITE ELSE IF FTWR5 > 0 then Color.yellow ELSE IF FTWR5>FTWR5[1] AND FTWR5<0 THEN COLOR.CYAN else Color.white);
input lengthC = 14;
def priceC = close + low + high;
def linDev = LinDev(priceC, lengthC);
plot CCI = 20* if linDev == 0 then 0 else (priceC - Average(priceC, lengthC)) / linDev / 4;
#CCI.SETDefaultColor(COLOR.LIME);
CCI.HideBubble();
CCI.SetLineWeight(1);
CCI.DefineColor("Up", Color.CYAN);
CCI.DefineColor("Down", Color.red);
CCI.AssignValueColor(if CCI > 0 then CCI.Color("Up") else if CCI < 0 then CCI.Color("Down") else GetColor(1));
cci.setLineWeight(2);
cci.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
cci.setLineWeight(5);
#END CODE
|