Hi, I've encountered a problem in quanstrat framework, in case I want to trade not just signalCrossovers (or better said, the modified version of a Crossover). Specifically i would like to e.g. go Long if Price>MovingAverage and Exit if Price<MovingAverage. This means, that if we have on a <b>starting *day Price>MovingAverage (not a crossover, just "above"), i want the system to buy immediately on a starting day. However, just once. If i tried sigComparison, this solved the problem with trading immediately on a starting day, but started trading *anytime* a Price>MovingAverage (every day in a row). To sum up, I need to know how to modify sigCrossover to trade also in case "ABOVE" (not just crossover, e.g. on a start day if condition is met) or how to modify sigComparison to make only 1 Long order (not every day the condition is met, only on 1st and then not until Exit is made). Thanks, best regards, Igor -- View this message in context: http://r.789695.n4.nabble.com/Quantstrat-trading-not-just-Crossovers-e-g-Moving-Average-tp3760436p3760436.html Sent from the Rmetrics mailing list archive at Nabble.com.
Quantstrat - trading not just Crossovers (e.g. Moving Average)
1 message · Igor Chernukhin