Posted By: GPEngine
asset loop + set(PARAMETERS+RULES) --> Error 042 - 05/13/14 02:15
The manual says
but Zorro doesn't seem to do that. Train on the following script leads to Can you please explain why?
Quote:
If the parameters affect the rules, set the RULES and PARAMETERS modes at the same time. Every optimization cycle then will first generate the rules, then in a second run determine the performance and use it for finding the best parameter value. After the optimal parameters are found, another cycle is run for generating the final rules with the optimal parameter set.
but Zorro doesn't seem to do that. Train on the following script leads to
Code:
Error 042: CHF/JPY: parameters not found!,
Code:
string selected_asset; function run() { if (is(INITRUN)) { BarPeriod = 348; LookBack = 501; StartDate = 20131020; EndDate = 20140420; set(RULES); set(PARAMETERS); if (Train) { Hedge = 2; Detrend = 1; } else { set(NFA); Hedge = 4; Detrend = 0; } TradesPerBar = 2; Weekend = 1; EntryTime = 1; ExitTime = 24 * 60 / BarPeriod; NumOptCycles = 2; NumSampleCycles = 2; NumWFOCycles = 22; Confidence = 75; } while(selected_asset = loop("CAD/JPY", "CHF/JPY")) { asset(selected_asset); var atrx = ATR(238); TakeProfit = 3 * atrx; Stop = 2 * atrx; vars Price = series(price()); var p00 = optimize(174, 87, 348, -100); var v00 = StdDev(Price, p00); if (adviseLong(PERCEPTRON, 0, v00) > 0) { enterLong(); } if (adviseShort(PERCEPTRON, 0, v00) > 0) { enterShort(); } } }