- ago
May I know how to round down the quantity, such as hundreds digit, in strategy monitor window and order manager window?
Thanks
0
53
Solved
3 Answers

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
- ago
#2
Round Lots in Preferences, Backtest
0
Best Answer
Cone7
- 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