NeuroShell trading strategies allow you to enter a number of rules, and then let the optimizer select the N best. Currently N is limited to 5 and cannot be optimized, so we have created a simple indicator in PowerBasic to help you around those limitations. It is called Rules, and can be used as a single rule in a trading strategy to evaluate whether N of up to 10 other rules are true.
Rules takes 12 parameters. The First one, Rulecount, tells it how many rules (up to 10) you will be providing. The second parameter, Truecount, tells how many of the rules you want to be true before the indicator is true. Both Rulecount and Truecount can be optimized. So if you set Rulecount to 8, and Truecount to 6, you will be looking for 6 of the 8 rules you provide to be true, assuming you do not let the optimizer change Rulecount and Truecount.
Parameters 3 through 12 is where you insert your rules. These must be true/false rules like A>B or crossovers, etc. In other words, if you insert them onto the chart, they must plot only 0 or 1.
If you are not providing all ten rules, you will just let the remainder of the parameters default to the close. The Rules indicator will not examine any more than Rulecount rules, so the parameters set to close will be ignored.
Click here to download the files for Rules. The files rules.tpl and rules.dll should be placed into the Template folder of NeuroShell Trader 5. Then reboot NeuroShell and find the Rules indicator in the Custom Indicators category. The rules.bas file is the PowerBasic source code, which you can modify, or open in Notepad if you just want to examine it.