|
Kiran
2015-04-17 20:34:32
|
|
I have a simple trading system based on a ruleset with 30 rank-metrics, and need to iterate through these - I have set to 10 positions, Stop 5-bar, Trailing Stop 10%.
The system simulates fine, but when i optimize, it only runs through 1 iteration.
What's wrong with my code below to iterate through the various rank-metrics? I used the simple example from http://www.quantshare.com/sa-586-let-me-show-you-how-to-create-hundreds-of-profitable-trading-systems
ctRank = ApplyRule("", "Ranking_rules", -1); // Return number of rank-metrics in ruleset
Optimize("rankIndex", 0, ctRank - 1, 1);
rankMetric = ApplyRule("", "Ranking_rules", rankIndex); //rank metric in each iteration
rank1 = comp(rankMetric, "percentile"); //
SetSimLongRank(rank1);
buy = 1;
|
|