please add buy sell arrow for crossover
Code:
SetChartOptions(0,chartShowArrows|chartShowDates);
GraphXSpace=Param("GraphXSpace",0,0,100,1);
dec = (Param("Decimals",2,0,7,1)/10)+1;
SetChartBkColor(ParamColor("Outer Panel", colorBlack));
SetChartBkGradientFill(ParamColor("Upper Chart", colorDarkGrey), ParamColor("Lower Chart", colorDarkGrey));
Title = EncodeColor(55)+ Title = Name() + " " + EncodeColor(32) + Date() +
" " + EncodeColor(5) + "{{INTERVAL}} " +
EncodeColor(55)+ " Open = "+ EncodeColor(52)+ WriteVal(O,dec) +
EncodeColor(55)+ " High = "+ EncodeColor(5) + WriteVal(H,dec) +
EncodeColor(55)+ " Low = "+ EncodeColor(32)+ WriteVal(L,dec) +
EncodeColor(55)+ " Close = "+ EncodeColor(7)+ WriteVal(C,dec)+
EncodeColor(55)+ " Volume = "+ EncodeColor(11)+ WriteVal(V,1);
///////////////////////
colorHighliter = IIf(C >= O, ColorRGB(0, 128, 0), ColorRGB(128, 0, 0));
DemandPoint = (Ref(L, -1) < Ref(L, -2)) & (L < Ref(L, -1)) & (L < Ref(L, 1)) & (Ref(L, 1) < Ref(L, 2));
//Supply Point
//colorSupplyPoint = ParamColor("Supply Line", ColorRGB(255, 128, 0));
SupplyPoint = (Ref(H, -1) > Ref(H, -2)) & (H > Ref(H, -1)) & (H > Ref(H, 1)) & (Ref(H, 1) > Ref(H, 2));
CountTrendBars = 0;
CurrentBar = BarCount - 1;
dx0 = dx1 = dy0 = dy1 = 0;
sx0 = sx1 = sy0 = sy1 = 0;
//Price
SetBarFillColor(colorHighliter);
Plot(C, "Close", IIf(colorHighliter == ColorRGB(128, 0, 128), ColorRGB(255, 0, 255), IIf(colorHighliter == ColorRGB(128, 128, 0), ColorRGB(255, 255, 0), IIf(C > O, ColorRGB(0, 255, 0), IIf(C < O, ColorRGB(255, 0, 0), ColorRGB(255, 255, 255))))), styleCandle, Null, Null, 0, 0, 1);
side = 1;
From = Param("Start" , 3, 1, 120, 1 );
To = Param("End" , 120, 1, 120, 1 );
incr = Param("Step" ,2, 1, 10, 1 );
WhichMA = ParamList("Which MA ?" , "SMA|EMA|WMA|WILDERS",1);
WhichStyle = ParamToggle("Cloud Style", "No|Yes",1);
Effect3D = ParamToggle( "3D effect?", "No|Yes", 1 );
Saturation = Param("Saturation" , 199, 0, 255 );
Brightness = Param("Brightness" , 255, 0, 255 ) ;
if (WhichStyle)
iStyle = styleCloud;
else
iStyle = styleLine;
for( i = From; i <To; i += incr)
{
switch (WhichMA)
{
case "SMA":
up = MA( C, i );
down = MA( C, i + incr );
break;
case "WMA":
up = WMA( C, i );
down = WMA( C, i + incr );
break;
case "WILDERS":
up = Wilders( C, i );
down = Wilders( C, i + incr );
break;
default:
up = EMA( C, i );
down = EMA( C, i + incr );
break;
}
if( Effect3D )
side = IIf(up<=down AND Ref( up<=down, 1 ), 1, 0.6 );
PlotOHLC( up,up,down,down, "", ColorHSB( 3*(i - 10),Saturation,side * Brightness), iStyle|styleNoLabel );
}