oil-10min-hammernegated-pattern-strategy

Forums ProRealTime English forum ProOrder support oil-10min-hammernegated-pattern-strategy

Viewing 15 posts - 1 through 15 (of 94 total)
  • #40331

    Hello everyone, as suggested by Grahal I’m opening a forum thread dedicated to my last posted strategy on oil.

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

    Happy to compare results but most of all to hear your criticism in order to be able to improve in the spirit of this forum.

    Best

    Francesco

    #40341

    Hello,

    I was thinking about the division by zero problem running this strategy. I would guess the (high-low) statement below would be the source of the error?

    This was suggested as a correction:

    But zero times 1 is still zero i would guess?? An IF-test would fix this, but I was wondering if there was another permanent fix?

     

    1 user thanked author for this post.
    #40347

    I would suggest using

     

     

    5 users thanked author for this post.
    #40378

    I was testing the strategy but also got the Zero Division last night so I have started it again with the fix from Andyswede:

    hammerupnegated= max(open,close)<min(open[1],close[1]) and abs(open-close)/((high-low)*1)>x
    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)/((high-low)*1)>x

    And hope it works fine.(have to wait some days since it doesent buy to offen.

    —————————————————————————————

    I have also tested on the backtest with this addition:

    NbrContracts = 2 //need a value for the first trade
    IF PositionPerf(1) < 0 THEN
    NbrContracts = 2
    ENDIF
    IF PositionPerf(1) > 0 and PositionPerf(2) > 0 THEN
    NbrContracts = 3

     

    Buy 3 after second win and buy 2 after first loss.


    I also tested it with some sort of martin gale strategy for fun.

    IF Barindex = ExitIndex + 1 THEN
    ExitIndex = 0
    IF PositionPerf(1) < 0 THEN
    OrderSize = MAX(OrderSize -0.5, 1)
    ELSIF PositionPerf(1) >= 0 THEN
    OrderSize = OrderSize +0.2
    ENDIF
    endif

     

    1 user thanked author for this post.
    #40383

    Hi Kenneth, it  didn´t work, just a little bit longer 🙂 And as Ronny said, it´s still divided by zero, my wrong. I`m trying Juanj:s fix.

    Thanks for your fix Juanj and of course Francesco for really nice strategy 🙂

    Andy

    #40385

    Is this the same as you are trying Andyswede?

    #40386

    Yes Kenneth, that´s the one, my fix stopped this morning

    #40387

    So this last update from Juanj might work ?

    Anyway we cant give up now. Fransisco78`s strategy seems Very good:) Thanx again.

    1 user thanked author for this post.
    #40457

    To me this morning did not do any operation

    #40461

    Francesco puoi darmi un tuo indirizzo mail , ho bisogno di chiederti una cosa… se vuoi ovviamente. Grazie.

    EDIT: NO EMAIL PLEASE

    PLEASE SPEAK ENGLISH IN ENGLISH FORUM!

    #40546

    hi guys, thank you for the work you are doing, I did not have this division by zero problem, but maybe you could just try to modify the formula like this

    max(open,close)<min(open[1],close[1]) and abs(openclose)/((highlow+0.0000001))>x?

    Doesnt change the idea underlying idea and should work as a trick?

    Best

    1 user thanked author for this post.
    #40572

    Thats great.I will test this:)

    1 user thanked author for this post.
    #40573

    Kenneth or Francesco ,

    You can describe the conditions, i want to try to im metatrader and see the differences.
    Thank you for your contribution.

    mik

    #40586

     

    Hi

    Being new to coding, Am I correct in thinking that there is no stop if the price moves immediately against any new trade position? (either long or short).

    Also i’d be interested in hear how you decided on TGL = 18 and TGS = 24 ?

    Many thanks

    #40597

    MIGUEL33 what you are asking for is a question for francesco78.

    Carras: if price goes directly againt target after taken there is no stop loss. Tgl and tgs is only active is price moves xx pips in righ direction. Then the stop will move accordingly to price. Lets say price goes 50pips, then stoploss will be 18 or 24 pips behind/under.

     

    Why 18 and 24 is something francesco78 have coded after his toughts. I use 30 and 20 or so. Slight diffrens.

    If you whant/should after my opinion i use own code for stop loss just incase it goes directly in wrong direction, I use this code as my last rung/line in the code.

     

    Set stop ploss xx (I use 110pip)

     

     

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

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