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 / 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.

            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by lorem, Yesterday, 09:18 AM
            4 responses
            13 views
            0 likes
            Last Post lorem
            by lorem
             
            Started by Spiderbird, Today, 12:15 PM
            0 responses
            5 views
            0 likes
            Last Post Spiderbird  
            Started by cmtjoancolmenero, Yesterday, 03:58 PM
            12 responses
            42 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by FrazMann, Today, 11:21 AM
            0 responses
            6 views
            0 likes
            Last Post FrazMann  
            Started by geddyisodin, Yesterday, 05:20 AM
            8 responses
            52 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X