Forum Replies Created
-
AuthorPosts
-
Stephen JamesMember
Glen
If you can’t find an option as you have described you can use this setting to test MR systems as the cash account will allow.
SetOption(“SettlementDelay”,1);
Note the value is a day, not bar. More here for running a detailed log report:-
Stephen JamesMemberAn exploration is probably the better way to see what is going on here.
Cond7 will just return zero for each symbol as it is switching between several sector symbols for the condition.
Part of the code is missing and that is where is it combined with the RSI value for each stock symbol in PositionScore:
PositionScore = RSI(60) + rsisector;So it takes the RSI of the sector symbol if above the minimum and adds it to the stock RSI value to gain a ranking.
Add some exploration columns for Cond7, the stock RSI and PositionScore to see it all together and confirm with RSI values from charts of each sector and symbol.
Stephen JamesMemberTrent
Check the rank values in the exploration and make sure they are not rounding to be the same. Increase decimals if that is the case and run again.
Stephen JamesMemberTerry
Scott’s direction will also show your processor speed which is also a factor.
e.g. Intel Core 17-6600U CPU 2.60GhzThe CPU usage can be monitored in AmiBroker while doing a test – Go to the Tools menu and open Performance Monitor. If a test is pushing this toward 100% then the computer is probably struggling.
Other ways to potentially speed up tests include:-
1. Go to Tools>Preferences>Data and increase In-memory cache sizes, both max symbols and megabytes. I have 20,000 and 10,000 respectively so just increase toward that as accepted by your computer.2. Ensure Local data storage is selected – File>Data Base Settings>Enable local storage. It can then help to do a single run over the data before a test to speed it up – e.g. if doing a monte carlo test, perform a single run backtest first, then the MC test, for a walk forward test do a single run backtest on the first date selection of in sample data only.
3. Turn off the NDU auto update to make sure there are no data download interruptions.
Stephen JamesMemberIt was a secondary file for Julian’s CBT code to track open positions etc. Should be stored in AmiBroker>Formulas>Include.
Stephen JamesMemberThat should be OK.
sectorID() identifies which sector each stock symbol is assigned to via the number of the sector (hover your cursor over the sectors under the Sectors folder in the symbols tab.
It then obtains rank for each sector symbol being used, e.g. $S&P1500M and combines that with the rank of individual symbols if they fall into corresponding sectorID.
To test add the combined rank and individual rank into exploration columns and if they return the same value there is probably and issue.
Stephen JamesMemberJulian,
you can only use sectors that are in the data base – see the Groups folder under the Symbols tab.
Staples should be $SP1500S.
Stephen JamesMemberNorgateIndexConstituentTimeSeries(“$RUI”) ensures that the symbol was a member of that index at the time of the setup signal, thus eliminating survivorship bias.
That will be the case regardless of the watchlist being tested so the idea is to match them both up, so in regard to a custom watchlist it depends on your list constituents, testing goals and which index you want symbols to be a member of.Stephen JamesMemberAssuming you have a watchlist of 5 cent tick size symbols:
W2 = InWatchListName(“US Five Cent”);
Tick = IIf(W2,0.05,0.01);The “Name” must match your watchlist name exactly.
Stephen JamesMemberI’ve emailed you the template Roberto
Stephen JamesMemberJust limit the max (4th) variable in the Param function Julian.
Param(“Name”,default,min,max,step)Stephen JamesMember100+ a ranking value will give you the highest
100- a ranking value will give the lowest.Search RSI and RSIa in the user guide for the different options/variables.
SetSortColumns determines column sorting order in the explorer.
Stephen JamesMemberBoth personal preference and dependant on what you have in the index filter.
If using indicators or more than one array then SetForeign is more efficient. If the filter is a straight forward MA as in the course it probably easier to stick with what you have.
Stephen JamesMemberRob,
Both pieces of code you posted use Foreign which has to specify a data field, in this case the Close – “C” so anything coded with ‘Index’ in this case is using the close of the chosen symbol only. So both pieces are essentially the same.The other way is to use SetForeign which then changes all arrays (open, close, high, low, volume) to that of the symbol chosen.
See here for more:Index Filters
Stephen JamesMemberOr export the test data to excel and do it there.
-
AuthorPosts