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](https://c.mql5.com/36/37/getlasterror-checkup-mql4-reference.png)
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.
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
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'.
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.
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.
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
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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.