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 kinfxhk, 07-14-2026, 09:39 AM
    0 responses
    127 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    105 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    85 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    105 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    86 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X