Originally Posted By: "Code"

function run()
{
set(TESTNOW|PLOTNOW|PARAMETERS);
NumWFOCycles = 8;
BarPeriod = 1440;

while(asset(loop("EUR/USD","AUD/USD","USD/CHF")))
{
var Period = optimize(5,3,15);
var EMA5H = LowPass(series(priceHigh()),3*Period);
var EMA5L = LowPass(series(priceLow()),3*Period);

Stop = (HH(2) - LL(2)) * optimize(1,0.5,5);

if(priceOpen() > EMA5H && priceClose() < EMA5H && priceLow() > EMA5L)
enterShort();
else if(priceOpen() < EMA5L && priceClose() > EMA5L && priceHigh() < EMA5H)
enterLong();
}
}


Originally Posted By: "Result"

Annual return 471%
Profit factor 2.69 (PRR 2.08)
Sharpe ratio 1.53
Kelly criterion 0.51
OptimalF .082
Ulcer index 7%
Prediction error 44%


Change USD/CAD to USD/CHF and the results get even better. jcl I was wondering if we could do another example of setting up the optimal margin and lots on this because I seem to be having alot of trouble getting it to work because in this example we are only using one strategy instead of multiple as like in Workshop 6_2.

One last thing is it possible to set the lots so they increase depending on account size. Say for an random example you want to risk 3% of your current balance on every new trade which sets 30 pip stops. Starting with say 1,000 capital I would normally work out ((Capital/100*Risk%)/Stop) = $ per contract
((1000/100*3)/30 = $1.00 per contract = 0.1 lot. OR