// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("Price"); SetChartOptions(0,chartShowArrows|chartShowDates); SetChartBkColor(ParamColor("Panel Color",colorLightGrey)); SetChartBkGradientFill(ParamColor("Upper Chart",colorLightGrey),ParamColor("Lower Chart",colorLightGrey)); dec=(Param("Decimals",2,0,7,1)/10)+1; GraphXSpace=Param("GraphXSpace",20,-10,25,1); BarTime1=LastValue(TimeNum() - Now(4)); DataError=IIf(Now(4) > TimeNum(),True,False); TimeBase=IIf(Interval(1)>0,1,0); _N(StrBarTime=NumToStr(BarTime1,1.0,False)); BT_Length=StrLen(StrBarTime); _N(TimeLeft_= WriteIf(BT_Length==1,"0:0"+StrBarTime,WriteIf(BT_Length==2,"0:"+StrBarTime, WriteIf(BT_Length==3,StrLeft(StrBarTime,1)+":"+StrRight(StrBarTime,2), StrLeft(StrBarTime,2)+":"+StrRight(StrBarTime,2))))); TimeLeft=WriteIf(TimeBase==1,TimeLeft_,"N/A"); Title= EncodeColor(16)+ " High = "+ EncodeColor(27) + WriteVal(H,dec) + EncodeColor(16)+ " Low = "+ EncodeColor(32)+ WriteVal(L,dec) + EncodeColor(16) +" TimeLeft = "+ EncodeColor(29) +TimeLeft + EncodeColor(16)+ " Volume = "+ EncodeColor(18)+ WriteVal(V,1); _SECTION_END(); _SECTION_BEGIN("TSKPScoreCardColors"); 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]= colorBlue; else if(total[i] <= -5 ) Color[i]=colorRed; else Color[i]=colorYellow; } CO = Open; CH = High; CL = Low; CC = Close; PlotOHLC( CO,CH,CL,CC, "Price", color, styleCandle );//Plot Selected Ticker _SECTION_END(); _SECTION_BEGIN("KP DynSupRes"); sw = E_TSKPSWINGLINE(High,Low,Close); _SECTION_END(); _SECTION_BEGIN("KP MeanSwingLine"); sw = E_TSKPSWINGLINE(High,Low,Close); _SECTION_END(); _SECTION_BEGIN("KP TrendBias"); Disp1=ParamToggle("Trend Bias","Show|Hide",1); parmTBStyle = ParamStyle("Trend Bias Style", styleLine | styleThick, maskAll); parmTBColor = ParamColor("Trend Bias Color", colorRed); parmTBSlowStyle = ParamStyle("Trend Bias Slow Style", styleLine | styleThick, maskAll); parmTBSlowColor = ParamColor("Trend Bias Slow Color", colorBlue); dummy = E_TSKPTRENDBIAS(High,Low,Close); KPTB = tskp_sb; KPTBSlow = tskp_tbxavg; if(Disp1){ Plot(KPTB, "TB", parmTBColor, parmTBStyle); Plot(KPTBSlow, "TBSlow", parmTBSlowColor, parmTBSlowStyle); } _SECTION_END(); _SECTION_BEGIN("KPAutoStop-KPA900 Trend"); Disp2=ParamToggle("KPAutoStop-KPA900 Trend","Show|Hide",0); parmASStyle = ParamStyle("AutopStop Style", styleLine | styleThick, maskAll); parmASColor = ParamColor("AutoStop Color", colorYellow); parmPA900Style = ParamStyle("KP A900 Style", styleLine | styleThick, maskAll); parmPA900Color = ParamColor("KP A900 Color", colorWhite); if(Disp2){ Plot( E_TSKPAUTOSTOP(High,Low,Close) ,"KP AutoStop",parmASColor, parmASStyle); Plot( E_TSKPA900(Close) , "KP A900", parmPA900Color, parmPA900Style);} _SECTION_END(); _SECTION_BEGIN("KP Pivots"); Disp3=ParamToggle("KP Pivots","Show|Hide",1); parmKPPivotHighColor = ParamColor("KP Pivot High",colorBlack); parmKPPivotLowColor = ParamColor("KP Pivot Low",colorBlack); CHiPr=0; CLoPr=9999999; blsLong=0; PrevCOBar=0; NumBars=0; PrePP=0; PrevLowVal=9999999; BuySig=0; blsShort=0; PrevHiVal=0; blsNewCO=0; BarDif=0; KPA900Val = E_TSKPA900(Close); KPAutoStopVal = E_TSKPAUTOSTOP(High,Low,Close); aHPivs= H - H; aLPivs= L - L; aHiVal= H - H; aLoVal= L - L; Ctmpl= E_TSKPCOLORTMPL(Open,High,Low,Close,Volume); sctotal= 0; sctotal= sctotal+ IIf(tskp_colortmplcnd0 > 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=High[curBar]; CHiBar=curBar; CLoPr=Low[curBar]; CLoBar=curBar; blsLong=0; blsShort=0; blsNewCO=0; PrePP=0; PrevCOBar=0; PrevHiVal=High[curBar]; PrevLowVal=Low[curBar]; BuySig=0; SellSig=0; blsLL=0; } if (High[CurBar] >= CHiPr) { CHiPr = High[CurBar]; ChiBar = CurBar; } if (Low[CurBar] <= CLoPr) { CLoPr = Low[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=High[CurBar]; CHiBar=CurBar; CLoPr=Low[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=High[CurBar]; CHiBar=CurBar; CLoPr=Low[Curbar]; CLoBar=CurBar;} } if(Disp3){ PlotShapes( IIf(aHPivs == 1,shapeSmallCircle,shapeNone),parmKPPivotHighColor,0,aHiVal+0.05,Offset=10); PlotShapes( IIf(aLPivs == 1,shapeSmallCircle,shapeNone),parmKPPivotLowColor,0,aLoVal-0.05,Offset=-10);} _SECTION_END(); Disp4=ParamToggle("KP MoMo's","Show|Hide",0); parmMoUpColor = ParamColor("MoUpColor", colorAqua); parmMoDnColor = ParamColor("MoDnColor", colorRed); blsLong = 0; KPStopLine = E_TSKPSTOPLINE(High,Low,Close); sw = E_TSKPUPSELL(Open,High,Low,Close,Volume); KPTriggerLine = tskp_triggerline; KPFast3Val = IIf((E_TSKPFAST3(Open,High,Low,Close,Volume)> 0),1, -1); dummy = E_TSKPFAST2(Open,High,Low,Close,Volume); KPFast2Val = IIf ((tskp_fast2val1 > 0),1,-1); dummy = E_TSKPMEDIUM(Close); KPMediumUP = tskp_mediumup; KPMediumDwn = tskp_mediumdown; KPMediumMA = tskp_mediumma; for (curBar=5; curBar < BarCount-1; curBar++) { if( (blsLong == -1) OR (blsLong == 0)) { if ((sctotal[CurBar] >= 5) AND (KPMediumUP[CurBar] > KPMediumMA[CurBar] ) AND (KPFast3Val[CurBar] == 1) AND (KPFast2Val[CurBar] == 1) AND (KPTriggerLine[CurBar] >= KPStopLine[CurBar] )) { blsLong = 1; aLPivs[CurBar] = 1; aLoVal[CurBar] = Low[CurBar];} } if( (blsLong == 1) OR (blsLong == 0)) { if ((sctotal[CurBar] <= -5) AND (KPMediumDwn[CurBar] < KPMediumMA[CurBar] ) AND (KPFast3Val[CurBar] == -1) AND (KPFast2Val[CurBar] == -1) AND (KPTriggerLine[CurBar] <= KPStopLine[CurBar] )) { blsLong = -1; aHPivs[Curbar] = 1; aHiVal[Curbar] = High[Curbar];} } if ((blsLong == 1) AND ((sctotal[CurBar] < 5) OR (KPMediumUP[CurBar] < KPMediumMA[CurBar] ) OR (KPFast2Val[CurBar] < 1) OR (KPFast3Val[CurBar] < 1) OR (KPTriggerLine[CurBar] < KPStopLine[CurBar] )) ) { blsLong= 0; } if ((blsLong == -1) AND ((sctotal[CurBar] > -5) OR (KPMediumDwn[CurBar] > KPMediumMA[CurBar] ) OR (KPFast2Val[CurBar] > -1) OR (KPFast3Val[CurBar] > -1) OR (KPTriggerLine[CurBar] > KPStopLine[CurBar] )) ) { blsLong = 0;}} if(Disp4){ PlotShapes( IIf(aHPivs == 1,shapeDownArrow,shapeNone),parmMoDnColor,0,aHiVal+0.00,Offset=-30); PlotShapes( IIf(aLPivs == 1,shapeUpArrow,shapeNone),parmMoUpColor,0,aLoVal-0.00,Offset=-30);} _SECTION_END(); _SECTION_BEGIN("KP PowerPops"); Disp5=ParamToggle("KP PowerPops","Show|Hide",0); parmPPHighColor = ParamColor("PPHighColor", colorYellow); parmPPLowColor = ParamColor("PPLowColor", colorYellow); blsLong = 0; KP115Val = E_TSKP115SPLIT(High,Low,Close); KP104Val = E_TSKP104(High,Low,Close); dummy = E_TSKPMEDIUM(Close); KPMediumUpVal = tskp_mediumup; KPMediumDnVal = tskp_mediumdown; UpperBand = BBandTop(Close,20,1); LowerBand = BBandBot(Close,20,1); swVal = E_TSKPSWINGLINE(High,Low,Close); MeanSwingLnVal = tskp_swmean; for (curBar=5; curBar < BarCount-1; curBar++) { if (blsLong != 1) { if( (sctotal[curBar] >= 5) AND (KPMediumUpVal[curBar] > 1.75) AND (Close[curBar] > UpperBand[curBar]) AND (Close[curBar] > KP115Val[curBar]) AND (Close[curBar] > KP104Val[curBar]) AND (High[curBar] > High[curBar-3]) AND (Close[curBar] > Close[curBar-3]) AND (Close[CurBar] > MeanSwingLnVal[CurBar] ) ){ blsLong = 1; aLPivs[curBar] =1; aLoVal[curBar] = Low[curBar];} } else if (blsLong != -1) { if( (sctotal[curBar] <= -5) AND (KPMediumDnVal[curBar] < -1.75) AND (Close[curBar] < LowerBand[curBar]) AND (Close[curBar] < KP115Val[curBar]) AND (Close[curBar] < KP104Val[curBar]) AND (Low[curBar] < Low[curBar-3]) AND (Close[curBar] < Close[curBar-3]) AND (Close[curBar] < MeanSwingLnVal[curBar] ) ){ blsLong = -1; aHPivs[curBar] =1; aHiVal[curBar] = High[curBar];}}} if(Disp5){ PlotShapes( IIf(aHPivs == 1,shapeDownArrow,shapeNone),parmPPHighColor,0,aHiVal+0.00, Offset = -35); PlotShapes( IIf(aLPivs == 1,shapeUpArrow,shapeNone),parmPPLowColor,0,aLoVal-0.00, Offset = -35);} _SECTION_END(); _SECTION_BEGIN("KP Combo"); Disp6=ParamToggle("KP Combo","Show|Hide",0); Combo = E_TSKPCOMBO(Open,High,Low,Close,Volume); if(Disp6){ PlotShapes( IIf( Combo>0, shapeUpArrow, IIf(combo<0,shapeDownArrow,shapeNone)), IIf(combo>0,colorBlue,colorRed),0,IIf( Combo>0, Low, High ) ); } _SECTION_END(); _SECTION_BEGIN("KP New UpDown"); Disp7=ParamToggle("KP NewUpDown","Show|Hide",0); NewUpDown = E_TSKPNEWUPDOWN(Open,High,Low,Close,Volume); if(Disp7){ PlotShapes( IIf( NewUpDown >0, shapeUpArrow, IIf(NewUpDown <0, shapeDownArrow,shapeNone)), IIf(NewUpDown >0,colorBlue,colorRed),0,IIf( NewUpDown >0, Low, High ) ); } _SECTION_END(); _SECTION_BEGIN("KP M Range"); mp=0.5*(High + Low); tightstop=E_TSKPTIGHTSTOP(High,Low,Close); stopline=E_TSKPSTOPLINE(High,Low,Close); Color=colorWhite; for( i = 0; i < BarCount; i++ ) { if( mp[i] > stopline[i] && mp[i] > tightstop[i] ) Color[i] = colorBlue; else if( mp[i] < stopline[i] && mp[i] < tightstop[i]) Color[i] = colorRed; else Color[i] = colorWhite; } _SECTION_END(); _SECTION_BEGIN("KP TrendBias BackGround"); //Plot Tone parmToneColorUp=ParamColor("Tone Color Up", colorLightBlue ); parmToneColorDn=ParamColor("Tone Color Dn", colorTan); RibbonSize=Param("Ribbon Size",10,0.5,10,0.5); Plot( RibbonSize,"Tone",IIf(KPTB > KPTBSlow,parmToneColorUp,parmToneColorDn),styleOwnScale|styleArea|styleNoLabel,0,10); _SECTION_END();