Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trail Stop

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

    Trail Stop

    Hi,

    I am using ...
    Code:
     
    SetTrailStop("My Entry", CalculationMode.Ticks, stoploss, true);
    .. for my trail stop.

    Once the trail stop reaches breakeven, I want to keep the stop there (i.e. at breakeven).

    How do I "cancel" the trail stop once price is at least "stoploss" in front of my entry level, so that I can then enter a fixed stop price?

    Something along the lines of the following doesn't seem to work as I'd hoped ...

    Code:
    stopOrder = SetTrailStop("My Entry", CalculationMode.Ticks, stoploss,true);
    then use (for a long)...
    Code:
     
    if(Close[0] > Position.AvgPrice + stoploss/100)
    { CancelOrder(stopOrder);}
    ... but this doesn't seem to be accepted code.

    #2
    OK, I found previous forum entries to something similar, so am investigating these now ...

    HTML Code:
    http://www.ninjatrader.com/support/forum/showthread.php?t=25510&highlight=cancel+trail+stop


    HTML Code:
    http://www.ninjatrader.com/support/forum/showthread.php?t=14701&highlight=iorder+trail+stop

    Comment


      #3
      AnotherTrader, for this case I would recommend you just work with the SetStopLoss and adjust it's price dynamically as needed - http://www.ninjatrader.com/support/f...ead.php?t=3222
      BertrandNinjaTrader Customer Service

      Comment


        #4
        OK, will look at that reference now.

        Thanks.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by jclose, Today, 09:37 PM
        0 responses
        4 views
        0 likes
        Last Post jclose
        by jclose
         
        Started by WeyldFalcon, 08-07-2020, 06:13 AM
        10 responses
        1,413 views
        0 likes
        Last Post Traderontheroad  
        Started by firefoxforum12, Today, 08:53 PM
        0 responses
        10 views
        0 likes
        Last Post firefoxforum12  
        Started by stafe, Today, 08:34 PM
        0 responses
        10 views
        0 likes
        Last Post stafe
        by stafe
         
        Started by sastrades, 01-31-2024, 10:19 PM
        11 responses
        169 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X