Modify pending orders according to % of balance
Modify pending orders according to % of balance
06 Nov 2023, 19:40
Hi all,
I'm looking for a way to modify all my pending orders according to my balance.
For instance, if I risk 0.25% of my account on each order I have a different lot size depending on the pair. The tricky part I think is to round up the volume if say 0.25% don't result in a round number of lots.
I would appreciate any help on this
Thanks
Replies
vfb95
19 Nov 2023, 12:36
( Updated at: 20 Nov 2023, 07:06 )
RE: Modify pending orders according to % of balance
PanagiotisCharalampous said:
Hi there,
Your trading volume can be set in steps. So rounding up or down is unavoidable.
Best regards,
Panagiotis
Hi Panagiotis,
Thanks for the feedback first of all, I'm struggling to find a way to automise this.
Is there a simple way where I can modify the volume on all my pending orders to 0.25% of my account balance?
Best Regards,
Vinicius
@vfb95
PanagiotisCharalampous
20 Nov 2023, 07:28
( Updated at: 20 Nov 2023, 07:29 )
RE: RE: Modify pending orders according to % of balance
vinicius00_com said:
PanagiotisCharalampous said:
Hi there,
Your trading volume can be set in steps. So rounding up or down is unavoidable.
Best regards,
Panagiotis
Hi Panagiotis,
Thanks for the feedback first of all, I'm struggling to find a way to automise this.
Is there a simple way where I can modify the volume on all my pending orders to 0.25% of my account balance?
Best Regards,
Vinicius
Hi there,
Check NormalizeVolumeInUnits method
@PanagiotisCharalampous
PanagiotisCharalampous
07 Nov 2023, 06:55
Hi there,
Your trading volume can be set in steps. So rounding up or down is unavoidable.
Best regards,
Panagiotis
@PanagiotisCharalampous