Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

problem with stop loss

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

    problem with stop loss

    Hello everybody,
    i try to do a trailing stop with "setstoploss" for e-mini but it doesn't work and set a stop under my entry price when the price goes down. Here is the code :

    // condition set 3
    if (Position.MarketPosition == MarketPosition.Long
    &&Position.GetProfitLoss(Close[0], PerformanceUnit.Points) > 2)
    {
    SetStopLoss("Long", CalculationMode.Ticks, 5, false);
    }
    }

    thanks for the help !

    #2
    Dimi2212,

    Thank you for your post.

    Do you know if the Condition is getting hit as true?

    Does the original SetStopLoss() still stay the same as before?

    I recommend that you add TraceOrders = true; in the initialize() method. This will print to the output window on the order information and placements.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    639 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    366 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    569 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    572 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X