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 Haiasi, 04-25-2024, 06:53 PM
        2 responses
        17 views
        0 likes
        Last Post Massinisa  
        Started by Creamers, Today, 05:32 AM
        0 responses
        5 views
        0 likes
        Last Post Creamers  
        Started by Segwin, 05-07-2018, 02:15 PM
        12 responses
        1,786 views
        0 likes
        Last Post Leafcutter  
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,408 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Working...
        X