EA's not working. Help please!

 

I have MT4 installed on my desktop.  EAs work on my DEMO account just fine on my DESKTOP.  I try to use it on a live account, and NOTHING happens. 

I install MT4 on my laptop.  EA's don't work at all on my laptop in DEMO or LIVE accounts. All the settings are the SAME as on the desktop. 

I NEVER have the same account active on two computers at the same time. 

I have a DIFFERENT DEMO account on the laptop than what I have on my desktop. 

I have looked thru all the SETTINGS to make sure some box checked or unchecked isn't stopping the EAs from trading. 

All the hardware is GOOD.  Windows 10 on both.  Fresh re-install of Win10 on laptop. 


In the experts tab, it says that the EA initialized.

and then either TP or SL "too tight."  30 or 60 or even 100??  2000?  Use tp/sl False = off?  False (default setting).  Changing it to TRUE doesn't help.

or...  "uninit reason 5"

HELP please!


Also, can someone explain WHEN to use the SAME magic number and when to a DIFFERENT magic number?? 

I'm not clear on that.  I give each chart a different magic number even if it's the same pair but different time frame and same EA.  I haven't found a good way to explain it that makes sense to me. 

Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
, then each symbol positions will be closed in the same order, in which they are opened, starting with the oldest one. In case of an attempt to close positions in a different order, the trader will receive an appropriate error. There are several types of accounts that can be opened on a trade server. The type of account on which an MQL5 program...
 
and then either TP or SL "too tight."  30 or 60 or even 100??  Use tp/sl False = off?  False (default setting).

You can find the error by adding GetLastError() function to know if what really is the case. Personally I never found error on TP but SL could be your broker set a minimum stop loss (and your stop loss isn't met the minimum), you can find it by asking your broker or use MarketInfo() function using MODE_STOPLEVEL.

or...  "uninit reason 5"

for the uninit reason 5 the error description would be "Old version of the client terminal". If this is the case I think you need to ask your broker about the error.

GetLastError - Checkup - MQL4 Reference
GetLastError - Checkup - MQL4 Reference
  • docs.mql4.com
GetLastError - Checkup - MQL4 Reference
 
I'm currently using the same broker for everything , Demo and Live, on both desktop and laptop. 
 
Now, it's doing this: (See pic)
Files:
MT4error1.jpg  8404 kb
 
Ben James: Also, can someone explain WHEN to use the SAME magic number and when to a DIFFERENT magic number??

MN allows EA to identify its trades. You need one, per symbol, per TF, per strategy.

If you also filter by symbol: one, per TF, per strategy. If you only run on the current chart's TF, then you're down to one per strategy.

Use of a range of numbers, the MN can tell you which TF and/or strategy.

Magic number only allows an EA to identify its trades from all others. Using OrdersTotal/OrdersHistoryTotal (MT4) or PositionsTotal (MT5), directly and/or no Magic number filtering on your OrderSelect / Position select loop means your code is incompatible with every EA (including itself on other charts and manual trading.)
          Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 programming forum
          PositionClose is not working - MQL5 programming forum
          MagicNumber: "Magic" Identifier of the Order - MQL4 Articles
          Orders, Positions and Deals in MetaTrader 5 - MQL5 Articles
 
Ben James :
Now, it's doing this: (See pic)

Please check,


Is there only one of the USDJPY pair in the market watch window of your platform? A second USDJPY could be with a suffix such as  '.' or an '.m'.

 
Ahmet Metin Yilmaz:

Please check,


Is there only one of the USDJPY pair in the market watch window of your platform? A second USDJPY could be with a suffix such as  '.' or an '.m'.

I don't understand how that would even be a possibility. I don't see a suffix such as  '.' or an '.m'.

From the symbol list on the left, I right click Add New Chart for each pair on all of them.  It's the ONLY way I know how to add pair charts. 

I have about 5 pairs and each of them have 2 to 4 timeframes each.  18 charts all together.

 
William Roeder:

MN allows EA to identify its trades. You need one, per symbol, per TF, per strategy.

If you also filter by symbol: one, per TF, per strategy. If you only run on the current chart's TF, then you're down to one per strategy.

Use of a range of numbers, the MN can tell you which TF and/or strategy.

That seems to be the way I'm doing it, so I guess I'm doing it right.  Let's say I'm using one EA on all charts. 

EURUSD, m1, MN=1

EURUSD, m5, MN=2

EURUSD, m15, MN=3

EURUSD, H1, MN=4

AUDUSD, m1, MN=5

and so on....

NOT MN=1 on all EURUSD and MN=2 on all AUDUSD. 

 
Ben James: That seems to be the way I'm doing it
Close. You don't need MN=5. MN=1 and OrderSymbol tell you all you need.
 

I may have found the solution to my problem.  I looked on the IG-USA / MT4 webpage and it says to only use .FX pairs.  So, I tried that, and things are working fine so far in Demo on my laptop. 

I didn't do THAT on my desktop, so I'm confused, but oh well. 

View > Symbols > C-Forex-US

Reason: