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

How to reset a stoploss within OnBarUpdate()

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

    #16
    Hello Trader17,

    Thanks for your reply.

    "So resetting the Stop value will not hurt anything even if added under OnBarUpdate even though Chelsea mentioned it does reset if Stop is added above the Enter Long." I'm not sure what you are implying here but the reset is done in OnBarUpdate() and should be done before the next entry order is placed so what both Chelsea and I are saying is the same thing.

    Yes, you can mix Stoploss CalculationModes at any time. The point is that you are setting the stop loss to some value that needs to be appropriate for the next entry order.

    Please note that if you need your strategy coded for you, we can provide references to 3rd party programmers who have the competency needed to produce your strategy.
    Paul H.NinjaTrader Customer Service

    Comment


      #17
      Thanks. What I meant was if it were ok to do the reset under OnBarUpdate as well as set the Stop just above EnterLong which also resets the value of the Stop under OnBarUpdate. Just making sure it is code compliant.
      And was just making sure that the reset can have a different stop loss value than the "real" stop as long as you said they both are pretty close to each other.
      Thank you.

      Comment


        #18
        Hello Trader17,

        Thanks for your reply.

        Chelsea's example would be in the OnBarUpdate().

        In general, all of our examples would be inside the OnBarUpdate() method unless explicitly advised otherwise.

        Setting the value of the set method prior to an order is in effect "resetting" the set methods value from what it previously was. The main point here is to always ensure that the set method value is set to what you want to use prior to placing an entry order, it is really as simple as that.



        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by zstheorist, Today, 07:52 PM
        0 responses
        3 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        149 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        5 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        5 views
        0 likes
        Last Post tkaboris  
        Working...
        X