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

AOTS for PSE for Amibroker (AFL)

Rating:
3 / 5 (Votes 3)
Tags:
amibroker, Moving Averages, exploration

This is Alignment of the Stars originally named by Zeafreaks from the Philippines. It’s all about the alignment of ma 20 50 100.

More info can be found at this link here…

Screenshots

Indicator / Formula

Copy & Paste Friendly
//Disclaimer:
//All the AFL’s posted in this section are for learning purpose.
//I do not necessarily own these AFL’s and I don’t have any intellectual property rights on them. I might copy useful AFL’s from public forums 
//and post it in this section in a presentable format. The intent is not to copy anybody’s work but to share knowledge. 
//If you find any misleading or non-reproducible content then please disregard this AFL
//START////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//AOTS
ma20 = MA(C, 20);
ma50 = MA(C, 50);
ma100 = MA(C, 100);

// AOTS just formed or aligned
aots_cross = WriteIf((Cross(ma20, ma50) AND (ma50 > ma100)) OR
(Cross(ma20, ma100) AND (ma20 > ma50 > ma100)) OR
(Cross(ma50, ma100) AND (ma20 > ma50)), "YES", "NO");

// AOTS = MA20 above MA50 and MA50 above MA100
aots = WriteIf((ma20 > ma50 AND ma50 > ma100), "YES", "NO");
//END////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//START///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Zeus Strike

// MA100 crosssed below Price
zeus_strike = WriteIf(Cross(C, ma100), "YES", "NO");
//END///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Filter = C;


AddTextColumn(aots_cross, "AOTS Cross", 1.0, colorWhite, IIf(aots_cross == "YES", colorGreen, IIf(aots_cross == "NO", 0, 0)));
AddTextColumn(aots, "AOTS", 1.0, colorWhite, IIf(aots == "YES", colorGreen, IIf(aots == "NO", 0, 0)));
AddTextColumn(zeus_strike, "Zeus Strike", 1.0, colorWhite, IIf(zeus_strike == "YES", colorGreen, IIf(zeus_strike == "NO", 0, 0)));

7 comments

1. krisniks02

I forgot to add. there’s a Zeus strike and before aligning column also.

2. nareshpriya

unfortunately not plotting anything krish :(

3. nareshpriya

4. krisniks02

Its for simple trend following.

5. krisniks02

Please use analysis>explore to see the results.

7. nareshpriya

I have made few changes to the code. now it plots. check it out sogilanon :)
============= By the way, request all participants on this site, to also click advertisements on the page u see. It will help the owner to maintain the servers. Everything requires money guys & so support the owner in ur small way by just clicking the advertisements. ================

_SECTION_BEGIN("AOTS for pse");
//START////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//AOTS
ma20 = MA(C, 20);
ma50 = MA(C, 50);
ma100 = MA(C, 100);

// AOTS just formed or aligned
aots_cross = WriteIf((Cross(ma20, ma50) AND (ma50 > ma100)) OR
(Cross(ma20, ma100) AND (ma20 > ma50 > ma100)) OR
(Cross(ma50, ma100) AND (ma20 > ma50)), "YES", "NO");

// AOTS = MA20 above MA50 and MA50 above MA100
aots = WriteIf((ma20 > ma50 AND ma50 > ma100), "YES", "NO");
//END////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//START///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Zeus Strike

// MA100 crosssed below Price
zeus_strike = WriteIf(Cross(C, ma100), "YES", "NO");
//END///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Filter = C;


AddTextColumn(aots_cross, "AOTS Cross", 1.0, colorWhite, IIf(aots_cross == "YES", colorGreen, IIf(aots_cross == "NO", 0, 0)));
AddTextColumn(aots, "AOTS", 1.0, colorWhite, IIf(aots == "YES", colorGreen, IIf(aots == "NO", 0, 0)));
AddTextColumn(zeus_strike, "Zeus Strike", 1.0, colorWhite, IIf(zeus_strike == "YES", colorGreen, IIf(zeus_strike == "NO", 0, 0)));
_SECTION_END();

_SECTION_BEGIN("Price1");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

Plot(ma20 ,"ma20 ",colorGreen);
Plot(ma50 ,"ma50",colorBlue);
Plot(ma100,"ma100",colorViolet);
aots_cross =(Cross(ma20, ma50) AND (ma50 > ma100)) OR
(Cross(ma20, ma100) AND (ma20 > ma50 > ma100)) OR
(Cross(ma50, ma100) AND (ma20 > ma50));
aots = (ma20 > ma50 AND ma50 > ma100);
zeus_strike = Cross(C, ma100);

PlotShapes(

//IIf(aots , shapeStar, shapeNone), colorBrightGreen, 0, H, 15);
IIf(aots_cross, shapeStar, shapeNone), colorBrightGreen, 0, H, 15);
PlotShapes(
IIf(zeus_strike, shapeStar, shapeNone), colorRed, 0, H, 15);
8. krisniks02

@nareshpriya Sorry for the late reply. I’m using it and its working fine with me. I’ll try your code later. Thanks!

Leave Comment

Please login here to leave a comment.

Back