Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Two synchronized strategies are not working together

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Two synchronized strategies are not working together

    Hello everyone.
    Thanks to the support team for helping every time we have some issues.

    I have 2 strategies. One long and one short. I ran them on 2 separate windows but they are trading the same instrument (BIT).
    Before enter a position, the strategy does a check if there is any open position or not via this option:
    Click image for larger version

Name:	image.png
Views:	96
Size:	305.8 KB
ID:	1318234
    Both of the strategies have the same check before enter a position.
    However, I got an error message that the another strategy is trying to open a position with error NOT ENOUGH MARGIN.

    Why is this? And why after having this kind of synchronization on both of the strategies, the second one is trying to open a position (having in mind that there is already opened position by the other strategy)

    It seems like this check (Position.MarketPossition = MarketPosition.Flat) is not working as expected.

    I trade the same instrument on both of the strategies in separate windows on different time frames.

    Best wishes

    #2
    Hello nrgful,

    Thank you for your post.

    Strategies are not aware of each other's positions. Each strategy instance has an independent position that does not have any supported methods to be read by another strategy instance. So a condition checking Position.MarketPossition = MarketPosition.Flat is only going to check the position of that specific strategy, it is not aware of the position of a separate strategy.

    Additionally, having multiple strategies running on the same instrument and account will likely cause the strategy instances position to not be in sync with the account position.

    It is recommended to run these on separate accounts instead, to prevent unwanted account positions.

    Below is a link to forum post that provides a warning about this.



    Please let us know if you have any further questions. ​

    Comment


      #3
      Is there an option to do a check for an open position and synchronize the strategies? Something like a global position check ? Or something like using the UNLOCK strategy and write some lines of code manually?

      Thank you for your support

      Comment


        #4
        Hello,

        As mentioned, there are no supported methods that allow for a strategy's position to be read by another strategy instance.

        If you want to use unsupported methods, consider using static properties in an Add On class to share information.



        Please note the support team cannot assist with unsupported code.

        Please let me know if you have any other questions.​

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        58 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        133 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        73 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X