English isn't my native language, but I'll try to get by..
I'm a little bit new to mql4, but have been trying to get everything going, I was testing an idea, then I needed to test a progressive lot size, my EA opens one trade at a time, so I wanted to check if the previous closed trades hit tp or not, if they hit take profit, then I start the next trade using 1 lot. If the closed trades didn't hit take profit target I increase the lot of the next trade by a pre-defined lot step.
I got it going, but sometimes the EA doesn't increase the lot size, it repeats the lot size for the next trade, but increase it in the following trade.
I'm a little bit furious because I can't find where is the issue.
I coded 2 functions, the 1st one to count the closed losses and the other function to calculate the lotsize based on the count of those closed trades.
Note: lot, lotstep and progressivelot are extern variables
is an instruction given to a broker to buy or sell a financial instrument. There are two main types of orders: Market and Pending. In addition, there are special Take Profit and Stop Loss levels. is the commercial exchange (buying or selling) of a financial security. Buying is executed at the demand price (Ask), and Sell is performed at the...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello,
English isn't my native language, but I'll try to get by..
I'm a little bit new to mql4, but have been trying to get everything going, I was testing an idea, then I needed to test a progressive lot size, my EA opens one trade at a time, so I wanted to check if the previous closed trades hit tp or not, if they hit take profit, then I start the next trade using 1 lot. If the closed trades didn't hit take profit target I increase the lot of the next trade by a pre-defined lot step.
I got it going, but sometimes the EA doesn't increase the lot size, it repeats the lot size for the next trade, but increase it in the following trade.
I'm a little bit furious because I can't find where is the issue.
I coded 2 functions, the 1st one to count the closed losses and the other function to calculate the lotsize based on the count of those closed trades.
Note: lot, lotstep and progressivelot are extern variables
Help would be much appreciated.
Thank you all!