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 Harvard, Today, 01:24 PM
    0 responses
    4 views
    0 likes
    Last Post Harvard
    by Harvard
     
    Started by snoussi, Today, 12:26 PM
    5 responses
    14 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by Richozzy38, Today, 01:06 PM
    0 responses
    5 views
    0 likes
    Last Post Richozzy38  
    Started by reynoldsn, Today, 12:42 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by f.saeidi, Today, 12:35 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Working...
    X