SA40 Hammer 5min

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #64651 quote
    Louwrens
    Participant
    Junior

    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
    
    5min-hammer.png 5min-hammer.png
    #64721 quote
    Nicolas
    Keymaster
    Master

    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.

    GraHal thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

SA40 Hammer 5min


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Louwrens @louwrens Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
8 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/07/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...