Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Moving a target manually

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

    Moving a target manually

    I have entered a long position, and have added a stop and target via the OnExecution event. That worked fine, then I tried to move my target by doing the following:
    1. Cancel the original target.
    2. In the OnOrderUpdate, I added my new target once the cancellation was confirmed.
    3. Then received the following Trace Order message: "Ignored PlaceOrder...Reason= There already is a matching, terminal exit orderin place


    The order cancellation was confirmed in the trace order message, so I know there is no matching order. Unless it is just a timing thing with OnExection. Could this be because the new target was added in the OnOrderUpdate event, instead of the OnExecution event?
    My original target was entered in the OnExecution event as per the samples, but I put the code to add the replacement target in the OnOrderUpdate because I needed to receive the cancellation confirmation.
    If this is the reason for the error, how can I receive the cancellation confirmation, AND place the new target code in OnExecution?

    #2
    astrolobe, please try just resubmitting the new target at the new price.

    Comment


      #3
      Thanks Bertrand, that was exactly what I was looking for.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      65 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      149 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      99 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      286 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X