Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetStopLoss

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

    SetStopLoss

    Is it possible to enter a negative number for the value in SetStopLoss and CalculationMode.Ticks? Alternatively, is it possible to switch CalculationMode from ticks to price while holding a position (that would actually be preferable)?

    When a position is first entered, a fixed number of ticks is used then it jumps to a number of ticks based on some other criteria and then once a certain profit level is reached, it starts trailing.

    Because you can't mix SetStopLoss with a trailing stop, once I get to the trailing stop level I still have to use SetStopLoss.

    However, now I want a stop that is above (for a long) my entry so it would appear the stop loss in ticks is actually a negative number.

    Yes, I know I can use price all along but because initally the price is going to be so close to the market, I have to jump through hoops to make certain I don't place a stop at the market which will give me an error and shut the strategy down.

    Best Regards,
    Scott

    #2
    ScottB, a stop with negative ticks would become a profit target. What check are you using to make sure you're not entering on the wrong side of the market? Have you tried using GetCurrentAsk() and GetCurrentBid() to check the price before entry?
    AustinNinjaTrader Customer Service

    Comment


      #3
      Austin, using GetCurrentAsk... was what I was trying to avoid. I figured out you can change calculation mode in the middle of a trade so all is well.

      The difference between a negative tick stop and a profit target would be the nature of the underlying order. I was hoping the stop would stay a stop order and NinjaTrader simply converted the input values into an actual prices. This would leave the order a stop order, just at a price above the entry.

      I am used to using the unmanaged approach and allowing for fast moving markets. If done correctly (so as it is virtually impossible to break) requires a decent amount of code. Technically, you can do what you suggested but I have found issues with doing that without additional checks, if the market is moving very fast.

      Thanks for your help.

      Comment


        #4
        Scott, thanks for the reply. Please let us know if you have any other questions.
        AustinNinjaTrader Customer Service

        Comment


          #5
          You are welcome; everything is working.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          633 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          364 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          567 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          568 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X