Modify pending orders according to % of balance

Created at 06 Nov 2023, 19:40
VI

vinicius00_com

Joined 03.10.2023

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 

 


@vinicius00_com
Replies

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

PanagiotisCharalampous
20 Nov 2023, 07:28

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

vinicius00_com
19 Nov 2023, 12:36

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


@vinicius00_com