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

Placing a Stop Loss below a candle's low or high

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

    Placing a Stop Loss below a candle's low or high

    Hi!
    Is there a way in Strategy Builder to set a Stop Loss 2 ticks below a candle's low or high, without unlocking the code? And if not, is there code that I could borrow to do this?
    Thanks in advance!

    #2
    Hello jpeep,

    Thanks for your post.

    The Stops and Targets allows for setting static stop losses based on the entry. If you would like to place stop losses based on price action, you will need to design logic in the Conditions and Actions page to call ExitLongStopMarket when the Strategy Position is long.

    I have attached an example that demonstrates protecting your position with Exit methods in the Strategy Builder. This demonstrates a move to Breakeven, but you could consider moving the stop loss to the Low of a previous bar instead of moving it to Position.AveragePrice.

    We look forward to assisting.
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks
      I'll check it out and let you know if anything.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Kaledus, Today, 01:29 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by frankthearm, Yesterday, 09:08 AM
      13 responses
      45 views
      0 likes
      Last Post frankthearm  
      Started by PaulMohn, Today, 12:36 PM
      2 responses
      16 views
      0 likes
      Last Post PaulMohn  
      Started by Conceptzx, 10-11-2022, 06:38 AM
      2 responses
      53 views
      0 likes
      Last Post PhillT
      by PhillT
       
      Started by yertle, Yesterday, 08:38 AM
      8 responses
      37 views
      0 likes
      Last Post ryjoga
      by ryjoga
       
      Working...
      X