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

SetStopLoss and CalculationMode

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

    SetStopLoss and CalculationMode

    I'm a bit confused about how the CalculationMode is applied when calling SetStopLoss.

    This page has some helpful information, but not quite enough:
    https://ninjatrader.com/support/help...alculationmode

    Value is: the value the stop loss order is offset from the position entry price (exception is using .Price mode where 'value' will represent the actual price.
    I need some clarification.

    My questions relate to whether the calculation mode applies to a single unit (share/contract) or to the whole position.
    • Currency -- is this the loss on the whole position or a single share/contract?
    • Percent --
    • Price --
    • Ticks -- is this the number of ticks the current quoted price is offset from the average entry price of the current position? I'm pretty sure this doesn't mean the total ticks of loss on the entire open position, right?!
    • Pips -- same as ticks I assume




    #2
    Hello BarzTrading,

    Thanks for your post.

    Currency would be of the entire position. So if entering with 10 contracts, the currency value specified would be divided by 10, converted to ticks and applied to each order so that your max loss would be as specified.

    Regarding Ticks, each filled order would have its stop placed that many ticks away from that orders actual entry price.

    The same would apply to Pips.



    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks, Paul.

      Regarding Ticks, each filled order would have its stop placed that many ticks away from that orders actual entry price.
      Is one stop market order entered for each entry or is one stop market order maintained for the position regardless of the number of entries that formed that position?


      Comment


        #4
        Hello BarzTrading,

        Thanks for your reply.

        If the order is filled at one price then you would see one stop order for that quantity. If the order is filled at say two different prices then you may see two stop orders with the quantity related to the orders filled at the one price and orders filled at the other price.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          I was wondering is anyone knows what kind of entry logic that I could use with with SetStopLoss & SetProfitTarget that would allow me to enter at a precise entry points like the (Median[0]) ? . So basically imagine a up bar just closed and the price came back down during the next bar to the Median[1] it would then enter long. I know using a limit order wont work with the Set method. I also want to have the entry order only to be alive for just 1 bar and then cancel if isn't hit. Obvously this is a intrabar strategy, I know about adding the 1 tick data set and adjusting a few other settings to accommodate for intrabar.

          Any help is appreciated
          Quantismo

          Comment


            #6
            Hello quantismo,

            Thanks for your note.

            You would need to use a limit order when calling your Entry method.

            The default behavior for NinjaTrader is to cancel limit orders on the next bar if the trigger conditions are no longer true. If you wish for your limit order to stay active once the conditions for entry are no longer true, you can explicitly set your orders to stay active until either filled or canceled.

            Then, instead of Set methods, you could use Exit methods, such as ExitLongLimit()/ExitLongStopLimit(), to submit a stop loss or profit target a certain value.

            Here's a link to our help guide that goes over how to keep your limit orders alive: https://ninjatrader.com/support/help...ders_alive.htm

            Also, see the attached example script which demonstrates using Exit methods for a profit target/stop loss.

            Let us know if we may assist further.
            Attached Files
            Brandon H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Bhavika, Yesterday, 09:03 PM
            1 response
            4 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by slimcactus, Today, 10:26 AM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by Monares, Today, 10:49 AM
            3 responses
            17 views
            0 likes
            Last Post NinjaTrader_JustinD  
            Started by d122y, Today, 10:20 AM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by trader3000a, Today, 06:41 AM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X