Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Iorder Oco

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

    Iorder Oco

    Hello,

    I´m working with NT-brokerage and I changed my stops and targets in scripts from

    SetStopLoss() and SetProfitTarget() to ExitLongStop() and ExitLongLimit().

    When ExitLongStop() is triggered will the corresponding ExitLongLimit be cancelled?
    When ExitLongLimit() is triggered will the corresponding ExitLongStop be cancelled?

    or do I have to add something in the code?

    My question refers not to the orderhandling and coding of the script, this all works OK, but I´m thinking now if I can be sure it works 100% correctly with cancelling on exchange or your servers. Andwill the opposite order be cancelled also when my NT is frozen?

    Thank you
    Tony

    #2
    tonynt,

    For your first two questions about your scripts, you can refer to the internal order handling rules: http://ninjatrader.com/support/helpG...d_approach.htm. Also, Exit methods are only active when there is an open position for them to exit. So ExitShort() will only be active when there is an open short position.

    So in your case, when the ExitLongStop() is trigger, the corresponding ExitLongLimit will be cancelled and same for ExitLongLimit().

    The NinjaScript Strategies can only work when NinjaTrader is running. So if NinjaTrader does crash with a strategy in session, the strategy will be unable to complete. If you run into this situation, I would recommend you to call your brokerage as soon as possible to exit an order.
    Bobby Y.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply.

      This is confusing now for me. I thought that the stop and target is on NT-brokerage servers as well and this will work even when my computer is disconnected, no? I DO NOT ask for any other conditions like trailstop or changing stoplosses or targets. I DO ONLY refer with my question to the stop and target that are already existing/working (on exchange and NT-brokerage servers). Will the target on NT-server be cancelled when stop is triggered and vv will the stop be cancelled when the target is triggered (when it is from my script an ExitLongStop as stop and an ExitLongLimit as target)

      Thank you for clearifying.

      Best
      Tony

      Originally posted by NinjaTrader_BobbyY View Post
      tonynt,

      For your first two questions about your scripts, you can refer to the internal order handling rules: http://ninjatrader.com/support/helpG...d_approach.htm. Also, Exit methods are only active when there is an open position for them to exit. So ExitShort() will only be active when there is an open short position.

      So in your case, when the ExitLongStop() is trigger, the corresponding ExitLongLimit will be cancelled and same for ExitLongLimit().

      The NinjaScript Strategies can only work when NinjaTrader is running. So if NinjaTrader does crash with a strategy in session, the strategy will be unable to complete. If you run into this situation, I would recommend you to call your brokerage as soon as possible to exit an order.

      Comment


        #4
        tonynt,

        Submitted stop and target orders are stored with NT Brokerage however your submitted target will not be automatically cancelled when stop is triggered and vise versa. This is because NinjaTrader is not connected or it shutdown/froze up unexpectedly therefore NinjaTrader isn't able to internally process and cancel the corresponding limit/stop orders. When there is a disconnection or NinjaTrader crashes while you have live orders going on, it is always good to call the brokerage.
        Bobby Y.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_BobbyY View Post
          tonynt,

          Submitted stop and target orders are stored with NT Brokerage however your submitted target will not be automatically cancelled when stop is triggered and vise versa. This is because NinjaTrader is not connected or it shutdown/froze up unexpectedly therefore NinjaTrader isn't able to internally process and cancel the corresponding limit/stop orders. When there is a disconnection or NinjaTrader crashes while you have live orders going on, it is always good to call the brokerage.
          Hm. Server-side OCO should function even if NT is closed. That is the point of having server-side OCO, instead of locally simulated OCO. What vendors have server-side OCO is listed on the forum somewhere.

          ref: http://ninjatrader.com/support/forum...ead.php?t=5349

          Comment


            #6
            Hi koganam,

            thank you for your post. Yes, this is confusing me now. With my understanding (from fellows in rooms and other replies here in the forum) it should work "per default" with NT servers. So I´m surprised now about the situation concerning this important topic (if one had naked trades already will understand how important this is)

            Best regards
            Tony

            Comment


              #7
              Originally posted by tonynt View Post
              Hi koganam,

              thank you for your post. Yes, this is confusing me now. With my understanding (from fellows in rooms and other replies here in the forum) it should work "per default" with NT servers. So I´m surprised now about the situation concerning this important topic (if one had naked trades already will understand how important this is)

              Best regards
              Tony
              What is confusing? Server-side OCO works correctly, provided the provider does have server-side OCO. Did you read the list to which I linked?

              Comment


                #8
                Before your "Hm" it was confusing. This also would explain the "Hm".

                Comment


                  #9
                  tonynt,

                  I believe there was a some misunderstanding. The exit methods have no overload for OCO so there is no way to apply an OCO string to the orders, while it is possible to use these orders as an OCO, that would be a Manually programmed logical OCO not a server side OCO meaning you would have your logic cancel one if the other fill.
                  Bobby Y.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by aussugardefender, Today, 01:07 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post aussugardefender  
                  Started by pvincent, 06-23-2022, 12:53 PM
                  14 responses
                  238 views
                  0 likes
                  Last Post Nyman
                  by Nyman
                   
                  Started by TraderG23, 12-08-2023, 07:56 AM
                  9 responses
                  383 views
                  1 like
                  Last Post Gavini
                  by Gavini
                   
                  Started by oviejo, Today, 12:28 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post oviejo
                  by oviejo
                   
                  Started by pechtri, 06-22-2023, 02:31 AM
                  10 responses
                  125 views
                  0 likes
                  Last Post Leeroy_Jenkins  
                  Working...
                  X