Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order quantity bug

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

    Order quantity bug

    In the following code snippet, NT sets the order quantity to 1 even though the quantity parameter equals 0.

    MyPositionSize = ...(some calculation, result possibly zero, meaning no trade):
    EnterLongLimit(0, true, MyPositionSize, MyLimitPrice, "MySigName");

    This is screwy behavior if the function is designed this way. A quantiy of zero should mean zero (ie no trade), not a quantiy of 1.

    The work around is obvious, ie place the function within a conditional, ie
    if (PositionSize != 0)
    EnterLongLimit(...);

    but I think the right thing to do is fix the function itself.

    #2
    Thank you for the suggestion. I have forwarded it to development.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by andrewtrades, Today, 04:57 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    6 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    436 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    7 views
    0 likes
    Last Post FAQtrader  
    Started by rocketman7, Today, 09:41 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X