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

SetStopLoss method - fromEntrySignal parameter

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

    SetStopLoss method - fromEntrySignal parameter

    Hi Team,

    I am running a single strategies with concurrent "systems" and need to tie my orders to whichever system initiates a trade. The SetStopLoss does have a fromEntrySignal string parameter and seems perfect for my use - however it does not seem to be working?

    private const string OpenLong = "Open Long";

    if (_enterLong)
    {
    _entryOrder = EnterLong(quantity: PositionSize, signalName: OpenLong);
    SetStopLoss( fromEntrySignal:OpenLong, CalculationMode.Ticks, StopLossTicks);
    }

    There does not seem to be an overload for fromEntrySignal:OpenLong

    What am I doing wrong?

    Ty in advance.

    Lex

    Click image for larger version

Name:	2021-10-24_19-14-34.jpg
Views:	35
Size:	42.6 KB
ID:	1176051

    #2
    Hello Lex,

    SetStopLoss() does have an overload with a fromEntrySignal parameter and requires an isSimulatedStop bool parameter as well.
    SetStopLoss(string fromEntrySignal, CalculationMode mode, double value, bool isSimulatedStop)

    Below is a link to the help guide, where you can find the overloads for every supported NinjaScript Method.
    https://ninjatrader.com/support/help...etstoploss.htm
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by fafafdenis, Today, 04:56 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by pjsmith, 07-18-2019, 04:21 AM
    7 responses
    247 views
    0 likes
    Last Post aligator  
    Started by ark321, Today, 05:12 PM
    0 responses
    8 views
    0 likes
    Last Post ark321
    by ark321
     
    Started by futurenow, Today, 04:49 PM
    0 responses
    9 views
    0 likes
    Last Post futurenow  
    Started by ofer1964spivak, Today, 04:27 PM
    0 responses
    5 views
    0 likes
    Last Post ofer1964spivak  
    Working...
    X