Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to specify non-integer quantities for order methods such as EnterLong?
Collapse
X
-
How to specify non-integer quantities for order methods such as EnterLong?
Is there a way to specify non-integers as the quantity parameter for order methods such as EnterLong? I was trying to test a strategy on an index fund that allows this. Thanks! -
Hi Patrick, thanks for your answer! Can you please help forward my question as a feature request? I think it will be useful for testing/optimizing strategies in which one invests a constant amount at regular intervals. Currently with constraints for the quantity parameter to be integers, we can calculate the closest integer amount of shares we want to buy, but the total won't be exactly what we plan to invest. I think one can get around this by multiplying the incremental amount of investment by a factor (say 1000) and view the result accordingly, but it's quite inconvenient and it can be hit with overflow problems when you look at a very long time period. Thanks!Originally posted by NinjaTrader_PatrickH View PostHello rocwhite,
Thank you for your post and welcome to the NinjaTrader Support Forum!
It is not possible to use other variable types other than integers for the quantity in NinjaTrader.
Please let me know if I may be of further assistance.
Roc
Comment
-
Fractional shares are allocated by a fund manager who is divvying up a total portfolio amount. You cannot specify the purchase of a fractional number of shares: you specify the amount that you want to invest. In other words, the fractional allocation of shares that you see in your statement is an accounting nicety, not a trade transaction.Originally posted by rocwhite View PostIs there a way to specify non-integers as the quantity parameter for order methods such as EnterLong? I was trying to test a strategy on an index fund that allows this. Thanks!
You did not buy fractional shares: you were allocated a fractional amount of shares by a fund manager who bought an integer number of shares, and divided them up for the participants. A subtle difference.
Neither you, nor the fund manager can buy anything other than an integer number of shares.
Comment
-
That's right. But my question still remains: if I want to model a strategy for an individual who trades a mutual fund, how can I mimic the fractional shares one can get in his real-life account?Originally posted by koganam View PostFractional shares are allocated by a fund manager who is divvying up a total portfolio amount. You cannot specify the purchase of a fractional number of shares: you specify the amount that you want to invest. In other words, the fractional allocation of shares that you see in your statement is an accounting nicety, not a trade transaction.
You did not buy fractional shares: you were allocated a fractional amount of shares by a fund manager who bought an integer number of shares, and divided them up for the participants. A subtle difference.
Neither you, nor the fund manager can buy anything other than an integer number of shares.Last edited by rocwhite; 08-18-2013, 06:46 PM.
Comment
-
Fortunately, I have no effect on what NT development will decide, so this is only an opinion, that may well be apropos of nothing.Originally posted by rocwhite View PostThat's right. But my question still remains: if I want to model a strategy for an individual who trades a mutual fund, how can I mimic the fractional shares one can get in his real-life account?
Unfortunately, it seems to me that NT is designed as a program for traders making real trades. Nobody can actually buy fractional shares, so it seems somewhat pointless to provide a facility that has no counterpart use in real trading. Again, just my personal $0.02.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
656 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
371 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
579 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment