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 SalmaTrader, 07-07-2026, 10:26 PM
            0 responses
            49 views
            0 likes
            Last Post SalmaTrader  
            Started by CarlTrading, 07-05-2026, 01:16 PM
            0 responses
            22 views
            0 likes
            Last Post CarlTrading  
            Started by CaptainJack, 06-17-2026, 10:32 AM
            0 responses
            15 views
            0 likes
            Last Post CaptainJack  
            Started by kinfxhk, 06-17-2026, 04:15 AM
            0 responses
            21 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 06-17-2026, 04:06 AM
            0 responses
            23 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Working...
            X