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

Trend All About for Amibroker (AFL)
morgen
almost 14 years ago
Amibroker (AFL)

Rating:
5 / 5 (Votes 1)
Tags:
oscillator, amibroker

It’s about Trend!
You can try also Buy/Sell section.

Similar Indicators / Formulas

Debu Market Efficiency Ratio
Submitted by agent301 over 11 years ago
MACD (new timing)
Submitted by tigernifty over 11 years ago
3 Days Track
Submitted by janet0211 almost 14 years ago
KILL THE OPERATOR MACD
Submitted by prasadmuni over 11 years ago
%R ++
Submitted by reb almost 14 years ago
DMI Spread
Submitted by pipstar almost 14 years ago

Indicator / Formula

Copy & Paste Friendly
//TREND ALL ABOUT

/*-----------------------------------------------------------
MTR Investors Group - www.MTRIG.com

Color MACD Histogram Bars. Use on weekly chart to determine
market trend. See Elder "Come into my trading room"
-------------------------------------------------------------*/

r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );

ml = MACD(r1, r2);
sl = Signal(r1,r2,r3);
Hist = ml-sl;

MACUP = Hist > Ref(Hist,-1) AND Hist>0;
MACDN = Hist < 0 ;
BarColor  = IIf(MACUP,colorLime,IIf(MACDN,colorCustom12,colorAqua));

//Plot( Hist, "MACD Histogram", ParamColor("Histogram color", colorBlack ), styleNoTitle | ParamStyle("Histogram style", styleHistogram | styleNoLabel, maskHistogram ) );
Plot( Hist, "MACD Histogram", BarColor  , styleHistogram |styleThick|styleOwnScale);
//Plot(0, "0", colorBlack );
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


//Trend Following Systems DO NOT work when ADX is Below 20 - Tech Analysis A-Z; page 120

P1 = Param("Period",14,0,100,1);

MyPDI= PDI(P1);//Positive Directional Indicator

MyMDI= MDI(P1);//Negative Directional Indicator (Minus)

MyADX= ADX(P1);//Average Directional Movement Index

//Green ADX Line=Rising; Red ADX Line=Falling

col = IIf( MyADX > Ref( MyADX, -1 ), colorSeaGreen, colorAqua );

Plot( MyPDI,"+DI",colorLime, styleLine |styleThick);

Plot( MyMDI,"-DI",colorOrange, styleLine |styleThick);

Plot( MyADX,"ADX",col, styleDots );

Title=Name()+ " " + Date() + " Price: " + C + EncodeColor(colorBlack) +"  ADX" + WriteVal( MyADX )+ EncodeColor(colorGreen) + " 
      +DMI" + WriteVal( MyPDI )+ EncodeColor(colorRed) + "  -DMI" + WriteVal( MyMDI );

//BUY/SELL ;try to activate this, AFTER disactivate the other "plot lines" and simply drag-and-drop on the pricechart

//Buy=MAcup AND mypdi>mymdi AND ADX()<40;
//Sell=MACDn ;

//Buy=ExRem(Buy,Sell);
//Sell=ExRem(Sell,Buy);

//PlotShapes(IIf(Buy,shapeUpTriangle,shapeNone),colorAqua,0,L,Offset=-20);
//PlotShapes(IIf(Sell,shapeDownTriangle,shapeNone),colorCustom12,0,H,Offset=-20);

3 comments

1. mahesh.aranake

How to try the buy sell section – could you post the modified formula?

2. morgen

To mahesh.aranake
See the formula in Buy/Sell section:
1)Disactivate “plot lines” with “//”;
2)Activate Buy/Sell to see like that:

Buy=MAcup AND mypdi>mymdi AND ADX()<40;
Sell=MACDn ;

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

So, without “//”!

3. mahesh.aranake

Thank you Morgen for the prompt assistance – it works fine and also gave me some more knowledge of AFL syntax

Leave Comment

Please login here to leave a comment.

Back