// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("TScore"); //********************************************************* //http://finantepersonale.blogspot.com/ //writted by Emmen //Trend Score Monitor //********************************************************* HaClose =EMA((O+H+L+C)/4,3); // Woodie HaOpen = IIf(BarIndex()>0,AMA( Ref( HaClose, -1 ), 0.5 ),Open); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); p1=Param("Extreme period1",5,3,10); p2=Param("Extreme period2",8,3,20); p3=Param("Extreme period3",13,3,50); HaDiff = IIf(HaClose>HaOpen, 1, IIf(HaCloseEMA(HaClose,p1), 1, IIf(HaCloseEMA(HaClose,p2), 1, IIf(HaCloseEMA(HaClose,p3), 1, IIf(HaCloseEMA(HaClose,p2), 1, IIf(EMA(HaClose,p1)EMA(HaClose,p3), 1, IIf(EMA(HaClose,p2)Ref(HaClose,-1), 1, IIf(HaClose0,ColorRGB(0,120,0),IIf(SelectedValue(TScore)<0,ColorRGB(215,0,0),GetChartBkColor())); Color2=IIf(SelectedValue(TScore)>1,ColorRGB(0,140,0),IIf(SelectedValue(TScore)<-1,ColorRGB(235,0,0),GetChartBkColor())); Color3=IIf(SelectedValue(TScore)>2,ColorRGB(0,160,0),IIf(SelectedValue(TScore)<-2,ColorRGB(255,0,0),GetChartBkColor())); Color4=IIf(SelectedValue(TScore)>3,ColorRGB(0,180,0),IIf(SelectedValue(TScore)<-3,ColorRGB(255,20,0),GetChartBkColor())); Color5=IIf(SelectedValue(TScore)>4,ColorRGB(0,200,0),IIf(SelectedValue(TScore)<-4,ColorRGB(255,40,0),GetChartBkColor())); Color6=IIf(SelectedValue(TScore)>5,ColorRGB(0,220,0),IIf(SelectedValue(TScore)<-5,ColorRGB(255,60,0),GetChartBkColor())); Color7=IIf(SelectedValue(TScore)>6,ColorRGB(0,240,0),IIf(SelectedValue(TScore)<-6,ColorRGB(255,80,0),GetChartBkColor())); Color11=IIf(SelectedValue(Ref(TScore,-1))>0,ColorRGB(0,120,0),IIf(SelectedValue(Ref(TScore,-1))<0,ColorRGB(215,0,0),GetChartBkColor())); Color21=IIf(SelectedValue(Ref(TScore,-1))>1,ColorRGB(0,140,0),IIf(SelectedValue(Ref(TScore,-1))<-1,ColorRGB(235,0,0),GetChartBkColor())); Color31=IIf(SelectedValue(Ref(TScore,-1))>2,ColorRGB(0,160,0),IIf(SelectedValue(Ref(TScore,-1))<-2,ColorRGB(255,0,0),GetChartBkColor())); Color41=IIf(SelectedValue(Ref(TScore,-1))>3,ColorRGB(0,180,0),IIf(SelectedValue(Ref(TScore,-1))<-3,ColorRGB(255,20,0),GetChartBkColor())); Color51=IIf(SelectedValue(Ref(TScore,-1))>4,ColorRGB(0,200,0),IIf(SelectedValue(Ref(TScore,-1))<-4,ColorRGB(255,40,0),GetChartBkColor())); Color61=IIf(SelectedValue(Ref(TScore,-1))>5,ColorRGB(0,220,0),IIf(SelectedValue(Ref(TScore,-1))<-5,ColorRGB(255,60,0),GetChartBkColor())); Color71=IIf(SelectedValue(Ref(TScore,-1))>6,ColorRGB(0,240,0),IIf(SelectedValue(Ref(TScore,-1))<-6,ColorRGB(255,80,0),GetChartBkColor())); Color12=IIf(SelectedValue(Ref(TScore,-2))>0,ColorRGB(0,120,0),IIf(SelectedValue(Ref(TScore,-2))<0,ColorRGB(215,0,0),GetChartBkColor())); Color22=IIf(SelectedValue(Ref(TScore,-2))>1,ColorRGB(0,140,0),IIf(SelectedValue(Ref(TScore,-2))<-1,ColorRGB(235,0,0),GetChartBkColor())); Color32=IIf(SelectedValue(Ref(TScore,-2))>2,ColorRGB(0,160,0),IIf(SelectedValue(Ref(TScore,-2))<-2,ColorRGB(255,0,0),GetChartBkColor())); Color42=IIf(SelectedValue(Ref(TScore,-2))>3,ColorRGB(0,180,0),IIf(SelectedValue(Ref(TScore,-2))<-3,ColorRGB(255,20,0),GetChartBkColor())); Color52=IIf(SelectedValue(Ref(TScore,-2))>4,ColorRGB(0,200,0),IIf(SelectedValue(Ref(TScore,-2))<-4,ColorRGB(255,40,0),GetChartBkColor())); Color62=IIf(SelectedValue(Ref(TScore,-2))>5,ColorRGB(0,220,0),IIf(SelectedValue(Ref(TScore,-2))<-5,ColorRGB(255,60,0),GetChartBkColor())); Color72=IIf(SelectedValue(Ref(TScore,-2))>6,ColorRGB(0,240,0),IIf(SelectedValue(Ref(TScore,-2))<-6,ColorRGB(255,80,0),GetChartBkColor())); Color13=IIf(SelectedValue(Ref(TScore,-3))>0,ColorRGB(0,120,0),IIf(SelectedValue(Ref(TScore,-3))<0,ColorRGB(215,0,0),GetChartBkColor())); Color23=IIf(SelectedValue(Ref(TScore,-3))>1,ColorRGB(0,140,0),IIf(SelectedValue(Ref(TScore,-3))<-1,ColorRGB(235,0,0),GetChartBkColor())); Color33=IIf(SelectedValue(Ref(TScore,-3))>2,ColorRGB(0,160,0),IIf(SelectedValue(Ref(TScore,-3))<-2,ColorRGB(255,0,0),GetChartBkColor())); Color43=IIf(SelectedValue(Ref(TScore,-3))>3,ColorRGB(0,180,0),IIf(SelectedValue(Ref(TScore,-3))<-3,ColorRGB(255,20,0),GetChartBkColor())); Color53=IIf(SelectedValue(Ref(TScore,-3))>4,ColorRGB(0,200,0),IIf(SelectedValue(Ref(TScore,-3))<-4,ColorRGB(255,40,0),GetChartBkColor())); Color63=IIf(SelectedValue(Ref(TScore,-3))>5,ColorRGB(0,220,0),IIf(SelectedValue(Ref(TScore,-3))<-5,ColorRGB(255,60,0),GetChartBkColor())); Color73=IIf(SelectedValue(Ref(TScore,-3))>6,ColorRGB(0,240,0),IIf(SelectedValue(Ref(TScore,-3))<-6,ColorRGB(255,80,0),GetChartBkColor())); Color14=IIf(SelectedValue(Ref(TScore,-4))>0,ColorRGB(0,120,0),IIf(SelectedValue(Ref(TScore,-4))<0,ColorRGB(215,0,0),GetChartBkColor())); Color24=IIf(SelectedValue(Ref(TScore,-4))>1,ColorRGB(0,140,0),IIf(SelectedValue(Ref(TScore,-4))<-1,ColorRGB(235,0,0),GetChartBkColor())); Color34=IIf(SelectedValue(Ref(TScore,-4))>2,ColorRGB(0,160,0),IIf(SelectedValue(Ref(TScore,-4))<-2,ColorRGB(255,0,0),GetChartBkColor())); Color44=IIf(SelectedValue(Ref(TScore,-4))>3,ColorRGB(0,180,0),IIf(SelectedValue(Ref(TScore,-4))<-3,ColorRGB(255,20,0),GetChartBkColor())); Color54=IIf(SelectedValue(Ref(TScore,-4))>4,ColorRGB(0,200,0),IIf(SelectedValue(Ref(TScore,-4))<-4,ColorRGB(255,40,0),GetChartBkColor())); Color64=IIf(SelectedValue(Ref(TScore,-4))>5,ColorRGB(0,220,0),IIf(SelectedValue(Ref(TScore,-4))<-5,ColorRGB(255,60,0),GetChartBkColor())); Color74=IIf(SelectedValue(Ref(TScore,-4))>6,ColorRGB(0,240,0),IIf(SelectedValue(Ref(TScore,-4))<-6,ColorRGB(255,80,0),GetChartBkColor())); GfxSelectSolidBrush(color14); GfxRoundRect( 3,pxchartheight-15,13,pxchartheight-25 ,2,2) ; GfxSelectSolidBrush(color24); GfxRoundRect( 3,pxchartheight-27,13,pxchartheight-37 ,2,2) ; GfxSelectSolidBrush(color34); GfxRoundRect( 3,pxchartheight-39,13,pxchartheight-49 ,2,2) ; GfxSelectSolidBrush(color44); GfxRoundRect( 3,pxchartheight-51,13,pxchartheight-61 ,2,2) ; GfxSelectSolidBrush(color54); GfxRoundRect( 3,pxchartheight-63,13,pxchartheight-73 ,2,2) ; GfxSelectSolidBrush(color64); GfxRoundRect( 3,pxchartheight-75,13,pxchartheight-85 ,2,2) ; GfxSelectSolidBrush(color74); GfxRoundRect( 3,pxchartheight-87,13,pxchartheight-97 ,2,2) ; GfxSelectSolidBrush(color13); GfxRoundRect( 15,pxchartheight-15,25,pxchartheight-25 ,2,2) ; GfxSelectSolidBrush(color23); GfxRoundRect( 15,pxchartheight-27,25,pxchartheight-37 ,2,2) ; GfxSelectSolidBrush(color33); GfxRoundRect( 15,pxchartheight-39,25,pxchartheight-49 ,2,2) ; GfxSelectSolidBrush(color43); GfxRoundRect( 15,pxchartheight-51,25,pxchartheight-61 ,2,2) ; GfxSelectSolidBrush(color53); GfxRoundRect( 15,pxchartheight-63,25,pxchartheight-73 ,2,2) ; GfxSelectSolidBrush(color63); GfxRoundRect( 15,pxchartheight-75,25,pxchartheight-85 ,2,2) ; GfxSelectSolidBrush(color73); GfxRoundRect( 15,pxchartheight-87,25,pxchartheight-97 ,2,2) ; GfxSelectSolidBrush(color12); GfxRoundRect( 27,pxchartheight-15,37,pxchartheight-25 ,2,2) ; GfxSelectSolidBrush(color22); GfxRoundRect( 27,pxchartheight-27,37,pxchartheight-37 ,2,2) ; GfxSelectSolidBrush(color32); GfxRoundRect( 27,pxchartheight-39,37,pxchartheight-49 ,2,2) ; GfxSelectSolidBrush(color42); GfxRoundRect( 27,pxchartheight-51,37,pxchartheight-61 ,2,2) ; GfxSelectSolidBrush(color52); GfxRoundRect( 27,pxchartheight-63,37,pxchartheight-73 ,2,2) ; GfxSelectSolidBrush(color62); GfxRoundRect( 27,pxchartheight-75,37,pxchartheight-85 ,2,2) ; GfxSelectSolidBrush(color72); GfxRoundRect( 27,pxchartheight-87,37,pxchartheight-97 ,2,2) ; GfxSelectSolidBrush(color11); GfxRoundRect( 39,pxchartheight-15,49,pxchartheight-25 ,2,2) ; GfxSelectSolidBrush(color21); GfxRoundRect( 39,pxchartheight-27,49,pxchartheight-37 ,2,2) ; GfxSelectSolidBrush(color31); GfxRoundRect( 39,pxchartheight-39,49,pxchartheight-49 ,2,2) ; GfxSelectSolidBrush(color41); GfxRoundRect( 39,pxchartheight-51,49,pxchartheight-61 ,2,2) ; GfxSelectSolidBrush(color51); GfxRoundRect( 39,pxchartheight-63,49,pxchartheight-73 ,2,2) ; GfxSelectSolidBrush(color61); GfxRoundRect( 39,pxchartheight-75,49,pxchartheight-85 ,2,2) ; GfxSelectSolidBrush(color71); GfxRoundRect( 39,pxchartheight-87,49,pxchartheight-97 ,2,2) ; GfxSelectSolidBrush(color1); GfxRoundRect( 51,pxchartheight-15,61,pxchartheight-25 ,2,2) ; GfxSelectSolidBrush(color2); GfxRoundRect( 51,pxchartheight-27,61,pxchartheight-37 ,2,2) ; GfxSelectSolidBrush(color3); GfxRoundRect( 51,pxchartheight-39,61,pxchartheight-49 ,2,2) ; GfxSelectSolidBrush(color4); GfxRoundRect( 51,pxchartheight-51,61,pxchartheight-61 ,2,2) ; GfxSelectSolidBrush(color5); GfxRoundRect( 51,pxchartheight-63,61,pxchartheight-73 ,2,2) ; GfxSelectSolidBrush(color6); GfxRoundRect( 51,pxchartheight-75,61,pxchartheight-85 ,2,2) ; GfxSelectSolidBrush(color7); GfxRoundRect( 51,pxchartheight-87,61,pxchartheight-97 ,2,2) ; _SECTION_END();