Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnExecution Doubt

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

    OnExecution Doubt

    Hello everyone,

    I want to use the OnExecution override in my script just to send me an email every time an order is executed (eg. stop loss order that might get executed anytime of the day), my question might seem dumb but I wanna make sure it won't affect my strategy, here it goes: if I override this method in my script and put just a sendmail command in it, will that affect in any negative way my script?

    Eg.
    protected override void OnExecution(IExecution execution)


    Thanks,

    Rodrigo

    #2
    Hi Rodrigo, I don't see a downside to doing so except perhaps if you're processing a lot of orders, so it resources would be better used more focusedly on the execution aspects.

    Comment


      #3
      One more question under this same topic, as a parameter this method receives iexecution, mu question goes, what is the object/property I can use to know if the order is an Entry or an Exit order type? I tried order type, but it's no it. I also tried different properties on the execution.order object, but couldn't find one.

      Thanks

      Rodrigo

      Comment


        #4
        Hi Rodrigo, per se an execution would be just an execution / fill, it would not be tied to any specific time and could occur for all of course. You can still get the info desired, for example via the FromEntrySignal or Name (same as the one directly from the execution) string that would allow you checking into which signal names generated the order.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sjsj2732, Yesterday, 04:31 AM
        0 responses
        26 views
        0 likes
        Last Post sjsj2732  
        Started by NullPointStrategies, 03-13-2026, 05:17 AM
        0 responses
        283 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        280 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        131 views
        1 like
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        90 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Working...
        X