Francesco’s Hammernegated strategy

Forums ProRealTime English forum ProOrder support Francesco’s Hammernegated strategy

Viewing 15 posts - 1 through 15 (of 16 total)
  • #101538

    http://www.prorealcode.com/prorealtime-trading-strategies/oil-10min-hammernegated-pattern-strategy/

    I refer to the strategy in the above link. It seems to be working well in recent months. But can someone please do a 200k bars test for us so so the community can further improve the code?

    #101539

    Credit to Francesco, the true legend!

    #101616

    I converted it to MTF (1-minute default TF):

     

    #101634

    Thank you robertogozzi for your modification on the code. Interesting result, I have several questions regarding your version of this strategy. For the sake of tidiness and legibility I make my questions in point form:

    1. whats is the difference between  av1 and av2 (line 10 and 11) ( Is it a typo or sth else?)
    2. would it make more sense for “hammerupnegated   = max(open,close) <= min(open[1],close[1]) “(line 19 and same for line 22) as i guess the open of the current bar should always equal the close of previous bar ?(except gaps after session break)
    3. Do the parameters like p,t,x,m,n c come from optimization? (any WF test done on these parameters?)
    4. Can you or any others help to test it for 200k bars?
    5. Have you tried other type of trailing stop or exit strategies?

    Meanwhile, I am also interested on the original code’s performance on 15min TF for 200k bar. Would you mind posting the backtest result here for my reference?

    Cheers

    #101638
    1. it’s not a typo, it’s the optimization tool that said it was the same (I kept all the three not to alter the original logic)
    2. I kept the same code as the original version, but you can try different settings
    3. Yes, I optimized all variables due to the fact that I was using a MTF approach, which is different from using a single TF
    4. Yes, I attach both 100k and 200k performance on the original code, but with a 15-minute TF as you asked (oddly enough there’s no difference in performance and dates on CL, while there are on DAX or Eur/Usd). I never use 200k tests!
    5. No, I just kept the original code, just changing values or replacing some constants with variables. I also reintroduced the last two lines, but placed them elsewhere to avoid SL & TP be altered every candle when onmarket

     

     

    #101791

    I can see that very often the profit is secured after hours the position is opened. It somehow implies that “hammer negated” is not a very precise/ accurate signal, otherwise the market would always trend in direction favourable to the position.

    Would you mind sharing your thoughts on this strategy?

    #101792

    Thank you @robertogozzi! I found that the original code written by @Francesco also works pretty well on DJI

    Can robertogozzi please help the original code on DJI on 15min TF for 200k bar and share with us the results!

    Many thanks!

    #101800

    Performance for DJI-15min with 2.4 spread.

     

    #101803

    IMO it works better if TGL or TGS are above 40 as the indices price is around 4times of that of oil.

    #101818

    Hola Roberto. He copiado el código del Hammarnegated pero no me funciona.

    Hay algún fallo o algo que haya que hacer? yo hice un copy paste. Gracias.

     

    #101819

    Hola Roberto. He copiado el código del Hammarnegated pero no me funciona.

    Hay algún fallo o algo que haya que hacer? yo hice un copy paste. Gracias.

    Please speak English on the english forum.

    If it does absolutely nothing, then there must be an error in the backtest periods.

    Doesn’t it report any error?

    It works perfectly if copied as is. Should you have also copied line numbers please remove them.

    #101830

    I attach the .ITF file to be imported.

    #101887

    interesting results, but I think there’s a point to take in consideration.

    Although very high win-chance and nice results, there’s no fixed stoploss.

    The highest MAE, is about the same as a 2.5-3% stoploss. (1 minute 200k bars us crude)

    So perhaps it’s good to have a fixed % set and then you get out. 3% is big seeing a market running against your trade which can happen apparently.

    The shorter the timeframe, the lower the stoploss should be?

    If switched that code to 10min, it goes up al the way to 11,75% loss on a trade and still a win-chance of more then 90%.

     

    1 user thanked author for this post.
    #101999

    Thanks Paul for your advice.

    It certainly makes me feel more comfortable by applying a fixed percentage stoploss, and of course, the trade off is a little bit lower win rate and profit.

    The next thing that comes to my mind is increasing the bet size after losses, since the maximum consecutive loser is just 2 or 3. I know each trade occur independently, however, statistically speaking, i think it maybe worth doing so. What do you think?

    #102054

    Hi fatlung

    In my opinion it’s not a good strategy, only maybe if you have 1000 of trades to test.

    Example is an other strategy, nice run up and then after unexpected consecutive losses it gained momentum again.

    In the backtest it never had so many consecutive losses. To take those losses is bad enough without doubling down.

    1 user thanked author for this post.
Viewing 15 posts - 1 through 15 (of 16 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login