Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Profit Target, Stop Loss & Trailing Stop

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

    Profit Target, Stop Loss & Trailing Stop

    I am trying to set a profit target, stop loss & trailing stop for my strategy. The trailing stop never seems to trigger even if i set it to 1 tick. It only works if I remove the SetStopLoss. Is it not possible to have all three running at the same time?

    HTML Code:
    else if (State == State.Configure)
                {
                    SetProfitTarget(CalculationMode.Currency,1000);
                    SetStopLoss(CalculationMode.Currency,500);
                    SetTrailStop(CalculationMode.Ticks,1);
                }​

    #2
    Based on the documentation here: SetTrailStop, SetTrailStop and SetStopLoss cannot be used together. See the first sentence under Notes.

    The SetTrailStop() method can NOT be used concurrently with the SetStopLoss() or SetParabolicStop() method for the same position, if any of methods are called for the same position (fromEntrySignal) the SetStopLoss() will always take precedence. You can however, use all three methods in the same strategy if they reference different signal names.​

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AaronKoRn, Today, 09:49 PM
    0 responses
    6 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Today, 08:42 PM
    0 responses
    9 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    10 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,976 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    9 views
    0 likes
    Last Post rbeckmann05  
    Working...
    X