Top Down approach for analysis

Hello,

I wanted to perform a top down approach analysis but failed to do it.

What i wanted to do exactly is to analyze all sectors' inside a market for buy and sell signals then go for second step for those who have a buy signal.

step 2 would be to analyze stocks inside sectors (listed in a watchlist with the sectors name) with buy signals from step 1 and act with the output signals of them (buy/sell).

EX:
we have the following sectors' charts with 3 stocks of each
energy ( c1 ,c2 ,c3 )
banking (c4 ,c5 ,c6)
food industry (c7,c8,c9)

step 1 would yield the following
energy (sell)
banking(buy)
food industry(sell)

step 2 analyze only assets inside banking
c3 (buy)
c4 (sell)
c5 (buy)

step 3 buy c3 and c5 only.

I tried navigating using setforeign then buy and sell but then read that i can't buy or sell anything except the current stock only.

Thanks in advance,

@ahm.montaser your example seems incorrect, your "c3" is a energy sector stock and you wanted that sector to be on a "sell" ??

I don't know where that misinformation comes from. You can build a portfolio easily. It is all in the user guide,
https://www.amibroker.com/guide/h_portfolio.html

Perhaps you should read about ranking as it appear that you want to rank sectors and then stocks. Many examples on the forum and in the user guide.
https://www.amibroker.com/guide/h_ranking.html

http://www.amibroker.com/kb/2016/01/30/separate-ranks-for-categories-that-can-be-used-in-backtesting/

Try writing some examples and if you get stuck show the forum where you are in need of more code writing help.

Good luck!

3 Likes