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:	157
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 Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,769 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    30 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    943 views
    0 likes
    Last Post spwizard  
    Started by Max238, Today, 01:28 AM
    0 responses
    10 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by rocketman7, Today, 01:00 AM
    0 responses
    7 views
    0 likes
    Last Post rocketman7  
    Working...
    X