Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnExcecution() BIP question

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

    OnExcecution() BIP question

    Hi,

    I'm developing a multi-Instrument strategy that have a global percentage StopLoss set for all the instruments.
    I want to be able to know in the OnExcecution() which BIP called the StopLoss.
    How can I know in OnExcecution() which BIP called the stoploss?

    Thanks in advance!

    #2
    You could include this in the signal name you attach to your StopLoss exit order, so you could with the .FromEntrySignal IOrder property or .Name of the IExecution.

    Comment


      #3
      But I set a global StopLoss in the Initialize():
      Code:
      Initialize(){
      ....
      SetStopLoss(CalculationMode.Percent, 0.01);
      }

      Comment


        #4
        The Set() stops would be always tied to the primary series of the instrument.

        Comment


          #5
          But in my strategy I see that it also execute StopLoss to the other series...

          Comment


            #6
            Sorry misread and thought you were bulding a MultiSeries strategy, but you're correct for a Multi Instrument one you would for sure see stop loss execute for other series than the primary as well - if you're not working with the Exit methods that would allow for direct IOrder access, then you can use the ideas of this reference sample below to store IOrder returns for the Set()'s as well that would allow then to access for example the Entry Signal name in OnExecution, which then in turn you could tie to the processed series for identification purposes.

            Comment


              #7
              Thanks Bertrand.
              This is in the direction of what I need, but how do I check from IOrder which BIP was calling the StopLoss?

              Comment


                #8
                You're welcome, you should be able to do this by assigning the FromEntrySignal as needed to which the SetStop is tagged. You can then check this property of the IOrder / IExecution.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                670 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                379 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                111 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                575 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                582 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X