how to base your trade size from your account balance
how to base your trade size from your account balance
18 Dec 2020, 02:28
Hi, I was wondering if anyone could help me with how to change the size of a trade depending on my account balance?
Replies
jackhpfilerrowson
18 Dec 2020, 15:31
RE:
PanagiotisCharalampous said:
Hi jackhpfilerrowson,
Can you be more specific? Give us an example of how do you expect this to work.
Best Regards,
Panagiotis
Thanks for the reply.
So say my account balance is £10,000 and I want a trade to use 2% of this multiplied by my leverage for a trade (£10,000*0.02*500 for example). And then the next trade would have a different volume based on the same logic but new account balance.
Let me know if you need me to clarify further, much appreciated.
@jackhpfilerrowson
PanagiotisCharalampous
18 Dec 2020, 15:56
Hi jackhpfilerrowson,
Here is an example
var volume = Account.Balance * 0.02 * Account.PreciseLeverage;
ExecuteMarketOrder(TradeType.Buy, Symbol.Name, volume);
Best Regards,
Panagiotis
@PanagiotisCharalampous
jackhpfilerrowson
18 Dec 2020, 17:02
Thanks that works great. Any idea as to why it has changed the number of trades from 583 to just 1 however?
Thanks for your time, Jack.
@jackhpfilerrowson
PanagiotisCharalampous
21 Dec 2020, 08:19
Hi jackhpfilerrowson,
Which trades are you referring to?
Best Regards,
Panagiotis
@PanagiotisCharalampous
jackhpfilerrowson
22 Dec 2020, 00:18
RE:
PanagiotisCharalampous said:
Hi jackhpfilerrowson,
Which trades are you referring to?
Best Regards,
Panagiotis
No worries, it was just my poor coding all fixed now. Thanks for your help above
@jackhpfilerrowson
PanagiotisCharalampous
18 Dec 2020, 07:54
Hi jackhpfilerrowson,
Can you be more specific? Give us an example of how do you expect this to work.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous