Quantcast
Channel: Traderji.com
Viewing all articles
Browse latest Browse all 10287

Help me plz .. (Beginner)

$
0
0
I hv a question about the color changing code.

i used this one

// Plots a 20 period Donchian channel

pds=20;
pdss=10;

upper1=HHV(Ref(H,-1),pds);
Lower1 = LLV(Ref(L,-1),pdss);
Middle1 = (upper1+Lower1)/2;
stopline=HHV(C-3*ATR(14),7);

Plot(Upper1,"Upper",colorWhite,styleLine);
Plot(Middle1,"Middle",colorBlue,styleLine);
Plot(Lower1,"Lower",colorRed,styleLine);
Plot(stopline,"stopline",colorBrightGreen,styleLin e);



Buy = Cross(C,upper1);
Sell = Cross(C,Lower1);


Color=IIf(BarsSince(Buy)<BarsSince(Sell),ParamColo r("Bullish",colorGreen),ParamColor("Bearish",color Red));
Plot(C,"close",60);
Plot(C,"close",Color,styleCandle);

//Plotarrow//
shape=Buy*shapeUpArrow+Sell*shapeDownArrow;
PlotShapes(shape,IIf(Buy,colorGreen,colorRed),0,II f(Buy,Low,High));
GraphXSpace=5;

.................................................. ..................................................


In first circle i wonder why this green candle stick not change into red color, close is already cross lower (red line, lower) ?

In second circle , why the candle stick is delay about 2 bars in changing color ?

thank you .

Viewing all articles
Browse latest Browse all 10287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>