Page 1 of 1

_SHME_4HourTunnelTgt

Posted: Wed Dec 06, 2006 3:29 pm
by jtrade
I intended to simply add the 89pip target to this indicator by removing the relevant brackets in the original code, but for some reason it's not "flipping" with the others : I would be really grateful if TRO or someone else could take a look and correct, please !

Code: Select all

[LegacyColorValue = true];


// _SHME_4HourTunnelTgt


{ original indicator:  https://www.tradestation.com/Discussions/Topic.aspx?Topic_ID=49734&PAGE=6 }

{Attn: TradeStation
if this indicator is posted on the TradeStation Forum, I, TheRumpledOne, did NOT post it there,
so I can't be blamed for this indicator having my contact info.}


{Programmer:  Avery T. Horton, Jr.  aka TheRumpledOne,
gifts and donations accepted, PO Box 43575, Tucson, AZ 85733 }

{ © Copyright 2006 Avery T. Horton, Jr.}

Inputs:  FastLen(8), SlowLen(55) ;

Var:   FastSMA(0), SlowSMA(0), MinSMA(0), MaxSMA(0) ;

{FastSMA = Average( c, FastLen ) ;}
SlowSMA = Average((H+L)/2, SlowLen ) ;

{
MinEMA = minlist( FastEMA , SlowEMA ) ;
MaxEMA = maxlist( FastEMA , SlowEMA ) ;
}
value1 = SlowSMA - .0089 ;
value2 = SlowSMA - .0144 ;
value3 = SlowSMA - .0233 ;
value4 = SlowSMA - .0377 ;
{value5 = MinEMA - .0610 ;}

value11 = SlowSMA + .0089 ;
value12 = SlowSMA + .0144 ;
value13 = SlowSMA + .0233 ;
value14 = SlowSMA + .0377 ;
{value15 = MaxEMA + .0610 ;}



if close < SlowSMA
then begin

plot1( value1  , "X1", yellow ) ;

plot2( value2  , "X2", red ) ;

plot3( value3  , "X3", green ) ;

plot4( value4  , "X4", blue ) ;
end
else    
if close > SlowSMA
then begin

plot1( value1  , "X1", yellow ) ;   

plot2( value12  , "X2", red ) ;

plot3( value13  , "X3", green ) ;

plot4( value14  , "X4", blue ) ;

{plot15( value15  , "X15", blue ) ;}
end
else begin

plot2( value2  , "X2", red ) ;

plot3( value12  , "X3", red ) ;
   
end;




TIA,

J.

PS. I realise I have this on a 3hr timeframe, not 4hr, but assume this makes no difference to this issue.

Posted: Thu Dec 07, 2006 12:18 am
by TheRumpledOne
if close < SlowSMA
then begin

plot1( value1 , "X1", yellow ) ;

plot2( value2 , "X2", red ) ;

plot3( value3 , "X3", green ) ;

plot4( value4 , "X4", blue ) ;
end
else
if close > SlowSMA
then begin

plot1( value1 , "X1", yellow ) ;

plot2( value12 , "X2", red ) ;

plot3( value13 , "X3", green ) ;

plot4( value14 , "X4", blue ) ;



Change value1 to value11

Posted: Thu Dec 07, 2006 8:20 am
by jtrade
Thanks so much, TRO - that did the job !

:smt023

J.