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 algospoke, Today, 06:40 PM
        0 responses
        10 views
        0 likes
        Last Post algospoke  
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        7 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        7 views
        0 likes
        Last Post quantismo  
        Started by AttiM, 02-14-2024, 05:20 PM
        8 responses
        168 views
        0 likes
        Last Post jeronymite  
        Started by cre8able, Today, 04:22 PM
        0 responses
        10 views
        0 likes
        Last Post cre8able  
        Working...
        X