Hi. One of my 1 million attempts at this. In my opinion it done not look that bad. I would like to manage the draw down a bit better. Any comments and suggestions would be appreciated. Some of the trades opens when the market is in complete opposite direction. That would help if that could be managed as well.
The system uses bullish and bearish hammers following a short trend. I am not sure if something like this is to simple. Best results on the 5min. Sorry about the sloppy coding and I Have not yet added comments in the code
DEFPARAM CUMULATEORDERS = true
IF Close < Open then
UW = high - open
LW = close - low
Body = open -close
else
UW = high- close
LW = open - low
body = close - open
endif
IF UW < (LW/10) and LW > Body then
Bullhammer = 1
else
bullhammer = 0
ENDIF
Downtrend = low[5] > low[4] and low[4] > low[3] and low[3] > low[2] and low[2] > low[1]
ATR = Highest[51](high) - Lowest[51](low)
IF Downtrend and Bullhammer and Close > Close[1] then
buy 2 contract at market
bullhammer = 0
endif
Set Target pprofit ATR*1.2
set stop ploss ATR
Uptrend = high[5] < high[4] and high[4] < high[3] and high[3] < high[2] and high[2] < high[1]
IF LW < (UW/10) and UW > body then
Bearhammer = 1
else
Bearhammer = 0
ENDIF
If Uptrend and Bearhammer and Close < Close[1] then
Sellshort 2 contract at market
Bearhammer = 0
ENDIF
Automatic trading topic go to ProOrder forum! 🙂
In order to get it correctly ‘universal’ for the stoploss and takeprofit values, you should replace the lines 27 and 28 with:
Set Target profit ATR*1.2
set stop loss ATR
As ploss and pprofit are for points/pips and not real price distance.