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 _Zero_, 01-06-2020, 01:16 PM
    58 responses
    1,458 views
    5 likes
    Last Post Sed777
    by Sed777
     
    Started by dibDab, Today, 12:50 PM
    0 responses
    3 views
    0 likes
    Last Post dibDab
    by dibDab
     
    Started by TRADER_F, 08-23-2023, 07:02 AM
    5 responses
    37 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by sgordet, Today, 12:00 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Sev  
    Started by GustavoHC, Today, 04:44 AM
    2 responses
    27 views
    0 likes
    Last Post GustavoHC  
    Working...
    X