Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM strategy called

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

    #16
    brandon when I change the setup to high [1] + 1 instead of low [0] + 10 the cancelation is not working... is there a reason why it did not work? can you test it on yours?

    Comment


      #17
      and I use stop limit with high [1] + 1 instead of low [0] + 10 it opens correct but it does not cancel...

      Comment


        #18
        is there any special thing I need to do to cancel a stop limit?

        Comment


          #19
          Hello babouin77,

          Thanks for your note.

          No, changing the type of entry order that is submitted will not change how the AtmStrategyCancelEntryOrder() method functions.

          You must add debugging prints to your modified script to understand exactly why the order is not being canceled.

          The sample strategy will cancel an entry order using AtmStrategyCancelEntryOrder() when the status of the entry order is "Working" and 1 bar has elapsed since the entry order was placed.

          If the entry order is not being canceled, it is likely that the condition to cancel the entry order is not true.

          Print out the status of the entry order in your script, as seen in the example script, and view the NinjaScript Output window when the entry order is submitted. What is the status of the entry order in the Output window print?

          If the status is anything other than "Working", the condition to cancel the entry order will not become true. You would then need to modify your condition to check for the proper status of the entry order when it is submitted.

          For example, if the entry order is in a state of "Accepted", this is not considered a "Working" state so the condition would not be true. The condition would then need to be modified the check if the status is "Accepted" if that is what the status of the entry order is in when it is submitted.

          See this help guide page for more information about GetAtmStrategyEntryOrderStatus(): https://ninjatrader.com/support/help...rderstatus.htm

          Below is a link to a forum post that demonstrates how to use prints to understand behavior.

          https://ninjatrader.com/support/foru...121#post791121

          Let me know if I may assist further.​
          Last edited by NinjaTrader_BrandonH; 10-26-2022, 08:03 AM.
          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment


            #20
            yeah the print outs says accepted... i added that condition and will test. thanks a lot for your help

            Comment


              #21
              it worked. thanks a lot brandon.

              Comment

              Latest Posts

              Collapse

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