1. I'm confident you can, but it can be a long road of testing & evaluating certain concepts, rules, models, etc. 2. Not yet! 3. I believe that machine learning is def the way to go. These algos are way more objective & sophisticated than simple trading rules (please forget technical analysis). 4. Create a large data set, train a model (I use R), while preventing over-fitting as much as possible by applying techniques like cross-validation or the AIC or BIC criterion and out-of-sample test this in Zorro. Store all results in an organized way.
Bonus tip: there are esp 3 important concepts about machine learning that you need to understand: sample size determination, variable-selection methods (i.e. variable importance) and the bias-variance tradeoff.
I am not sure that I understood the problem, but priceHigh(1) is the high of the last time period, not the high of the last day. Make sure that the bar period is not smaller than your historical data resolution, and that the main asset is selected in your script before any secondary assets.
The different commission formulae are for different calculations. 1) is the conversion of percentage to amount and 2) the commission of a trade. And I think indeed that LotAmount does not belong in 2) because it's already contained in the pip cost. So it should cancel out. I'll check that and make it more clear in the manual.
Quick question: so, on each invocation of run(), the series values in, say, series should give the current value that was calculated, independent of how many are being stored via the lookback period default length? Am assuming that the series acts like a queue, with data shifted from  to ...up through [lookback length -1] and the new data being placed in .
there are some differences how a commission is calculated in different parts of the Zorro-manual. First I thought only one can be right. But meanwhile I don't think either is.
1.) https://www.zorro-trader.com/manual/en/account.htm Text: "...percentage of the trade value...negative percent value... The commission is then automatically calculated from the percentage using the formula Commission = -Percent/100 * Price / LotAmount * PIPCost / PIP. "
Formula in text: Commission = -Percent/100 * Price (/ LotAmount * PIPCost / PIP)
In other ways: -Percent/100 * Price * (Exchange rate counter -> account-currency) --> Aren't the Lots missing here?