READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

How can i know / How can i build a function in MQL4 that will tell me what is the Maximum Lot Size that i can trade with based on my AccountBalance..?

1 replies

Karish

Customer, bbp_participant, community, sq-ultimate, 414 replies.

Visit profile

10 years ago #115120

Hello friends!,

How can i know / How can i build a function in MQL4 that will tell me what is the Maximum Lot Size that i can trade with based on my AccountBalance in MQL4?

 

i’m trying to backtest something but im getting the ERROR: “Error opening order: 134 : not enough money.”,

 

That error happens when the EA trying to execute a trade with a much higher Lot Size that it should use,

 

the question is how can i avoid this error and still execute the trade but based on the maximum lot size that i can execute based on my account balance?..

 

that way it will still execute an order but with the maximum lot size it can pull, so i wont get this error and wont miss trades.

 

BTW the function must calculate the Leverage and Margin..

 

thank you i how you understand 🙂

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #136933

If you need a function to calculate max pos size for your account you could try this one https://forum.mql4.com/12492#78427

0

Viewing 1 replies (of 1 total)