![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Here is a description of the execution errors and recommendations on how to handle them. The general recommendation for errors 2, 64, 65 and 133 is to stop all trading attempts. To implement this recommendation, I use global EA variable gbDisabled, which I define in the header (i.e., before all functions start) as follows:
I check the state of this variable in the start() function:
Here is a description of the execution errors and recommendations on how to handle them. The general recommendation for errors 2, 64, 65 and 133 is to stop all trading attempts. To implement this recommendation, I use global EA variable gbDisabled, which I define in the header (i.e., before all functions start) as follows:
I check the state of this variable in the start() function:
Good day, Igor! In function: void TrailingPositions(string sy="", int op=-1, int mn=-1) control is passed to function ModifyOrder(sy, -1, pp+TrailingStopSell*p, 0, clModifySell) while the function ModifyOrder itself has 4 parameters, what is it related to?
It's probably because you pulled the TrailingPositions function from somewhere. Maybe from one of my old EAs. Those functions that I have published did not become like that right away. They have evolved.
Please provide me the link to the TrailingPositions function. It is not in my list of published ones. I published SimpleTrailing().
Hi, do you happen to have a function that allows you to set take and stop levels in external variables when setting an order?
For example:
extern double sl = 0; // SL для открываемого ордера
extern double tp = 0; // ТР для открываемого ордера
SetOrder("", OP_BUY, ll, Ask, SL(), TP(), 0, 0);
{условие}
SetOrder("", OP_SELL, ll, Bid, SL(), TP(), 0, 0);
{условие}
SetOrder("", OP_BUYSTOP, ll, Ask, SL(), TP(), 0, 0);
{условие}
SetOrder("", OP_SELLSTOP, ll, Bid, SL(), TP(), 0, 0);
{условие}
SetOrder("", OP_BUYLIMIT, ll, Ask, SL(), TP(), 0, 0);{условие}
SetOrder("", OP_SELLLIMIT, ll, Bid, SL(), TP(), 0, 0);
{условие}
Hi!
For some reason, when I plug in your library, the extern operator stops working, i.e. the variables are defined, everything compiles normally, and in principle the EA works, but at the same time the EA has no parameters when starting the type, even though there are quite a few parameters. What may be the reason for this?