Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I set stop loss based on low of setup bar?

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

    How do I set stop loss based on low of setup bar?

    I want to set my stop based on the low or hgh or my setup bar. Once the criteria are met ( bar x) I enter on a break above bar X. Can I set my stop below low of bar X and leave it there until some other condition is met? Is there a easy way to do this?

    #2
    Hello,


    Yes, you can do this by placing the following code before your EnterLong():
    SetStopLoss(CalculationMode.Price, High[bar_x_index]);

    To get the bar_x_index you could use GetBar(Time[0]) at the time the conditions are met.

    This links will help:

    DenNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    331 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    550 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X