Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Turning losers into winners

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

    Turning losers into winners

    Dear Cservice,

    I'm still struggling with autotrail breakeven. I drew a picture in paint of my idea.

    I've noticed that many of my trades start as winners, but turn out as losers. I'm trying to turn that as much as possible.

    The picture explains 3 sorts of trades:
    A: pure Winners
    B: pure Losers
    C: Losers that start out as winners

    I would like the stoploss to move to breakeven when a trade reaches 100 points on the DAX future (0.5 tick). I tried this with the command:

    if (Close[0] > Position.AvgPrice + 200 * TickSize)
    {
    SetStopLoss(CalculationMode.Price, Position.AvgPrice);
    }
    But it did not work. What's wrong with this code?

    Second as the winner trade A reaches a certain point, not only do I want to move the stoploss to breakeven, I would like to save some of profit by raising the stoploss to the green line.

    How do I implement this?

    Thanks,
    Attached Files

    #2
    Hello Robert87,

    The FDXM (FDAX mini) has a tick size of 1 and a point value of 5.00.

    This means that every tick with the FDXM is 1 point. 1 tick = 1 point when the ticksize is 1.

    If you want to move after 100 points, use Position.AvgPrice + 100 * TickSize.

    Further, add prints to your code and use TraceOrders.

    Each time the condition is called, print the value of the close price and the value of your calculated trigger price.

    Print(string.Format("{0} | close: {1} > triggerprice: {2}", Time[0], Close[0], (Position.AvgPrice + 100 * TickSize)));

    Is the close price above your calculated trigger price?

    It is important that you use prints to understand the behavior of your code.
    https://www.youtube.com/watch?v=K8v_...tu.be&t=48m45s
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    110 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    156 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    74 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X