partial close when price moves against position

Forums ProRealTime English forum ProOrder support partial close when price moves against position

Viewing 4 posts - 1 through 4 (of 4 total)
  • #239957

    Hi Coders and traders,

    I’m looking for a code that can do a partial close when price moves against my current position of 10 pips/ points,

    Right now, i’m using this code:

    The code above works when it’s almost by itself, but I want to combine it with a partial close when price mnoves with my position, and then the code above stops working.

    I want, when the price moves against my position by 10 points, I want half of my position to be sold, the rest of the position to be sold at my “Primarystop”, My primarystop works as my SL, 20 points away from my entry price.

    Anyone who can/ want to help me?

    Thank you 🙂

    #239964

    Hi! take a look this code. Maybe is what you are looking for.

    1 user thanked author for this post.
    #240018

    Hi Ivan,

    thank you for your code, I cant get it to work however. I have a multi timeframe system, where I initially buy size = 2 contracts, and if price moves opposite way of my position I want half of my contracts = 1 to be sold, the rest to keep all other kinds of exits, including the primarystop at 20 points. the other part of the position is connected to a MFE exit.

    Would it be possible for you to write the code with 2 inital contracts and then the rest of your code? So I can copy paste?

    Im using this code for partial close when price is moving the correct way:

    thank you again 🙂

    #240021

    If I just copy-paste the code you provided, this is my result 🙁

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

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