glendale ca usa
Posts: 97 since Sep 2017
Thanks Given: 11
Thanks Received: 88
|
#OPEN_DOTS
#/////////// from OPEN_CLOSE_SIMPLE
#PRICE_OHLC4
#OPEN_CLOSE_SIMPLE
#///////////
#note: works best at higher time frames
declare lower;
def GREEN2 = CLOSE;
DEF WHITE2 = ohlc4;
def RED2 = OPEN;
DEF YELLOW2 = HLC3;
DEF MAGENTA2 = hl2;
#addlabel(yes, "G/R",if GREEN2>RED2 then color.GREEN else color.RED);
#addlabel(yes, "R$", if data>data2 then color.green else color.RED);
#.................................................
#MAGENTA
##addlabel(yes, " M ", if magenta2>green2 and magenta2>red2 then color.MAGENTA else if magenta2<green2 and magenta2<red2 then color.LIGHT_GREEN else color.gray );
plot M = if yellow2 >= 0 then .02 else Double.NaN;
M.SetPaintingStrategy (PaintingStrategy.SQUARES);
M.SetLineWeight (4);
M.AssignValueColor(if magenta2>green2 and magenta2>red2 then color.MAGENTA else if magenta2<green2 and magenta2<red2 then color.LIGHT_GREEN else color.gray );
#addlabel(yes, "WM", if magenta2>WHITE2 then color.GREEN else if magenta2<WHITE2 then color.RED else color.gray );
#WM
##addlabel(yes, "WM", if white2>white2[1] and magenta2>WHITE2 then color.GREEN else if white2<white2[1] and magenta2<WHITE2 then color.RED else color.gray );
plot WM = if yellow2 >= 0 then .01 else Double.NaN;
WM.SetPaintingStrategy (PaintingStrategy.SQUARES);
WM.SetLineWeight (4);
WM.AssignValueColor(if white2>white2[1] and magenta2>WHITE2 then color.GREEN else if white2<white2[1] and magenta2<WHITE2 then color.RED else color.gray );
#T1
#addlabel( YELLOW2>YELLOW2[1] AND WHITE2>WHITE2[1] AND MAGENTA2>MAGENTA2[1], "T1", color.GREEN);
#T2
#addlabel(YELLOW2<YELLOW2[1] AND WHITE2<WHITE2[1] AND MAGENTA2<MAGENTA2[1], "T2", color.red);
plot T1 = if yellow2 >= 0 then .0 else Double.NaN;
T1.SetPaintingStrategy (PaintingStrategy.SQUARES);
T1.SetLineWeight (4);
T1.AssignValueColor(if YELLOW2>YELLOW2[1] AND WHITE2>WHITE2[1] AND MAGENTA2>MAGENTA2[1] then color.cyan else if YELLOW2<YELLOW2[1] AND WHITE2<WHITE2[1] AND MAGENTA2<MAGENTA2[1] then color.red else color.gray );
plot Zero= -.01;
Zero.setLineWeight(2);
Zero.setDefaultColor(color.white);
#Y/W
addlabel(YELLOW2>WHITE2, "1", color.GREEN);
plot ad1 = if yellow2 >= 0 then -.02 else Double.NaN;
ad1.SetPaintingStrategy (PaintingStrategy.SQUARES);
ad1.SetLineWeight (3);
ad1.AssignValueColor(if YELLOW2>WHITE2 then color.cyan else color.gray );
#YWM
addlabel( YELLOW2>YELLOW2[1] AND YELLOW2>MAGENTA2 AND MAGENTA2<WHITE2 AND YELLOW2>WHITE2, "2", color.green);
plot ad2 = if yellow2 >= 0 then -.03 else Double.NaN;
ad2.SetPaintingStrategy (PaintingStrategy.SQUARES);
ad2.SetLineWeight (3);
ad2.AssignValueColor(if YELLOW2>YELLOW2[1] AND YELLOW2>MAGENTA2 AND MAGENTA2<WHITE2 AND YELLOW2>WHITE2 then color.cyan else color.gray );
#YMW
addlabel( YELLOW2>YELLOW2[1] AND YELLOW2>MAGENTA2 AND MAGENTA2>WHITE2 AND YELLOW2>WHITE2, "3", color.green);
plot ad3 = if yellow2 >= 0 then -.04 else Double.NaN;
ad3.SetPaintingStrategy (PaintingStrategy.SQUARES);
ad3.SetLineWeight (3);
ad3.AssignValueColor(if YELLOW2>YELLOW2[1] AND YELLOW2>MAGENTA2 AND MAGENTA2>WHITE2 AND YELLOW2>WHITE2 then color.cyan else color.gray );
#Y/M
#addlabel(yes, "4",if YELLOW2>MAGENTA2 then color.GREEN else color.gray);
addlabel( YELLOW2>MAGENTA2 , "4", color.green);
plot ad4 = if yellow2 >= 0 then -.05 else Double.NaN;
ad4.SetPaintingStrategy (PaintingStrategy.SQUARES);
ad4.SetLineWeight (4);
ad4.AssignValueColor(if YELLOW2>MAGENTA2 then color.cyan else color.gray );
plot Zero2=-.06;
Zero2.setLineWeight(2);
Zero2.setDefaultColor(color.white);
#RED..................................................
#R/M
addlabel(RED2>MAGENTA2 AND YELLOW2>YELLOW2[1], "A", color.red);
plot A = if yellow2 >= 0 then -.07 else Double.NaN;
A.SetPaintingStrategy (PaintingStrategy.SQUARES);
A.SetLineWeight (3);
A.AssignValueColor(if RED2>MAGENTA2 AND YELLOW2>YELLOW2[1] then color.RED else color.gray );
#M/Y
addlabel( YELLOW2<MAGENTA2 AND YELLOW2>YELLOW2[1], "B", color.red);
plot B = if yellow2 >= 0 then -.08 else Double.NaN;
B.SetPaintingStrategy (PaintingStrategy.SQUARES);
B.SetLineWeight (3);
B.AssignValueColor(if YELLOW2<MAGENTA2 AND YELLOW2>YELLOW2[1] then color.RED else color.gray );
#R/Y
addlabel(RED2>YELLOW2 AND YELLOW2<MAGENTA2, "C", color.red);
plot C = if yellow2 >= 0 then -.09 else Double.NaN;
C.SetPaintingStrategy (PaintingStrategy.SQUARES);
C.SetLineWeight (3);
C.AssignValueColor(if RED2>YELLOW2 AND YELLOW2<MAGENTA2 then color.RED else color.gray );
##-------------
#
addlabel(yes, "D",if WHITE2>YELLOW2 then color.RED else color.gray);
plot D = if yellow2 >= 0 then -.10 else Double.NaN;
D.SetPaintingStrategy (PaintingStrategy.SQUARES);
D.SetLineWeight (3);
D.AssignValueColor(if RED2>YELLOW2 AND WHITE2>YELLOW2 then color.RED else color.gray );
input PaintBars4 = no;
AssignPriceColor (if !PaintBars4 then Color.CURRENT else if RED2>YELLOW2 AND WHITE2>YELLOW2 then color.RED else color.CURRENT);
#if RED2>YELLOW2 AND WHITE2>YELLOW2 then color.RED else color.gray );
#END
|