Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Determine open position size by entry signal name, not the entire open position size?

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

    Determine open position size by entry signal name, not the entire open position size?

    Hello,

    I have a strategy that scales in and scales out using multiple EnterLong() and ExitLong() method calls with different entry signal names. By scaling in, I mean that the EnterLong() method is called multiple times before ExitLong() is called, and the EnterLong() method is always called with a unique signal name that is guaranteed to be different than the signal names used in all of the other calls to EnterLong().

    Is there a NinjaScript method that returns the current position size by entry signal name rather than the current position size of the entire position that was opened by multiple calls to EnterLong()?

    Thanks in advance!

    EquityTrader

    #2
    Hello EquityTrader,

    There is not a specific method to track quantities by the signal name, you would need to either track the specific orders by using OnOrderUpdate or use your own means to track individual quantities. If the purpose of tracking the quantities is to be able to later close that amount you can just call the exit order with the entries Signal Name as the From Entry Signal to close that portion for the position.

    Comment


      #3
      Hi Jesse,

      Thank you for the quick and informative response.

      EquityTrader

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      45 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      31 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X