Try this Larry... long time since I coded it... but should work...

Diverg = ParamToggle( "Divergence", "No|Yes", False );
Today_Only = ParamToggle( "Plot Today Only", "No|Yes", False );
Threshold = 85;
Data2 = Foreign( "TRIN.Z", "Close" );
Data3 = Foreign( "NASTRIN.Z", "Close" );
Interval_Secs = Interval();
LiveTime = TimeNum();
PlotTrigger = IIf( ( Now( 6 ) == Day() AND Today_Only == True AND ( LiveTime > 
93000 AND LiveTime < 160600 ) ), True, Null );
PlotTrigger = IIf( ( Today_Only == False AND ( LiveTime > 93000 AND LiveTime < 
160600 ) ) OR Interval_Secs > 86399, True, PlotTrigger );


Value1 = Nz( log( Data2 ) );
Value2 = Nz( log( Data3 ) );
Value3 = -( Value1 + Value2 ) * 100;
Value3 = Value3 * PlotTrigger;

Cond1 = Value3 < 0 AND Ref( Value3, -2 ) < -Threshold AND Value3 > Ref( Value3, 
-2 ) AND Value3 < Ref( Value3, -1 ) AND L < Ref( L, -2 );
Cond2 = Value3 < 0 AND Ref( Value3, -3 ) < -Threshold AND Value3 > Ref( Value3, 
-3 ) AND Value3 <= Ref( Value3, -1 ) AND Value3 <= Ref( Value3, -2 ) AND Ref( 
Value3, -2 ) > Ref( Value3, -3 ) AND L < Ref( L, -3 );
Cond3 = Value3 > 0 AND Ref( Value3, -2 ) > Threshold AND Value3 < Ref( Value3, 
-2 ) AND Value3 > Ref( Value3, -1 ) AND H > Ref( H, -2 );
Cond4 = Value3 > 0 AND Ref( Value3, -3 ) > Threshold AND Value3 < Ref( Value3, 
-3 ) AND Value3 >= Ref( Value3, -1 ) AND Value3 >= Ref( Value3, -2 ) AND Ref( 
Value3, -2 ) < Ref( Value3, -3 ) AND H > Ref( H, -3 );

Colorplot = Cond1 * colorBrightGreen + Cond2 * colorBrightGreen + Cond3 * 
colorRed + Cond4 * colorRed;


Plot( Value3, "Better_TRIN", colorLightBlue, styleLine );
Plot( 0, "", colorSeaGreen, styleLine | styleDashed | styleNoRescale );
Plot( 100, "", colorYellow, styleLine | styleDashed );
Plot( -100, "", colorYellow, styleLine | styleDashed );

shape = Diverg * ( Cond1 * shapeSmallCircle + Cond2 * shapeSmallCircle + Cond3 
* shapeSmallCircle + Cond4 * shapeSmallCircle );
PlotShapes( shape, Colorplot, 0, Value3, 0 );



--- In [email protected], "larypowell_0649" <larypow...@...> wrote:
>
> There is an indicator written for TradeStation, I looked in AFL Library on 
> the web and could not find it there.  Does anyone have this in afl format?  
> If so would you mind sharing?  
> 
> Thanks, Larry
>


Reply via email to