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 terofs, Yesterday, 04:18 PM
    1 response
    21 views
    0 likes
    Last Post terofs
    by terofs
     
    Started by CommonWhale, Today, 09:55 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Gerik, Today, 09:40 AM
    2 responses
    7 views
    0 likes
    Last Post Gerik
    by Gerik
     
    Started by RookieTrader, Today, 09:37 AM
    2 responses
    12 views
    0 likes
    Last Post RookieTrader  
    Started by alifarahani, Today, 09:40 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X