Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetStopLoss()

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

    SetStopLoss()

    Hello,

    I am using currently using SetStopLoss() which I have declared in initialization to protect my trades.
    However, I would also want to change variables during the StopLoss execution.

    eg: change variable State = 1 from State = 0;

    Is this possible?

    #2
    Hello,

    Thanks for the note.

    This is possible to change the stop loss dynamically. To do this please use this sample.



    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Thanks for the help, the method you provided changes the SetStopLoss parameters, I am actually wanting to change variables that is outside the SetStopLoss function's scope while the stopLoss is executed. Is that workable?
      Last edited by Lhiva; 06-09-2011, 08:29 AM.

      Comment


        #4
        Hello,

        Sorry not sure I follow.

        Are you wanting to move the stop loss up or down by changing the stop loss variable after entry into the trade?

        I look forward to assisting you further.
        BrettNinjaTrader Product Management

        Comment


          #5
          I am using several variables that act as "switches" or "states" for my backtesting conditions to give my strategy more variations.

          Such variables change when my position changes(eg: covered, stopped, scratched)
          However when SetStopLoss is executed, I cannot change such variables as i cant find a way to access the stoploss function.

          hope this explains better

          Comment


            #6
            Hello,

            In this case you need to monitor the stop loss if you need it for this purpose. Use this sample.



            This will give you a way to track the stop loss order.

            Let me know if I can be of further assistance.
            BrettNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            646 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            367 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            569 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            573 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X