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
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
