johnliang8
 ( 8.14% )
- ago
May I know how to round down the quantity, such as hundreds digit, in strategy monitor window and order manager window?
Thanks
0
816
Solved
3 Replies

Reply

Bookmark

Sort
- ago
#1
What do you mean it has to be rounded down? What position sizing, market, broker provider are you using?
0
Glitch8
 ( 12.10% )
- ago
#2
Round Lots in Preferences, Backtest
0
Best Answer
Cone8
 ( 28.32% )
- ago
#3
Just for completeness, if you want ultimate control of sizing transactions in your code, the technique is demonstrated here -

CODE:
         int roundIncrement = 10;      // nearest 10 shares          double size = 253;            // a size to test with          double roundedSize = Math.Floor(size / roundIncrement) * roundIncrement;          WriteToDebugLog(size + " rounded by " + roundIncrement + " is " + roundedSize);
3

Reply

Bookmark

Sort