Posted By: trenki2
YenTrader System - 08/15/16 19:13
Hi! I have found a simple system which works on the USD/JPY pair.
Once daily go long or short depending on two moving averages and use a stop loss.
It gives positive returns in the long run but a very low win rate.
I tried to optimize it with an equity filter. The filter reduced the drawdown but unfortunately also the total return.
Is this system any good? How could it be improved. Would you trade it or is it not usable?
For some reason I also get completely different results when using
I dont understand why that is. Using set(TICKS) gives different results again.
Once daily go long or short depending on two moving averages and use a stop loss.
It gives positive returns in the long run but a very low win rate.
Code:
bool UseEquityFilter = false; function TradeYenTrader() { vars Price = series(price()); vars SMASlow = series(SMA(Price, optimize(100, 5, 200, 5))); vars SMAFast = series(SMA(Price, optimize(50, 5, 200, 5))); Stop = optimize(15, 5, 50) * PIP; Trail = optimize(1, 1, 20) * PIP; // Equity curve filter var LotsBackup = Lots; if (UseEquityFilter) { vars EquityCurve = series(EquityLong+EquityShort); vars EquityLP = series(LowPass(EquityCurve,75)); if(EquityLP[0] < LowPass(EquityLP,100) && falling(EquityLP)) Lots = -1; else Lots = 1; } if (NumOpenShort + NumOpenLong == 0) { if (SMAFast[0] > SMASlow[0]) { Margin = 0.5 * OptimalFLong * Capital * sqrt(max(1, Balance/Capital)); enterLong(); } else { Margin = 0.5 * OptimalFShort * Capital * sqrt(max(1, Balance/Capital)); enterShort(); } } Lots = LotsBackup; } function run() { set(PARAMETERS+FACTORS); BarPeriod = 1440; LookBack = 200; StartDate = 20010101; EndDate = 20160601; MonteCarlo = 1000; Confidence = 100; Capital = 10000; NumWFOCycles = 10; asset("USD/JPY"); TradeYenTrader(); }
I tried to optimize it with an equity filter. The filter reduced the drawdown but unfortunately also the total return.
Is this system any good? How could it be improved. Would you trade it or is it not usable?
For some reason I also get completely different results when using
Code:
BarPeriod = 60; TimeFrame = 24; LookBack = 200;
I dont understand why that is. Using set(TICKS) gives different results again.