Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

setStopLoss / setTrailStop

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

    setStopLoss / setTrailStop

    Hi,

    Is there a way to call setStopLoss / setTrailStop and set the price and / or ticks to be on a per contract basis if the trade has more than 1 contract? i.e. $500 (or 50 ticks) stop per contract.

    Thanks

    #2
    Hello andreneoh,

    The quantity of SetStopLoss() and SetTrailStop() matches the quantity of the entry signal. You can link them together, by using a specific fromEntrySignal value.



    SetStopLoss(string fromEntrySignal, CalculationMode mode, double value, bool simulated)

    Please let us know if this doesn't answer your question.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Can I take this to mean that SetStopLoss ("string..*1contract", 500) will mean a stoploss of $500 while SetStopLoss ("string..*2contract", 500) means a stoploss of 2*500 = $1000?

      Comment


        #4
        There's no way to specify the quanity within the SetStopLoss method.

        The quantity is set in the Enter method, and the stop loss and enter methods can be linked with the fromEntrySignal parameter.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          SetStopLoss to Parabolic Sar value

          How can we program a StopLoss = to ParabolicSar value ?

          Comment


            #6
            Welcome on the forums here - you could use the Price mode of the SetStopLoss and then use the PSAR as value.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            57 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            37 views
            0 likes
            Last Post PaulMohn  
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            166 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            101 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            162 views
            2 likes
            Last Post CaptainJack  
            Working...
            X