Hello there! :)
At start ill say that im beginner writing EA's but im trying my best to improve each day.
I have just managed to put all function together, at least what i thought, no error, compiling no problem. But when i put it into test, indicators load, but it doesnt take a trade, if anybody could help me figure out what is the problem, i would really appreciate help. And no Im not using chatgpt or any AI to create code, functions. If i would I would have no freacking clue whats what here. okay. Here is the Ea..
I think that the issue is in, for example:
switch(Lot_Type){ case 0: lotSize = Fixed; break; case 1: lotSize = RiskPercent; if(RiskPercent > 0 ) lotSize = calcLots(ask-sl); } trade.Buy(lotSize, symbol, ask, sl, tp, NULL);
"The case keyword with a constant are just labels, and if operators are executed for some case variant, the program will further execute the operators of all subsequent variants until the break operator occurs."
Try adding break in case 1.

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello there! :)
At start ill say that im beginner writing EA's but im trying my best to improve each day.
I have just managed to put all function together, at least what i thought, no error, compiling no problem. But when i put it into test, indicators load, but it doesnt take a trade, if anybody could help me figure out what is the problem, i would really appreciate help. And no Im not using chatgpt or any AI to create code, functions. If i would I would have no freacking clue whats what here. okay. Here is the Ea..