// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("Chart Settings"); SetChartOptions(0,chartShowArrows|chartShowDates); SetChartBkColor(ParamColor("Outer Panel",colorPaleBlue)); SetChartBkGradientFill(ParamColor("Upper Chart",colorDarkGrey),ParamColor("Lower Chart",colorDarkGrey)); GraphXSpace=Param("GraphXSpace",10,0,100,1); dec = (Param("Decimals",2,0,7,1)/10)+1; bi = BarIndex(); Lbi = LastValue(BarIndex()); sbi = SelectedValue(bi); x1= BarCount-1; 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(52)+ WriteVal(C,dec)+ EncodeColor(55)+ " Volume = "+ EncodeColor(52)+ WriteVal(V,1); _SECTION_END(); //======================================================================== SetChartOptions(2,chartShowArrows|chartShowDates|chartWrapTitle); SetChartOptions(0,chartShowArrows|chartShowDates); //GfxGradientRect( 180, 30, 1759, 735, ColorRGB(40,40,40), ColorRGB(0,0,40) ); GfxSetOverlayMode(1); //GfxSelectPen( ColorRGB(150,0,0), 1 ); GfxSelectSolidBrush( ColorRGB(0,0,40) ); //GfxRectangle=( 0,750, 1807, 35 ); //GfxSelectPen( ColorRGB(150,0,0), 2 ); GfxSelectSolidBrush( ColorRGB(65,65,65) ); //GfxPolygon(250,200,200,250,250,20,200,50); //GfxSelectPen( ColorRGB(125,0,0), 1 ); //GfxSelectSolidBrush( ColorRGB(0,0,40) ); //GfxRectangle( 10,100, 190, 160 ); //GfxSelectPen=( ColorRGB(0,0,0) ,1 ); GfxSelectSolidBrush( ColorRGB(0,0,0) ); //GfxSetTextAlign( 250 );// center alignment GfxSetOverlayMode(1); //GfxSelectFont=("Times New Roman", 30, 400, True ); GfxSetTextColor( ColorRGB( 105, 105, 105 ) ); GfxSetBkMode(0); // transparent //GfxTextOut=("Pathfinder", 15 , 35 ); _SECTION_BEGIN("Flower"); si=Param("Zoom/In Out",5,-50,100,1); GraphXSpace=si; r1 = Param( "ColorFast avg", 5, 2, 200, 1 ); r2 = Param( "ColorSlow avg", 10, 2, 200, 1 ); r3 = Param( "ColorSignal avg", 5, 2, 200, 1 ); m1=MACD(r1,r2); s1=Signal(r1,r2,r3); mycolor=IIf(m1<0 AND m1>s1, ColorRGB(155,155,155),IIf(m1>0 AND m1>s1,ColorRGB(0,125,0),IIf(m1>0 AND m1Open,ColorRGB(0,245,0),ColorRGB(255,0,0)); Ctmpl = E_TSKPCOLORTMPL(Open,High,Low,Close,Volume); total = 0; total = total + IIf(tskp_colortmplcnd0 > 0, 1, -1); total = total + IIf(tskp_colortmplcnd1 > 0, 1, -1); total = total + IIf(tskp_colortmplcnd2 > 0, 1, -1); total = total + IIf(tskp_colortmplcnd3 > 0, 1, -1); total = total + IIf(tskp_colortmplcnd4 > 0, 1, -1); total = total + IIf(tskp_colortmplcnd5 > 0, 1, -1); total = total + IIf(tskp_colortmplcnd6 > 0, 1, -1); total = total + IIf(tskp_colortmplcnd7 > 0, 1, -1); total = total + IIf(tskp_colortmplcnd8 > 0, 1, -1); for( i = 0; i < BarCount; i++ ) { if( total[i] >= 5 ) Color[i] = colorLime; else if( total[i] <= -5 ) Color[i] = colorRed; else Color[i] = colorWhite; } Candle=ParamList("Candle","Modified Candlestick,Modified Heikin Ashi,Normal Candlestick",1); if(Candle=="Modified Candlestick") { ColorHighliter = myColor; SetBarFillColor( ColorHighliter ); Plot (Close,"- Modified Candlestick", Color,ParamStyle( "Style", styleCandle|styleLine | styleThick, maskAll)); } if(Candle=="Modified Heikin Ashi") { ColorHighliter = myColor; SetBarFillColor( ColorHighliter ); PlotOHLC( IIf(flowerOpen 0, 1, -1); sctotal = sctotal + IIf(tskp_colortmplcnd1 > 0, 1, -1); sctotal = sctotal + IIf(tskp_colortmplcnd2 > 0, 1, -1); sctotal = sctotal + IIf(tskp_colortmplcnd3 > 0, 1, -1); sctotal = sctotal + IIf(tskp_colortmplcnd4 > 0, 1, -1); sctotal = sctotal + IIf(tskp_colortmplcnd5 > 0, 1, -1); sctotal = sctotal + IIf(tskp_colortmplcnd6 > 0, 1, -1); sctotal = sctotal + IIf(tskp_colortmplcnd7 > 0, 1, -1); sctotal = sctotal + IIf(tskp_colortmplcnd8 > 0, 1, -1); for (curBar=0; curBar < BarCount-1; curBar++) { if ( curBar == 0 ) { CHiPr = flowerHigh[curBar]; CHiBar = curBar; CLoPr = flowerLow[curBar]; CLoBar = curBar; blsLong = 0; blsShort = 0; blsNewCO = 0; PrePP = 0; PrevCOBar = 0; PrevHiVal = flowerHigh[curBar]; PrevLowVal = flowerLow[curBar]; BuySig = 0; SellSig = 0; blsLL = 0; } if (flowerHigh[CurBar] >= CHiPr) { CHiPr = flowerHigh[CurBar]; ChiBar = CurBar; } if (flowerLow[CurBar] <= CLoPr) { CLoPr = flowerLow[CurBar]; CLoBar = CurBar; } if ( (KPA900Val[curBar] >= KPAutoStopVal[curbar]) AND (PrePP != -1) AND (blsLong != 1) ){ BarDif = CurBar - PrevCOBar; if (BarDif >= NumBars) { blsLong = 1; blsShort = 0; blsNewCO = 1; PrevCOBar = CurBar; } } if ( (KPA900Val[curBar] <= KPAutoStopVal[curbar]) AND (PrePP != 1) AND (blsShort != 1) ){ BarDif = CurBar - PrevCOBar; if (BarDif >= NumBars) { blsLong = 0; blsShort = 1; blsNewCO = 1; PrevCOBar = CurBar; } } if ( (blsNewCO == 1) AND (sctotal[CurBar] >= 5) AND (blsLong == 1) ) { LVal = CurBar - CLoBar; for (j= CLoBar-1; j <= CLoBar+1; j++) { if (j >=0) { aLPivs[j] = 1; aLoVal[j] = CLoPr; } } PrePP = -1; blsNewCO = 0; CHiPr = flowerHigh[CurBar]; CHiBar = CurBar; CLoPr = flowerLow[Curbar]; CLoBar = CurBar; } else if ((blsNewCO == 1) AND (sctotal[CurBar] <= -5) AND (blsShort == 1) ) { HVal = CurBar - CHiBar; for (j= CHiBar-1; j <= CHiBar+1; j++) { if (j >=0) { aHPivs[j] = 1; aHiVal[j] = CHiPr; } } PrePP = 1; blsNewCO = 0; CHiPr = flowerHigh[CurBar]; CHiBar = CurBar; CLoPr = flowerLow[Curbar]; CLoBar = CurBar; } } PlotShapes(IIf(aHPivs == 1, 21,shapeNone), ColorRGB(255,0,145),0, aHiVal,Offset = 20); PlotShapes(IIf(aHPivs == 1, 15,shapeNone), ColorRGB(200,50,75),0, aHiVal,Offset = 20); PlotShapes(IIf(aLPivs == 1, 21,shapeNone), ColorRGB(0,125,225),0, aLoVal, Offset = -20); PlotShapes(IIf(aLPivs == 1, 15,shapeNone), ColorRGB(0,125,255),0, aLoVal, Offset = -20); } _SECTION_END(); _SECTION_BEGIN("Resistance"); supres=ParamToggle("Sup_Res","No|Yes",1); if(supres) { Prd1=Param("Res_Period1",2,0,200,1); test = TEMA ( High , Prd1 ) ; PK = test > Ref(test,-1) AND Ref(test,1) < High;//Peak PKV0 = ValueWhen(PK,flowerHigh,0);//PeakValue0 PKV1 = ValueWhen(PK,flowerHigh,1);//PeakValue1 PKV2 = ValueWhen(PK,flowerHigh,2);//PeakValue2 MPK = PKV2 < PKV1 AND PKV1 > PKV0 ;//MajorPeak RsColor=ParamColor("ResistColor",ColorRGB(225,0,0)); BrCount=Param("ResistBarLength",8,1,500,1); for (i=0;i Low AND test2 < Ref(test2,-1);//Peak SPV0 = ValueWhen(SP,flowerLow,0);//PeakValue0 SPV1 = ValueWhen(SP,flowerLow,1);//PeakValue1 SPV2 = ValueWhen(SP,flowerLow,2);//PeakValue2 MSP = SPV2 > SPV1 AND SPV1 < SPV0 ;//MajorPeak SpColor=ParamColor("SupColor",ColorRGB(0,225,0)); BrCount=Param("SupBarLength",8,1,500,1); for (i=0;i