Another request before i go hacking away at code - hoping someone has done something similar.
I am giving the option of a "splitPosition" on X number of requested lots.
Ie, the user might have requested 1 standard lot, or a risk calculation that equates to 1 standard lot, and to split that position into 3 multiple trades.
So i just need the code to split that 1 lot into 3 even sizes, and obviously take care of the correct rounding of numbers and possibility that it will not be even numbers.
So i would assume in this case it would come back with 3 different positions of something like:
Position 1: 0.35
Position 2: 0.35
Position 3: 0.3
Oh and if it takes into account the brokers minimum position etc that would be nice.
Much appreciate your time.
I am giving the option of a "splitPosition" on X number of requested lots.
Ie, the user might have requested 1 standard lot, or a risk calculation that equates to 1 standard lot, and to split that position into 3 multiple trades.
So i just need the code to split that 1 lot into 3 even sizes, and obviously take care of the correct rounding of numbers and possibility that it will not be even numbers.
So i would assume in this case it would come back with 3 different positions of something like:
Position 1: 0.35
Position 2: 0.35
Position 3: 0.3
Oh and if it takes into account the brokers minimum position etc that would be nice.
Much appreciate your time.