Forum

Having issues running same EA on two accounts in MT5

I have created an EA that I am doing some forward testing on. I have two sets of settings, let's call them 'A' and 'B'. I have on live account with the EA and settings 'A' running. Now when I login to my second = demo account and I put the same EA on the chart with settings 'B' it also changes the

Testing on "All Market Watch Symbols" stopped working somehow

I have a strange problem: I have created an EA that I would like to test on a few different pairs. I have tested this EA on severals pairs in the past (the All Market Watch Symbols option) and it always worked. Today I want to test it again on several symbols but the whole optimisation just doesn't

Expanding my EA to multiple currencies

I programmed a very neat EA that works well an a couple of pairs. Now instead of pulling it onto every chart I would like to have one EA run and handle multiple pairs at the same time. So far so good but there is one remaining issue that I have: In the documentation about getting values from

I get "tested with error 'critical runtime error 0 in OnInit function (error code 0 ..., line 1, col 1)' ... " when using MQL5 cloud agents

I am doing a big optimisation for one of my EAs. Turns out my local machine and local network agents won't cut it, so I opted into the MQL5 cloud network . Anytime I enable MQL5 cloud agents I get the above error. It's still deducting money from my MQL5 account though. What's up with that error? I

How to trigger event on TakeProfit

I am working on this problem for several weeks now and I just can't find a proper way to solve it. I am looking for help. I want the following to happen: 1) Place 2 orders, n and n+1. n has a TP & SL level, n+1 has only SL level. SL levels are the same for both orders. 2) If SL is hit, fine. Both

Is it possible to set the position_id?

I am using ctrade for my programming right now but as I want to expand my capabilites / possibilities, I am wondering if it is possible to set the position_id of an order? In the MqlTradeRequest struct there is the MqlTradeRequest.position member - is this there, so that my EA could set the

First Order Ticket is always "2"

Why is it that any first order I open always has ticket number "2"? I open my orders with this (relevant) code: #include <Trade\Trade.mqh> CTrade trade; void onTick(){ trade.Sell(lotsize, Pair1, BidPair1, ShortSL, ShortTP, "1S" ); trade.Buy(lotsize, Pair1, AskPair1, LongSL, LongtTP

EA testing over multiple currencies forces me to do optimisation?

Hello! I recently switched to MT5/MQL5 in order to be able to easily test my EA over multiple currency pairs. I have ported my code and everything works great but I am having a really mundane problem now: I just don't seem to be able to actually get the Tester to test over multiple currencies