Forum

MQL5 Multi-Symbol EA - Does it trade every tick on every symbol?

I have coded multi-symbol functionality into my EA. I am wondering, will it run through every tick for each symbol being traded or only the symbol of the chart that the EA is added to

Multi-Symbol EA - How do I open only one trade at a time?

Hey all, I have written the following code to check if there is an open order with a matching symbol and magic number within my multi-symbol EA, but it does not prevent multiple orders from opening. The OpenTradeOrderTicket is a global array that is meant to store a 1 or 0 depending on whether there

Thinking like a programmer

Hi all, I've been hitting some roadblocks in my MQL4 programming , I understand how to code which we all know is the easy part... but I'm struggling to approach coding in the right way, what I mean by this is, how do I combine all the functions and variables in the right order to achieve what I

Why isn't this working...

How is it possible that the alert "total trades" is returning '3', but "have we had two trades?" is returning 'false'. This makes no sense... my head hurts. Please help. bool haveWeHadTwoTrades; int totalTrades = 0 ; for ( int i = OrdersHistoryTotal()- 1 ; i >= 0 ; i--) { if (

Trade not closing when candle flips - error 4108 & 4051

I'm fairly certain this is a ticket selection issue but I can't quite work out where I'm going wrong or how to fix it. Basically, if my entry indicator changes direction it should close the open trade, it's not currently doing that... it just keeps it open and I get error 4108 or 4051 in the