__basic pricechart2_advanced

#1
usefull pricechart
set in preferences the color : up green / down red

it gives the pricechart more meaning (to me).
what it does,

1st: if a price closes on a high or low -> it get a black bar around the candle
so you know it is a very strong or weak close

2nd: if a price i.e. open on lowest point and goes up, and closes on highest point, it gets a blue bar around the candle (for up/down both blue)

3rd: a doiji gets colored blue

To make it even more visuable to check, you can in parameters plot a dot for those 3 criteria. default is off

maybe I add later a discression factor, so ie. if it closes almost to the high, but difference a real small percentage, it's still counts as a very strong close and gets a black bar around. that's later.

_SECTION_BEGIN("__basic pricechart2_advanced");

SetChartOptions(0, chartShowArrows|chartShowDates);
_N(Title =EncodeColor(colorGreen)+ StrFormat("{{NAME}} {{DATE}} " + EncodeColor(colorBlack)+" < Open %g > "+ EncodeColor(colorBlue)+ " < High %g > "+ EncodeColor(colorRed)+" < Low %g > "+ EncodeColor(colorBlack) + " < Close %g > " + EncodeColor(colorBrown ) + "< Change" +" %.2f%% > " + "< Range " +(H-L) +" >" +" < Volume " +WriteVal( V, 1.0 ) +" >" + "\n" + "\n" +"{{VALUES}} ", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
SetChartBkColor(ParamColor("Outer Panel Color ",colorWhite)); // color of outer border
SetChartBkGradientFill( ParamColor("Inner Panel Color Upper Half",colorWhite),
ParamColor("Inner Panel Color Lower Half",colorWhite)//color of inner panel
,ParamColor("Behind Text Color", colorLavender));
GraphXSpace=25;

barcolor =
IIf( C==H AND O!=C AND O!=L, colorBlack ,
IIf( C==L AND O!=C AND O!=H, colorBlack ,

IIf( C==H AND O==L AND C>O, colorBlue ,
IIf( C==L AND O==H AND C<O, colorBlue ,

IIf(C>O,colorGreen ,
IIf(C<O,colorRed ,

IIf(C==O,colorBlue ,
colorWhite ) ) ) ) ) ) );

PlotOHLC( O, H, L, C, "", barcolor, styleCandle );

Strong_Weak_Close= ParamToggle("show dot strong or weak close","No|Yes",0);
Max_Days= ParamToggle("show dot max days up or down","No|Yes",0);
Doiji= ParamToggle("show dot on doiji days","No|Yes",0);

if (Strong_Weak_Close) PlotShapes(IIf(C==H AND O!=C AND O!=L, shapeSmallCircle, shapeNone),colorBlack , 0,H, Offset=45);
if (Strong_Weak_Close) PlotShapes(IIf(C==L AND O!=C AND O!=H, shapeSmallCircle, shapeNone),colorBlack , 0,L, Offset=-45);

if (Max_Days) PlotShapes(IIf(C==H AND O==L AND C>O, shapeSmallCircle, shapeNone),colorBlue , 0,H, Offset=45);
if (Max_Days) PlotShapes(IIf(C==L AND O==H AND C<O, shapeSmallCircle, shapeNone),colorBlue , 0,L, Offset=-45);

if (Doiji) PlotShapes(IIf(C==O, shapeSmallCircle, shapeNone),colorBlue , 0,H, Offset=45);
if (Doiji) PlotShapes(IIf(C==O, shapeSmallCircle, shapeNone),colorBlue , 0,L, Offset=-45);

_SECTION_END();