Normal
Here's what I get with some of the params with optimization. I'm still learning amibroker, and my data isn't the best. I've done it only on the current ASX 300 over 10 years.If it's any use I can adjust any of the optimizations or details.The attached file is actual a .zip file renamed to .pdf to get around the file restrictions on the site. So you need to save it and rename.// The optimize params mean in order default, min value, max value, step// So HighBreakout will try 5, 10, 15, 20HighBreakOut = Optimize("HighBreakOut", 10, 5, 20, 5);ShortEMA = Optimize("ShortEMA", 40, 10, 60, 10);HighestHigh = Optimize("HighestHigh", 70, 30, 120, 20);LongEMA = Optimize("LongEMA", 180, 120, 360, 30);SetOption("CommissionMode", 2); //$$ per tradeSetOption("CommissionAmount", 30);SetOption("MaxOpenPositions", 10 );SetOption("InitialEquity", 100000 );PositionSize = -10; // always invest only 10% of the current Equitycond1=Cross(H,Ref(HHV(H,HighBreakOut),-1)); // when todays high crosses last highest high over the last 10 periodscond2=H > EMA(C,ShortEMA); // todays high is greater than the 40 day Exp MA of closescond3=HHVBars(H,HighestHigh) == 0; // todays high is the highest for 70 periodscond4=EMA(V*C,21) > 500000; // ensure at least $500k of money flowcond5=C < 10.00; // only trading in stocks less than $10cond6=C > O; // todays close higher than open// the following line is the trigger if all conditions satisfiedBuy=cond1 AND cond2 AND cond3 AND cond4 AND cond5 AND cond6;// here we define variables used once in the tradeApplyStop( stopTypeLoss, stopModePercent, amount=10 );Sell= Cross(Ref(EMA(L,LongEMA),-1),C); // close crosses below yesterdays average of the low
Here's what I get with some of the params with optimization. I'm still learning amibroker, and my data isn't the best. I've done it only on the current ASX 300 over 10 years.
If it's any use I can adjust any of the optimizations or details.
The attached file is actual a .zip file renamed to .pdf to get around the file restrictions on the site. So you need to save it and rename.
// The optimize params mean in order default, min value, max value, step
// So HighBreakout will try 5, 10, 15, 20
HighBreakOut = Optimize("HighBreakOut", 10, 5, 20, 5);
ShortEMA = Optimize("ShortEMA", 40, 10, 60, 10);
HighestHigh = Optimize("HighestHigh", 70, 30, 120, 20);
LongEMA = Optimize("LongEMA", 180, 120, 360, 30);
SetOption("CommissionMode", 2); //$$ per trade
SetOption("CommissionAmount", 30);
SetOption("MaxOpenPositions", 10 );
SetOption("InitialEquity", 100000 );
PositionSize = -10; // always invest only 10% of the current Equity
cond1=Cross(H,Ref(HHV(H,HighBreakOut),-1)); // when todays high crosses last highest high over the last 10 periods
cond2=H > EMA(C,ShortEMA); // todays high is greater than the 40 day Exp MA of closes
cond3=HHVBars(H,HighestHigh) == 0; // todays high is the highest for 70 periods
cond4=EMA(V*C,21) > 500000; // ensure at least $500k of money flow
cond5=C < 10.00; // only trading in stocks less than $10
cond6=C > O; // todays close higher than open
// the following line is the trigger if all conditions satisfied
Buy=cond1 AND cond2 AND cond3 AND cond4 AND cond5 AND cond6;
// here we define variables used once in the trade
ApplyStop( stopTypeLoss, stopModePercent, amount=10 );
Sell= Cross(Ref(EMA(L,LongEMA),-1),C); // close crosses below yesterdays average of the low
Hello and welcome to Aussie Stock Forums!
To gain full access you must register. Registration is free and takes only a few seconds to complete.
Already a member? Log in here.