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 CaptainJack, 05-29-2026, 05:09 AM
            0 responses
            58 views
            0 likes
            Last Post CaptainJack  
            Started by CaptainJack, 05-29-2026, 12:02 AM
            0 responses
            35 views
            0 likes
            Last Post CaptainJack  
            Started by charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            103 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            184 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            171 views
            0 likes
            Last Post CarlTrading  
            Working...
            X