Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is OnExecutionUpdate exlcusive for each strategy?

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

    Is OnExecutionUpdate exlcusive for each strategy?

    Hi,

    Does OnExecutionUpdate only run based on executions for that specific strategy? Or will it run if there is an execution for another strategy that I have simultaneously running? For example, if I have two strategies running on the same asset, and the first strategy takes an entry while the second strategy is flat. Let's say that this first strategy entry hits stop loss, will this stop loss execution cause for code pertaining to stop losses in OnExecutionUpdate in the second strategy to run?

    My main reason for asking is because if I have a rule in my second strategy that prevents entries in the same direction after the previous trade was a stop loss, I need to know if stop loss executions on the same asset will cause issues even if it is a completely different strategy with different code. Ideally, I would like for the OnExecutionUpdate to not interfere with eachother across strategies but I'm guessing there is a workaround if the OnExecutionUpdate does still run based on outside strategy executions.

    Thank you for your help on this!

    #2
    A different Strategy is a different object.

    Each Strategy object's methods are completely independent,
    and called independently, of every other Strategy object.

    Even if you start the same Strategy twice, the two different
    Strategy objects don't know about each other internally and
    never interfere with the calling of each other's methods.

    Any rules to 'prevent entries in the same direction' is specific
    to that Strategy object. Eg, the 2nd Strategy object can only
    know about the 1st Strategy object's rule 'has been
    engaged' if you write your own very specific logic to
    make each Strategy aware of the other.

    That is, by default, a Strategy object never talks to another
    Strategy object. I mean, each Strategy object is completely
    independent and unaware of any other Strategy objects,
    whether they running or disabled.

    Just my 2˘.

    Last edited by bltdavid; 01-23-2024, 03:24 PM. Reason: typo

    Comment


      #3
      Hello,

      bltdavid is correct.

      The OnExecutionUpdate() method called in one strategy will be independent and not affect OnExecutionUpdate() called in a different strategy.

      Please let us know if you have any further questions.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      54 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      131 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
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X