Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

wildcard for dynamic signalName

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

    wildcard for dynamic signalName

    I'm coding a strategy that enters pullbacks in a trend, adding on each pullback until the trend ends (or maximum size is reached). Entries are named dynamically, something like this:

    string myName = "myLONG" + myCounter; // myCounter is an integer
    if ( mySetup )
    {
    EnterLong( myName ); // name this entry myLONGn
    myCounter++;
    }

    I need to use a signalName in my exit like myLONGn where n is an integer wildcard. What do I use for the wildcard?

    Thanks!

    #2
    dave_b_quickc,

    You would need to place in a valid "n" value. You need to keep track of which signal names are active and just call the appropriate one you want to exit.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      alternatives

      OK, I should have realized that each unique signalName will require a unique exit order unless the strategy exits all at once with an un-named exit order.

      Maybe I was complicating my strategy too much. It had 4 different types of entry per trend and one of them was using dynamic signalNames for multiple repetitions of the same signal. Perhaps I can accomplish what I need by taking the trend definition from my strategy and making it an indicator, and saving each type of entry into the trend as separate strategies.

      Thanks for the clue.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      618 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      359 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      561 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      566 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X