[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Re: Better Trin Indicator


  • Date: Thu, 18 Mar 2010 11:08:05 -0700
  • From: "larypowell" <larypowell@xxxxxxxxxxxxx>
  • Subject: RE: [amibroker] Re: Better Trin Indicator

PureBytes Links

Trading Reference Links

Rob,  Thank you.  I plots, so now I will work with it and see if it helps
add to the bottom line.

Larry M. Powell
 
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Rob
Sent: Thursday, March 18, 2010 10:33 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Better Trin Indicator

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 amibroker@xxxxxxxxxxxxxxx, "larypowell_0649" <larypowell@xxx> 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
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links





------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/