Forum

Multi-symbol EA - For loop gets ignored almost completely

Hello MQL5 forum I have a problem with my code. Hope someone can help. When I run it through the debugger, I can see that the only line that gets executed in the for loop is the first line. The EA then ignores 'if(PositionGetSymbol(i) == SymbolOne){' and the rest of the first loop. It's a similar

How to get a value back in EA when a Stop Order is Filled - MQL5

Hello Programmers I am in the middle of programming my own EA. I'm not very experienced, so was wondering if someone could help me out here. In my EA, I first declare a long breakout like this: int longBreakout = 0; When my Buy Stop Order gets filled I want the value of 1 to be assigned to the

Strategy tester confuses ETH with GBPUSD? Why? - MQL5

I'm currently backtesting a multiple symbol EA. It executes trades like it should, but all of the sudden it makes a mistake. It suddenly goes from position ticket 59 to 5856, which I find very strange. Ticket 5856 is ETH in the history tab, which is correct besides the sudden high ticket number. But

Globally declared variable keeps reverts to the value of zero on a multiple symbol EA

Hi I'm quite a newbie when it comes to programming EA's and programming in general. I have a situation where I have been coding an EA for multiple symbols, and my global variable keep on changing to zero after I have assigned the value of 1 to it. The globally declared variable that keeps resetting