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 rdtdale, Today, 01:02 PM
    0 responses
    3 views
    0 likes
    Last Post rdtdale
    by rdtdale
     
    Started by alifarahani, Today, 09:40 AM
    3 responses
    15 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by RookieTrader, Today, 09:37 AM
    4 responses
    18 views
    0 likes
    Last Post RookieTrader  
    Started by PaulMohn, Today, 12:36 PM
    0 responses
    8 views
    0 likes
    Last Post PaulMohn  
    Started by love2code2trade, 04-17-2024, 01:45 PM
    4 responses
    41 views
    0 likes
    Last Post love2code2trade  
    Working...
    X