Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop loss vs trailing stop

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

    Stop loss vs trailing stop

    I saw in the help guide that The SetStopLoss() method can NOT be used concurrently with the SetTrailStop() method for the same position, if both methods are called for the same position (fromEntrySignal) the SetStopLoss() will always take precedence
    So in the code
    protectedoverridevoid Initialize()
    {
    SetStopLoss(CalculationMode.Percent, perstop);
    SetTrailStop(CalculationMode.Percent,
    2*perstop);

    CalculateOnBarClose =
    true;
    }
    it seems SetStopLoss will predominate.
    But this conjonction of a stop loss & a trailing stop is possible in Strategy ATM... How to code it?


    #2
    Just answered you here - http://www.ninjatrader-support2.com/...d.php?p=126943
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Haiasi, 04-25-2024, 06:53 PM
    2 responses
    17 views
    0 likes
    Last Post Massinisa  
    Started by Creamers, Today, 05:32 AM
    0 responses
    5 views
    0 likes
    Last Post Creamers  
    Started by Segwin, 05-07-2018, 02:15 PM
    12 responses
    1,786 views
    0 likes
    Last Post Leafcutter  
    Started by poplagelu, Today, 05:00 AM
    0 responses
    3 views
    0 likes
    Last Post poplagelu  
    Started by fx.practic, 10-15-2013, 12:53 AM
    5 responses
    5,408 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Working...
    X