Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

stopmar****rder in NT-script

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

    stopmar****rder in NT-script

    Hello,

    we have a discussion in a trading room about stopmar****rders in script strategies.

    From my understanding and a reply in the forum SetStopLoss(.....) is a stopmar****rder and not a stoplimitorder.

    But from the room I heard that as the stop appears in the dom on the right side it is a limitmar****rder because if it would be a stopmar****rder it should be a bar across all dom colums from left to right. (example for a long trade)

    When it is a stopmar****rder from a script strategy please, what has to be done that it is a stopmar****rder?

    Thank you!
    Tony

    #2
    Hello Tony,

    If you are unsure about what order type is created by any method call, I would recommend you test placing the order and look at the order type on the Orders tab of the Control Center.

    With NinjaTrader, the SetStopLoss creates a StopLimitOrder with a 20 tick offset.

    To use a StopMarket order instead, do not use SetStopLoss and instead call ExitLongStop() or ExitShortStop().

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea,

      thank you for your reply!

      But when using ExitLongStop() then this will not work with the OCO string same as stop and order from an ATM-strategy or not work same as the OCO string with SetStopLoss and SetProfitTarget in the script (from what I learnt in the forum)? Am I correct?

      Thank you!
      Tony

      Comment


        #4
        Hello Tony,

        That is correct, OCO is not possible with enter / exit methods using the Managed approach.

        If you use signal names, this will attempt to cancel any other working orders when the entry fills, however, this would not be native OCO on the server side.

        If you want to use OCO with a Stop Market Order, you would need to switch to the unmanaged approach which allows you to use OCO.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello Chelsea,

          thank you again for your reply. I want to show you what is confusing me about this topic:
          in this thread I got the reply in the forum that setstoploss is a stopmar****rder. Please see what your collegue JC wrote in #4.



          Thank you!
          Tony

          Comment


            #6
            Hello Tony,

            That was my mistake.

            I tested and found the order is a Stop Market order.
            (looks like only the AtmStrategy stuff uses the Stop Limit with 20 tick offset)

            When you tested the SetStopLoss() what type of order appeared in the Orders tab of the Control Center?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello Chelsea,

              thanks for clearifying this. But now back to the beginning and our discussion in the room:

              "From my understanding and a reply in the forum SetStopLoss(.....) is a stopmar****rder and not a stoplimitorder.

              But from the room I heard that as the stop appears in the dom on the right side it is a limitmar****rder because if it would be a stopmar****rder it should be a bar across all dom colums from left to right. (example for a long trade)"

              How does/should a stopmar****rder (from a script) appear in the dom, and how a stoplimitorder (referring the informations here above).

              Thank you
              Tony

              Comment


                #8
                Hello Tony,

                The exit orders that are part of an Atm Strategy will appear across all 3 columns of the SuperDOM.

                Any orders that are not part of an Atm Strategy will appear in the column of the side of the market they are on.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by ghoul, Today, 06:02 PM
                0 responses
                7 views
                0 likes
                Last Post ghoul
                by ghoul
                 
                Started by Barry Milan, Yesterday, 10:35 PM
                6 responses
                18 views
                0 likes
                Last Post Barry Milan  
                Started by DanielSanMartin, Yesterday, 02:37 PM
                2 responses
                13 views
                0 likes
                Last Post DanielSanMartin  
                Started by DJ888, 04-16-2024, 06:09 PM
                4 responses
                13 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by terofs, Today, 04:18 PM
                0 responses
                12 views
                0 likes
                Last Post terofs
                by terofs
                 
                Working...
                X