oil-10min-hammernegated-pattern-strategy

Viewing 15 posts - 31 through 45 (of 94 total)
  • Author
    Posts
  • #40904 quote
    Francesco78
    Participant
    Master

    HI Paris, thanks for your comment.

    In fact, yes , the system work with other indices/currency pair.

    I’m not sure I’d like to share all my systems, but I encourage you in trying some variation on the same theme on EURUSD and on AUDJPY.

    Good luck and enjoy 🙂

    #40906 quote
    Paris
    Participant
    Veteran

    @ francesco .

    well in fact i ve tried to backtest it in various indices/currency with no satisfying results , but maybe i ve made it wrong .

    to all ,

    i encourage you to backtest a variable in stop loss 10 to 200 it improve quite a bit the results .

    Francesco78 thanked this post
    #40968 quote
    miguel33
    Participant
    Senior

    Francesco sto cercando di fare il codice anche con metatrader per confrontare i risultati . Non avendo con OIL uno storico decente ti chiedo se hai su qualche valuta un settaggio che mi permette di fare un test decente. Grazie. Mik

    EDIT BY ADMIN : LAST WARNING : STOP ITALIAN IN ENGLISH FORUM! A LITTLE POLITICAL TO OTHER MEMBERS !!

    #40993 quote
    Francesco78
    Participant
    Master

    hi, something decent I could find on AUDJPY 15 min and EURUSD 10 min. But with some tweak..

    #41014 quote
    Nicolas
    Keymaster
    Master

    About the zero division error, I would suggest:

    hammerupnegated= max(open,close)<min(open[1],close[1]) and (abs(open-close)/max(pointsize,HiLo))>0.5
    Henrik, Midlanddave and manel thanked this post
    #41069 quote
    Carras
    Participant
    Junior

    Hi all,

    I had a BUY triggered this am (0350) @ 4657 .  Did anyone else see this?  Checking the candle I don’t see a Hammer down at 0330, almost but not quite and backtesting the data does not trigger a BUY.  Any ideas why this might have happened?  If the auto trading used the “worse” case of bid / ask it might suffice a hammer but why wld that happen?  if using all Mids or all Bids (or all asks) there is not a 33% hammer.

    The code used is as per the OP with a zero divide adjustment (although i don’t think this is related to the Zero div issue).

    Thanks

    #41076 quote
    larouedegann
    Participant
    Master

    the systeme with *1 or +0.000001 is not good.

    i try with hilo……

    #41090 quote
    Kenneth Kvistad
    Participant
    Senior

    Juan and Nicolas fix did work. I started both and they both worked today.. athleast on the long trade.

    About what Carras explains: Had a longtrade today with profit( juans fix and nicolas fix code) but the backtest showes no trades?

    #41096 quote
    miguel33
    Participant
    Senior

    Good evening at all.
    I have no business since July 7 in demo and real.
    Can you post a full code that works?
    Thanks and good job

    #41102 quote
    Kenneth Kvistad
    Participant
    Senior

    This is the one I use (nicolas fix) I also run juans fix that did just the same as thisone today.

    defparam cumulateorders = true
    
    av1 = average[3](close)
    av2 = average[20](close)
    av3 = average[50](close)
    //x = 0.5
    bull = close> av1 and close >av2 and close > av3
    bear = close <av1 and close <av2 and close <av3
    //n= 1
    
    If (high-low) = 0 Then
    HiLo = 1
    Else
    HiLo = (high-low)
    EndIf
    
    hammerupnegated= max(open,close)<min(open[1],close[1]) and (abs(open-close)/max(pointsize,HiLo))>0.5
    
    hammerup = min(open[1],close[1])>high[1]-(high[1]-low[1])/3 //and timeok
    hammerupnegated= max(open,close)<min(open[1],close[1]) and (abs(open-close)/max(pointsize,HiLo))>0.5
    cs = hammerup and hammerupnegated and bear
    hammerdown = max(open[1],close[1])<low[1]+(high[1]-low[1])/3 //and timeok
    hammerdownnegated = min(open,close)>max(open[1],close[1]) and (abs(open-close)/max(pointsize,HiLo))>0.5
    cl = hammerdown and hammerdownnegated and bull
    
    if cs  and not onmarket then
    sellshort 1 contract at market
    endif
    
    if cl  and not onmarket then
    buy 1 contract at market
    endif
    
    
    //TRAILING STOP
    TGL =30
    TGS= 20
    if not onmarket then
    MAXPRICE = 0
    MINPRICE = close
    PREZZOUSCITA = 0
    ENDIF
    if longonmarket then
    MAXPRICE = MAX(MAXPRICE,close)
    if MAXPRICE-tradeprice(1)>=TGL*pointsize then
    PREZZOUSCITA = MAXPRICE-TGL*pointsize
    ENDIF
    ENDIF
    if shortonmarket then
    MINPRICE = MIN(MINPRICE,close)
    if tradeprice(1)-MINPRICE>=TGS*pointsize then
    PREZZOUSCITA = MINPRICE+TGS*pointsize
    ENDIF
    ENDIF
    if onmarket and PREZZOUSCITA>0 then
    EXITSHORT AT PREZZOUSCITA STOP
    SELL AT PREZZOUSCITA STOP
    ENDIF
    
    
    
    SET STOP ploss 110
    SET TARGET pPROFIT 52
    
    miguel33, Midlanddave and manel thanked this post
    #41160 quote
    TheAccountant
    Participant
    Average

    hello ! work fine for me, thanks for strategy and for fix !

    Midlanddave thanked this post
    #41182 quote
    miguel33
    Participant
    Senior

    The first ok in profit.
    go on …

    thanks

    #41269 quote
    Francesco78
    Participant
    Master

    Great to hear Miguel!

    #41765 quote
    miguel33
    Participant
    Senior

    For now 3 winners on 3 trade.
    Can do better with a trailing Profit. Trailing stop I think that’s fine. What do you think if you’re also talking about this?

    #41799 quote
    Despair
    Blocked
    Master

    Very interesting strategy Francesco. Thank you for sharing. I must take a closer look at this one!

    Francesco78 thanked this post
Viewing 15 posts - 31 through 45 (of 94 total)
  • You must be logged in to reply to this topic.

oil-10min-hammernegated-pattern-strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 93 replies,
has 25 voices, and was last updated by nonetheless
6 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/11/2017
Status: Active
Attachments: 16 files
Logo Logo
Loading...