Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Trix Bars number for Amibroker (AFL)

Rating:
3 / 5 (Votes 4)
Tags:
oscillator, amibroker

1.Trix Bars number for each swing
2.Trix’s ribbon
3. plot a text at 5% from bottom’s pane

Screenshots

Similar Indicators / Formulas

Febo RSI ..real indicator
Submitted by abhinavsingh over 12 years ago
Trading Volume Statistic
Submitted by tuanstock1 almost 10 years ago
Ergodic Oscillator
Submitted by dljtrader over 13 years ago
3 Days Track
Submitted by janet0211 almost 14 years ago
Chande Momentum Oscillator
Submitted by klimpek over 13 years ago
BoH Risk Aversion Indicator
Submitted by genkumag over 12 years ago

Indicator / Formula

Copy & Paste Friendly
//	Trix Bars number

//	Trix Bars number for each swing

periods = Param( "Periods", 5, 2, 200, 1 );
TrixOnClose = Trix( periods );

uptx = TrixOnClose >= Ref( TrixOnClose, -1 );
dntx = TrixOnClose <= Ref( TrixOnClose, -1 );

Peaktrix = TrixOnClose > Ref( TrixOnClose, -1 )AND TrixOnClose > Ref( TrixOnClose, 1 );
Troughtrix = TrixOnClose < Ref( TrixOnClose, -1 )AND TrixOnClose < Ref( TrixOnClose, 1 ) ;

BarsUp = BarsSince( dntx );
BarsDn = BarsSince( uptx );

Colortx = IIf( uptx , colorGreen, IIf( dntx , colorRed, colorGreen ) );

Plot( TrixOnClose, "Trix (" + periods + ")" , Colortx, styleThick );

// Trix's ribbon
Ribbon = IIf( uptx , colorBrightGreen, IIf( dntx , colorRed, colorBrightGreen ) );
Plot( 3, "", Ribbon , styleOwnScale | styleArea | styleNoLabel, 0, 100 );

// plot a text at 5% from bottom's pane
percent = Param( "PositText%", 5, 2, 90, 0.5 );
Miny = Status( "axisminy" );
Maxy = Status( "axismaxy" );
y = Miny +  ( Maxy - Miny ) * percent / 100; // at 5 % above bottom of the pane

for ( i = 0; i < BarCount; i++ )
{
    if ( Peaktrix [i] )
        PlotText( "" + BarsUp [ i ], i - BarsUp [ i ] / 2 + 1, y, colorGreen );

    if ( Troughtrix [i] )
        PlotText( "" + BarsDn [ i ], i - BarsDn [ i ] / 2 + 1, y, colorRed );
}

GraphXSpace = 10;

0 comments

Leave Comment

Please login here to leave a comment.

Back