glendale ca usa
Posts: 97 since Sep 2017
Thanks Given: 11
Thanks Received: 88
|
#bars and force
declare lower;
input averageType = AverageType.SIMPLE;
plot Z = 0;
Z.SetDefaultColor(Color.GRAY);
Z.SetLineWeight(2);
#Z.setPaintingStrategy(paintingStrategy.SQUARES);
input fastLength30 = 1;#12, 2
input price30 = VWap;
input slowLength30 = 8;#28, 16
input averageType30 = AverageType.SIMPLE;
plot WHITE = MovingAverage(averageType30, close, fastLength30) - MovingAverage(averageType30, close, slowLength30);
WHITE.SetDefaultColor(Color.WHITE);
white.setPaintingStrategy(paintingStrategy.HISTOGRAM);
plot W = expAverage(white, 6);
#plot W2 = average(white, 6);
white.assignValueColor(if white>0 and white>w then color.green else color.gray);
input LengthFI = 6;
DEF FI = ExpAverage(data = (close - close[1]) * volume, lengthFI);
#FI.SetDefaultColor(GetColor(8));
DEF FI2 = ExpAverage(data = (close - close[1]) * volume, lengthFI -3);
#plot ZeroLine = 0;
AddLabel (yes, (("/")), COLOR.WHITE);
AddLabel (yes, ((" ")), if FI>10 then CreateColor(0, 0, 255) else if FI<-10 then CreateColor(255, 255, 0) else Color.LIGHT_GRAY);
#
AddLabel (yes, ((" ")), if FI>20 then CreateColor(0, 85, 255) else if FI<-20 then CreateColor(255, 213, 0) else Color.LIGHT_GRAY);
#
AddLabel (yes, ((" ")), if FI>50 then CreateColor(0, 128, 255) else if FI<-50 then CreateColor(255, 170, 0) else Color.LIGHT_GRAY);
#
AddLabel (yes, ((" ")), if FI>100 then CreateColor(0, 170, 255) else if FI<-100 then CreateColor(255, 128, 0) else Color.LIGHT_GRAY);
#
AddLabel (yes, ((" ")), if FI>400 then CreateColor(0, 213, 255) else if FI<-400 then CreateColor(255, 85, 0) else Color.LIGHT_GRAY);
#
AddLabel (yes, ((" ")), if FI>500 then CreateColor(0, 255, 255) else if FI<-500 then CreateColor(255, 0, 0) else Color.LIGHT_GRAY);
input PaintBars = Yes;
AssignPriceColor (if !PaintBars then Color.CURRENT else if FI>400 then CreateColor(0, 213, 255) else if FI<-400 then CreateColor(255, 85, 0) else Color.CURRENT);
#UpBar > DownBar[0]
#input PaintBars = Yes;
AssignPriceColor (if !PaintBars then Color.CURRENT else if FI>500 then CreateColor(0, 255, 255) else if FI<-500 then CreateColor(255, 0, 0) else Color.CURRENT);
WHITE.assignValueColor(if !PaintBars then Color.CURRENT else if FI>500 then CreateColor(0, 255, 255) else if FI<-500 then CreateColor(255, 0, 0) else Color.CURRENT);
WHITE.assignValueColor(if FI>400 then CreateColor(0, 213, 255) else if FI<-400 then CreateColor(255, 85, 0) else Color.CURRENT);
|