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:	158
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 sidlercom80, 10-28-2023, 08:49 AM
    173 responses
    2,366 views
    0 likes
    Last Post jeronymite  
    Started by Mindset, Today, 10:38 PM
    0 responses
    10 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by JesseOffshore, Today, 09:40 PM
    0 responses
    4 views
    0 likes
    Last Post JesseOffshore  
    Started by WHICKED, 04-26-2024, 12:56 PM
    4 responses
    144 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by ezrollin, 02-26-2022, 11:14 PM
    7 responses
    207 views
    0 likes
    Last Post kenz987
    by kenz987
     
    Working...
    X