My first post here :-). Have been using amibroker for few months now and I love it. My question is pertaining to backtesting, I have data for 1700 odd Indian equity stocks from year 2000. Is there a way wherein I can filter top 200 stocks by market cap for backtesting on daily basis and run the script only on those stocks.
Buy = Cross ( EMA (C,9), EMA(C,100));
Sell = Cross ( EMA (C,34), EMA(C,9));
SetOption( "MaxOpenPositions", Open_positions );
SetOption( "WorstRankHeld", Open_positions*2 );
SetPositionSize( 100/Open_positions, spsPercentOfEquity );
Say for example I will check on 1st Jan 2000 for top 200 stocks by market cap and run my scrip, now suppose one trade is closed on 8th Jan and only 4 trades are live. (I am running 5 live positions simultaneously). For adding new trade (5th Live position) on 9th Jan script should check for top 200 socks by market cap on that day (or previous day) and select a trade accordingly.
Hope my query is clear. Also I tried searching for this query on group but couldn’t find anything concrete, if this query has been already answered kindly redirect me to that thread.
Thanks and Regards,