Why does the same code result to one short and one long position simulataneously

Forums ProRealTime English forum ProOrder support Why does the same code result to one short and one long position simulataneously

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

    Hi,

    I have a simple code for Gold that uses a macd indicator to decide when to go long and when to go short. I am running two copies of the same code simultaneously (so for example I can stop part of my position). Today, the same code went short for one of my two positions and remained long in my other position. Both systems are running (they have not stopped). How is it possible that the same code results to one short and one long position?? They were both activated at the same time. Could it be that my order was not able to be fullfilled given the high variation in Gold price today??

     

    Many thanks,

    Yanis

    #148799

    Strategies are unaware of one another.

    You are likely to have selected option Force Open to allow hedging, on your account settings.

    If you have, you may want to deselect it to only allow one direction.

    Within the same strategy it’s not possibie to enter two contrary positions.

    1 user thanked author for this post.
    #148801

    Thanks, I have not enabled force open.

     

    I mean that the two positions shown in the image below are different (one is long and one is short) although they are using the same code (copy paste).

     

    Thanks,

    Yanis

    #148808

    Two copies of the same strategy are DIFFERENT strategies.

    What’s in your pic is strange if hedging is not enabled.

    You should report IG this issue.

     

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