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 Waxavi, Today, 02:10 AM
    0 responses
    6 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Started by TradeForge, Today, 02:09 AM
    0 responses
    11 views
    0 likes
    Last Post TradeForge  
    Started by Waxavi, Today, 02:00 AM
    0 responses
    2 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Started by elirion, Today, 01:36 AM
    0 responses
    4 views
    0 likes
    Last Post elirion
    by elirion
     
    Started by gentlebenthebear, Today, 01:30 AM
    0 responses
    5 views
    0 likes
    Last Post gentlebenthebear  
    Working...
    X