PowerPivots Plus Add-on new Indicators Auto Support & Resistance PPivot:=Input("P 1=minor 2=intermediate 3=major 4=primary",1,4,2); TPivot:=Input("T -1=minor -2=intermediate -3=major -4=primary",-4,-1,-2); FTrough := LastValue( ExtFml("Powerpivots.NthPivotPrice",Tpivot,0,1)); STrough := LastValue( ExtFml("Powerpivots.NthPivotPrice",Tpivot,1,1)); TTrough := LastValue( ExtFml("Powerpivots.NthPivotPrice",Tpivot,2,1)); FPeak := LastValue( ExtFml("Powerpivots.NthPivotPrice",Ppivot,0,1)); SPeak := LastValue( ExtFml("Powerpivots.NthPivotPrice",Ppivot,1,1)); TPeak := LastValue( ExtFml("Powerpivots.NthPivotPrice",Ppivot,2,1)); PH:=LastValue(ExtFml("Powerpivots.NthPivotPrice",PPivot,0,1)); PL:=LastValue(ExtFml("Powerpivots.NthPivotPrice",TPivot,0,1)); Dist:= LastValue(Max(ph,pl)-Min(ph,pl)/5); Trough1to2:=Abs((FTrough-STrough)/STrough); Trough1to3:=Abs((FTrough-TTrough)/TTrough); Sup:=ValueWhen(1,If(Trough1to2<=dist/100,(FTrough+STrough)/2, If(Trough1to3<=dist/100,FTrough+TTrough/3,0))<>0,If(Trough1to2<=dist/100,(FTrough+STrough)/2,If(Trough1to3<=dist/100,(FTrough+TTrough)/2,0))); Peak1to2:=Abs((FPeak-SPeak)/SPeak); Peak1to3:=Abs((FPeak-TPeak)/TPeak); Res:=ValueWhen(1,If(Peak1to20,If(Peak1to2Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B>0 Short Piv:=1; Per1:=7; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B<0 Out Piv:=1; Per1:=7; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 Symbols Long entry Piv:=1; Per1:=7; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B>0 AND Ref(B,-1)<=0 Short entry Piv:=1; Per1:=7; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B<0 AND Ref(B,-1)>=0 Long Exit Piv:=1; Per1:=7; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 AND Ref(B,-1)>0 Short exit Piv:=1; Per1:=7; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 AND Ref(B,-1)<0 *****another version***** This Expert needs the Power Pivot Plus Add-On and needs to be used on daily Charts Highlights long Piv:=2; Per1:=20; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B>0 Short Piv:=2; Per1:=20; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B<0 Out Piv:=2; Per1:=20; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 Symbols Long entry Piv:=2; Per1:=20; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B>0 AND Ref(B,-1)<=0 Short entry Piv:=2; Per1:=20; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B<0 AND Ref(B,-1)>=0 Long Exit Piv:=2; Per1:=20; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 AND Ref(B,-1)>0 Short exit Piv:=2; Per1:=20; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); D:=Mov((((Log(C/(Max(A1,A2)+(Min(B1,B2)/2))))+1)*50),Per1,E); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=D>Mov(D,5,S) AND TD=1; SE:=DMov(D,5,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 AND Ref(B,-1)<0 *****Chaikin Money Flow***** Chaikin Money Flow Piv:=Input("pivot type",1,2,1); Per1:=Input("Period",1,50,21); TF:=Input("timeframe",1,30,1); A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); K;Mov(K,7,S); *****Chaikin Money Flow Expert***** This expert needs the PowerPivot plus Add-on and needs to be applied to Daily Charts Highlights Long Piv:=1; Per1:=21; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B>0 Short Piv:=1; Per1:=21; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B<0 Out Piv:=1; Per1:=21; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 Symbols Long entry Piv:=1; Per1:=21; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B>0 AND Ref(B,-1)<=0 Short entry Piv:=1; Per1:=21; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B<0 AND Ref(B,-1)>=0 Long exit Piv:=1; Per1:=21; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 AND Ref(B,-1)>0 Short exit Piv:=1; Per1:=21; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 AND Ref(B,-1)<0 *****Another Version***** This expert needs the PowerPivot plus Add-on and needs to be applied to Daily Charts Highlights Long Piv:=2; Per1:=42; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B>0 Short Piv:=2; Per1:=42; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B<0 Out Piv:=2; Per1:=42; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 Symbols Long entry Piv:=2; Per1:=42; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B>0 AND Ref(B,-1)<=0 Short entry Piv:=2; Per1:=42; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B<0 AND Ref(B,-1)>=0 Long exit Piv:=2; Per1:=42; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 AND Ref(B,-1)>0 Short Exit Piv:=2; Per1:=42; TF:=1; A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Sum(((C-Min(B1,B2)-(Max(A1,A2)-C))/(Max(A1,A2)-Min(B1,B2))*V),Per1)/Sum(V,Per1); TD:=ExtFml("PowerPivots.TrendDirection",1,2); LE:=K>0 AND K>Mov(K,7,S) AND TD=1; LX:=K>0 AND KMov(K,7,S); B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); B=0 AND Ref(B,-1)<0 *****ease of movement w close***** Plot this indicator in its own window Piv:=Input("pivot type",1,2,1); Per1:=Input("Period",1,50,13); TF:=Input("timeframe",1,30,1); A1:=ExtFml("PowerPivots.NthPivotPrice",Piv,1,TF); A2:=ExtFml("PowerPivots.NthPivotPrice",Piv,2,TF); B1:=ExtFml("PowerPivots.NthPivotPrice",-Piv,1,TF); B2:=ExtFml("PowerPivots.NthPivotPrice",-Piv,2,TF); K:=Mov((C-Ref(C,-1))/(V/(Max(A1,A2)-Min(B1,B2))),Per1,S)*100000; K;