Problem with simple Pivot code

Forums ProRealTime English forum ProOrder support Problem with simple Pivot code

Viewing 6 posts - 1 through 6 (of 6 total)
  • #90721

    Hi again 🙂

    Just starting to look at a strategy including Pivots and got stuck directly on the first rule. My first rule is price to reach Res3 pivot, and I just made a simple code for that frst rule but it doesnt work. Please see picture attached and code. Picture will show two order that seems to be ok and one is executed in the wrong place (and there are lots of them). What do I do wrong here? Price has not reached the RES3 but gets triggered anyway.

     

    #90725

    Try using GRAPH to graph Res3, close and Pivot to confirm that they are calculated to match your indicator.

     

    #90731

    Thank you Vonasi, it is clearly monday that is the problem. It seems that RES3 is looking at sunday, and that messes up the pivots and draw them really close to eachother. It was very clear using the “graph”. Thank you for that tips.

    Is there someway to make RES3 not include sunday and look at friday instdead when calculating pivot for monday?

    #90736

    I have some code somewhere that I wrote to avoid the Sunday candles issue. I’ll try to find it for you.

    1 user thanked author for this post.
    #90739

    I’m not sure if this is something that I wrote or I stole! – but here is the code as an indicator for pivot, s1 and r1 which you should be able to adapt easily to levels 2 and 3 and into a strategy code too.

     

    #90828

    That works perfectly!

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)

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