I found this nice strategy by playing with candlestickpatterns with 2 candles.
Basically I considered the “hammer negated” pattern, where you have first an hammer candle (body on the upper or lower 25% of the candle) and then a candle which negate the hammer so in case we have a bullish hammer, then we have a candle whose body is within yesterday candle shadow. I hope it is clear as I have no idea how to draw candles on the laptop.
I added then a few moving average that identifies momentum, and opted for trailing stops.
The only thing I have optimized here are trailing stops level. All the moving average period, the parameter that defines the candlestick pattern are not optimized, no target profit either. Thats why WF results are pretty impressive.
Only downside as usual is that I dont have more than 100K history.
defparam cumulateorders = false
av1 = average(close)
av2 = average(close)
av3 = average(close)
x = 0.5
bull = close> av1 and close >av2 and close > av3
bear = close <av1 and close <av2 and close <av3
hammerup = min(open,close)>high-(high-low)/3 //and timeok
hammerupnegated= max(open,close)<min(open,close) and abs(open-close)/(high-low)>x
cs = hammerup and hammerupnegated and bear
hammerdown = max(open,close)<low+(high-low)/3 //and timeok
hammerdownnegated = min(open,close)>max(open,close) and abs(open-close)/(high-low)>x
cl = hammerdown and hammerdownnegated and bull
if cs then
sellshort 1 contract at market
if cl then
buy 1 contract at market
if not onmarket then
MAXPRICE = 0
MINPRICE = close
PREZZOUSCITA = 0
if longonmarket then
MAXPRICE = MAX(MAXPRICE,close)
if MAXPRICE-tradeprice(1)>=TGL*pointsize then
PREZZOUSCITA = MAXPRICE-TGL*pointsize
if shortonmarket then
MINPRICE = MIN(MINPRICE,close)
if tradeprice(1)-MINPRICE>=TGS*pointsize then
PREZZOUSCITA = MINPRICE+TGS*pointsize
if onmarket and PREZZOUSCITA>0 then
EXITSHORT AT PREZZOUSCITA STOP
SELL AT PREZZOUSCITA STOP
//set target pprofit n*averagetruerange
//set stop ploss m*averagetruerange
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.ProRealTime ITF files and other attachments :