Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cannot change order

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

    Cannot change order

    Hello,

    when I do the entry with my script (where everything works ok, also the entry) there appears immediately with the entry the message "Cannot change order '1525050931' because current order values already match. affected Order: SellShort 1 Limit @ 11991,75"

    I do the entry when conditions are met with
    entryOrderSr1a=EnterShortLimit(4,true,1,GetCurrent Bid(), "dtjS1a");
    entryOrderSr1b=EnterShortLimit(4,true,1,GetCurrent Bid()-1*TickSize, "dtjS1b");

    Might be the reason that in fast markets there is a mess with this entry because the ask is changed in NQ very fast? If so how can this message (or any problems causes by this) be avoided?
    The script works ok also when the message appeared.

    And I have now a 2nd question please: when I close eg a long trade with ChartTrader Close button (instead of the condition in script) then few seconds (4 sec from executions tab) after all is flat (and script is disabled, as it should be from clicking the close button) there is a "new" Entry "Sell" (in Executionstab shows "Sell"). What might the reason for this behavior please?

    Thank you!
    Tony
    Last edited by tonynt; 08-28-2020, 07:38 AM. Reason: add 2nd question

    #2
    Hello Tony, thanks for your post.

    You can check the existing limit price of your order with entryOrderSr1a.LimitPrice to avoid setting the same price for the orders. It should not be an issue with how fast the price is moving but with how often that piece of code is being called.

    For the second question, if the strategy was long and you click the close button the system will send a sell order to close the long position; that is expected to happen.

    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply. What do you mean with check the existing limit price... to avoid settin gthe same price for the orders. Why the "same price"? I send the EnterShortLimit as shown above. I do not again with "same price.

      Referring the second question, yes of course with close it will send a sell order. In the attached screenshot you can see that I closed the 2nd contract with "close" which is from charttrader close button. And then you can see that after 4 seconds there is another sell. Why? This is then a naked short position, and this I have to close again with close-button. Why is the 2nd sell after 4 seconds? (The script is disabled from first time clicking the close button!)

      Thank you!
      Tony
      Attached Files
      Last edited by tonynt; 08-28-2020, 10:45 AM. Reason: translation error

      Comment


        #4
        Hello Tony, thanks for your reply.

        The warning you were getting on the order entry was "Cannot change order '1525050931' because current order values already match." That means you submitted the order with the same price. You should also turn on TraceOrders in the strategy to see what the trace orders are saying about the orders.

        For the second point, I don't see that happening on the SampleMACrossover strategy, so it could be the strategy doing it. Do you see the same problem is you run the SampleMACrossover?

        I look forward to hearing from you.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Hello,

          thank you fro your reply. What you mean again with "that means you submitted the order with the same price". Same price as what? You see my orders, I posted above. What is there "same"?

          ad second point I dont know what you mean with SampleMACrossover strategy. Whatever strategy it is, when its disabled from Close button, there should not be any action from a stratety, no?

          Thank you!
          Tony

          Comment


            #6
            Hello Tony, thanks for your reply.

            By the same order, I mean the order entry method was ran twice while GetCurrentBid() was the same price, so on OnBarUpdate 0:

            entryOrderSr1a=EnterShortLimit(4,true,1,GetCurrent Bid(), "dtjS1a");

            Then OnBarUpdate 1, it calls it again with the same bid price:

            entryOrderSr1a=EnterShortLimit(4,true,1,GetCurrent Bid(), "dtjS1a");

            to avoid it, check the limit price of the order against GetCurrentBid() to make sure they are not equal to each other.

            You can extract more information about which order it is by using OnExecutionUpdate.


            On the second question:
            I don't see that happening on my end, and the screenshot shows there was an execution before the strategy called the exit order. The SampleMACrossover strategy is a default strategy on the platform. I was asking you to run that strategy on the same chart and see if this shows up on that strategy. If it does not, there is something in your strategy doing this.

            Best regards.
            Chris L.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by sidlercom80, Today, 04:57 AM
            0 responses
            2 views
            0 likes
            Last Post sidlercom80  
            Started by patricia70, Today, 03:57 AM
            0 responses
            5 views
            0 likes
            Last Post patricia70  
            Started by pjsmith, Today, 03:25 AM
            0 responses
            7 views
            0 likes
            Last Post pjsmith
            by pjsmith
             
            Started by cincai, Today, 01:04 AM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by voltation, Today, 12:37 AM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_Jason  
            Working...
            X