Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    BertrandNinjaTrader Customer Service

    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.

        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,404 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        95 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        8 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        159 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X