Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to call OnExecutionUpdate for ATM strategy

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

    #16
    Okay let me explain what I understood from what you explained to me:
    1) I have to call in foreach loop AtmStrategyCancelEntryOrder to close StopMarket orders. ---> I am doing it.
    2) I have to then call AtmStrategyClose ---> I am doing it.

    but problem is that atm strategy Id is changing and for example if I have long position and 2 Stop Market order(Buy/Sell) and if sell Stop order got executed then everything will work fine as latest atmstrategy id will be sell stopmarket strategyid but if buy stop market will be executed then latest atmstrategy Id will be different and my newly executed orders Stop1 and Target1 will be deleted. I am asking you to help me with that and if for that you require from me some money then OKAY I will pay......(really didn't expected that)

    Waiting for your reply. Thanks

    Comment


      #17
      Hello Revazi123,

      I am suggesting you only call AtmStrategyClose on the active ATM strategy and to only call AtmStrategyCancelEntryOrder on the other Stop Market order. You will need to check your code and use prints to make sure you are tracking the right ID and calling the methods with the right ID's.

      Please note that I am not a NinjaScript Consultant. I am the team lead for our Scripting Support team. Our team's role is to provide insight and direction so you can build the tools you wish and so you can troubleshoot and debug issues you may run into. We also look into NinjaScript issue reports when we are provided small test scripts that demonstrate a specific issue with the Platform. Our Scripting Support team does not offer services to create modify or debug code.

      NinjaScript Consulting services would be for having something built for you, or have some specific functionality implemented if a task is too difficult.

      I will have a colleague reply to this thread to share more information on NinjaScript Consulting services.

      Comment


        #18
        Okay I will attach here my code and will wait for your colleague reply.

        Thanks
        Attached Files

        Comment


          #19

          Hello Revazi123,

          Thank you for your post.

          You can search our list of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:
          You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.

          The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem, LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

          Let me know if I may be of further assistance.
          Thomas C.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          62 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          134 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          75 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