Australian (ASX) Stock Market Forum

Reply to thread

Yeah it is, if you look in my quote T/A asked if anyone would have a look. I hope I have it right, I found the base code on this site.


I've tried this, adding what you said, but leaving some of the range for comparison. I've also added Bang For Buck to pick which trade to take if more than one come up.


HighBreakOut = Optimize("HighBreakOut", 10, 5, 20, 5);

ShortEMA = Optimize("ShortEMA", 40, 20, 40, 10);

HighestHigh = Optimize("HighestHigh", 70, 30, 120, 20);

LongEMA = Optimize("LongEMA", 100, 65, 225, 10);


SetOption("CommissionMode", 2); //$$ per trade

SetOption("CommissionAmount", 30);

SetOption("MaxOpenPositions", 10 );

SetOption("InitialEquity", 100000 );

PositionSize = -10; // always invest only 10% of the current Equity


BangForBuck = ((10000/C)* (MA(ATR(1),200))/100);

PositionScore = BangForBuck;


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


Same deal ... its the current ASX 300 for 10 years and have to rename the attachment back to .zip.


Top