Exit position once a condition happens twice

Forums ProRealTime English forum ProOrder support Exit position once a condition happens twice

Viewing 3 posts - 1 through 3 (of 3 total)
  • #124100

    Hi all,

    Is it possible to code an exit code that would exit a position once a certain condition is met the second time around?

    The exit condition I’m trying to achieve is when CDC ATR Trailing Stop v2.1 indicator turns red the second time around (on long positions) and turns green the second time around (on short positions). So it would not exit the position the first time the CDC ATR Trailing Stop v2.1 changes color.

    How would one go about coding this? Please see attached screenshot.

    Thanks in advance.

     

     

    #124103

    Simply set a flag.

     

    1 user thanked author for this post.
    #124141

    Above added as Log 204 here …

    Snippet Link Library

    2 users thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)

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