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 Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            593 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            554 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X