| Trading Indicators Post your custom trading indicators. If you download, remember to click INSTALL. |
![]() | | Tweet | |
MA Extention Details »» | |||||||||||||||||||||||||
I need a little help with some coding. I have a TS MA that has a TL attached to it in order to extend the MA off into the future. I cannot figure out how to set the color of the TL within the code. I have the code below and would appreciate it if somebody could help me out. Thanks. Pi inputs: Price( (high+low)/2), Length( 21), Displace( 0) ; variables: Avg( 0 ), TL (-1); Avg = AverageFC( Price, Length ) ; if Displace >= 0 or CurrentBar > AbsValue( Displace ) then begin Plot1[Displace]( Avg, "Avg" ) ; Once TL=TL_New(Date,Time,0,Dat e,Time,0); TL_SetEnd(TL,Date[Displace],Time[Displace],Plot1 [Displace] ); TL_SetBegin(TL,Date[Displace+1],Time[Displace+1],Plot1[Displace+1]); TL_SetExtRight(TL,true) ; End; { Alert criteria } if Displace <= 0 then begin if Price crosses over Avg then Alert( "Price crossing over average" ) else if Price crosses under Avg then Alert( "Price crossing under average" ) ; end ; Show Your Support
| |||||||||||||||||||||||||
![]() |
| Thread Tools | |
| Help Others By Rating This Thread | |
| |