Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order management

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

    Order management

    So the strategy places initial stoploss orders at some SMA that is changing as the value changes. Then it will place another stoploss (scratch) order if it is 4 ticks in the position favor. The scratch order has the same reference as the initial SMA stoploss order but a different name. So for example,

    EnterLongStopLimit(int barsInProgressIndex, bool isLiveUntilCancelled, int quantity, double limitPrice, double stopPrice, string signalName)

    StopLoss=EnterLongStopLimit(0,yes,Position.Quantit y,0,SMA[0],"InitialStop")

    StopLoss=EnterLongStopLimit(0,yes,Position.Quantit y,0,Position.AveragePrice + 4 * TickSize,"Scratch")

    what happens is that the initial stop of StopLoss with the name "InitialStop" will be placed after position entered, and when the condition is met to place the scratch order, it will place a new order and keep the old InitialStop order as well.

    I have seen that if I keep the signal name the same, then it will just amend the order, which is great as that's what I am looking for but it will obviously keep the same signal name, which is not great because I like to see the signal name on the chart as the name itself is usually written as a reason for that order (in this case, "initial stop", and "scratch")

    What is the best (clean) way to cancel the old initial stop order and keep the scratch order? Keep in mind that the initial stop order is placed in OnBarUpdate because it needs to have updated values for the changing SMA[0] value. But obviously the scratch order is a fixed price.

    I was thinking of via OnOrderUpdate to cancel the initial order if the scratch order is active?
    Last edited by Boonfly8; 08-16-2018, 06:34 AM.

    #2
    Hello Boonfly8,

    Thanks for your post.

    There is currently is not a way to update the signal name for the order. To accomplish your goal, you would have to submit a new order and cancel the previous order. OnOrderUpdate() would be adequate to use. I could see where simply updating the order name would have merit, and I have submitted a feature request on your behalf for future consideration.

    SFT-3441

    We cannot offer an ETA or promise of fulfillment, but we are tracking interest and the ticket ID number will be noted in the help guide when a new build gets released with the feature implemented.

    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

    If there is anything else we can do at this time, please let us know.
    JimNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jim View Post
      Hello Boonfly8,

      Thanks for your post.

      There is currently is not a way to update the signal name for the order. To accomplish your goal, you would have to submit a new order and cancel the previous order. OnOrderUpdate() would be adequate to use. I could see where simply updating the order name would have merit, and I have submitted a feature request on your behalf for future consideration.

      SFT-3441

      We cannot offer an ETA or promise of fulfillment, but we are tracking interest and the ticket ID number will be noted in the help guide when a new build gets released with the feature implemented.

      Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

      If there is anything else we can do at this time, please let us know.
      Thanks Jim, I was able to manage the handling of orders to cancel existing targets if they are not null and stoploss order is in a working or accepted state

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by junkone, 04-21-2024, 07:17 AM
      10 responses
      148 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by tsantospinto, 04-12-2024, 07:04 PM
      6 responses
      100 views
      0 likes
      Last Post tsantospinto  
      Started by rocketman7, Today, 02:12 AM
      5 responses
      26 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by ZenCortexReal, Today, 08:54 AM
      0 responses
      1 view
      0 likes
      Last Post ZenCortexReal  
      Started by ZenCortexReal, Today, 08:52 AM
      0 responses
      0 views
      0 likes
      Last Post ZenCortexReal  
      Working...
      X