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 CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    26 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    182 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    335 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    260 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X