Hello . I saw a curious Expert Advisor MA.mq5on your site. Frankly speaking, I was attracted by the simplicity of calculations, the presence of stoploss and take profit, the simplicity of settings and small file size. The fact that it is free of charge also played an important role in my choice. I don't know how to program, but I was pleased with the abundance of Russian-language comments for almost every line of code.
I immediately downloaded this miracle and decided to test it on MetaTrader 5 on EURUSD. But here I was somewhat disappointed:
1 ) the Expert Advisor dashingly drained the deposit of 10000 USD in less than a week of historical time, and it did it on all timeframes - M1, M5, M15, H1;
2 ) the declared stoploss was present in the line, but was not present on the chart and was not executed, even if the profit reached the value of 1000 USD;
3 ) Take Profit behaved the same way: it was honestly written in the line, but was absent on the chart and, accordingly, was not executed.
Obviously , it is not customary to look a gift horse in the mouth, but nevertheless, in this regard, I have a number of questions, which I address to you:
1 ) this programme was tested at your firm before it was made public or not;
2 ) whether your firm does not undermine its credibility by posting non-working versions of programmes (I somehow think that this case is not the only one);
3 ) is it possible to hope that a free working version of this program or its functional analogue will appear on the distribution?
I apologise for the trouble and hope for long-term cooperation, especially since your company is a monopolist of MetaTrader 5software .
Hello . I saw a curious Expert Advisor MA.mq5on your site. Frankly speaking, I was attracted by the simplicity of calculations, the presence of stoploss and take profit, the simplicity of settings and small file size. The fact that it is free of charge also played an important role in my choice. I don't know how to program, but I was glad to see the abundance of Russian-language comments for almost every line of code.
I immediately downloaded this miracle and decided to test it on MetaTrader 5 on EURUSD. But here I was somewhat disappointed:
1 ) the Expert Advisor dashingly drained the deposit of 10000 USD in less than a week of historical time, and it did it on all timeframes - M1, M5, M15, H1;
2 ) the declared stoploss was present in the line, but it was not present on the chart and was not executed, even if the profit reached the value of 1000 USD;
3 ) Take Profit behaved the same way: it was honestly written in the line, but was absent on the chart and, accordingly, was not executed.
It is clear that it is not customary to look a gift horse in the mouth, but nevertheless, in this connection I have a number of questions, which I address to you:
1 ) this programme was tested at your company before it was made public or not;
2 ) whether your firm does not undermine its authority by posting non-working versions of programmes (I somehow think that this case is not the only one);
3 ) can we hope that a free working version of this program or its functional analogue will appear on the distribution?
I apologise for the trouble and hope for long-term cooperation, especially since your company is a monopolist of MetaTrader 5software .
1. How many decimal places do you have in your quotes? 4 or 5 ? I see that the stated take and stops are for five-digit quotes. If you have four-digit quotes, reduce the stated take and stop sizes tenfold.
2. You describe your profit in the currency of your deposit (1000 usd), and the sizes of stop orders are stated in pips. It is not necessarily that the 1000 usd profit will be larger in pips than the take profit in pips - it all depends on the lot.
andreewwleonid:
//--- to work with brokers using 5-digit quotes, //--- multiply SL and TP values by 10 STP = StopLoss; TKP = TakeProfit; if(_Digits==5 || _Digits==3) { STP = STP*10; TKP = TKP*10; }
Based on this code section, we can assume that the owl is designed for both 5-digit brokers and 4-digit brokers. Moreover, TP and SL are set in values for 4-digit brokers and are recalculated if necessary.
In general, of course, we can only advise andreewwleonid not to download everything and not to launch indiscriminately the first thing that came to hand.....
Why are you guys buying into this? It would be understandable if the author came out to tear his shirt on his chest: "Who dares to smear a work of my art?!". Moreover, a good Expert Advisor can trade on different pairs with quotes of the same order and different timeframes. But with different profitability and individual settings for each pair. Am I wrong?
So, once again, everything in order.
1) The Expert Advisor was put for testing on EURUSD pair with a deposit of 10000 USD and history with 4 digits.
2) The settings were taken sewn into the programme:
//--- input parameters
input int StopLoss=100;
input int TakeProfit=100;
input int MA_Period=57;
input int MA_Period1=3;
input int EA_Magic=12345;
input double Lot=1.0;
3) The test was conducted on several timeframes (M1, M5, M15, H1). It is clear that hardly anyone trades on the minute, but nevertheless....
4) Stoploss was not indicated on the chart and was not executed.
5) Take Profit was not indicated on the chart and was not executed.
6) The deposit was drained on average in a week of historical time.
By the way, the instruction, which I, according to I Logic, supposedly did not study, does contain parameters for USDJPY,
but they are radically different from the programme ones.
I am not a programmer, but I can read programmes. I praise computer science lessons at school, where they introduced me to Basic. I am parsing the text.
//--- to work with brokers using 5-digit quotes,
//--- multiply SL and TP values by 10.
STP = StopLoss;
TKP = TakeProfit;
if(_Digits==5 || _Digits==3)
{
STP = STP*10;
TKP = TKP*10;
}
return(0);
In micle's fair opinion, this fragment allows the programme to work quite safely on both 4 and 5 digit quotes.
This fragment calculates sl and tp in a buy order:
mrequest.action = TRADE_ACTION_DEAL;// immediate execution
mrequest.price = NormalizeDouble(latest_price.ask,_Digits); // latest ask price
mrequest.sl = NormaliseDouble(latest_price.ask - STP*_Point,_Digits); // Stop Loss
mrequest.tp = NormalizeDouble(latest_price.ask + TKP*_Point,_Digits); // Take Profit
mrequest.symbol = _Symbol;// symbol
mrequest.volume = Lot;// number of lots for trading
mrequest.magic = EA_Magic;// Magic Number
mrequest.type = ORDER_TYPE_BUY;// buy order
mrequest.type_filling = ORDER_FILLING_FOK;// order execution type - all or nothing
mrequest.deviation=100;// slippage from the current price
This fragment calculates sl and tp in a sell order:
mrequest.action = TRADE_ACTION_DEAL;// immediate execution
mrequest.price = NormalizeDouble(latest_price.bid,_Digits); // latest Bid price
mrequest.sl = NormaliseDouble(latest_price.bid + STP*_Point,_Digits); // Stop Loss
mrequest.tp = NormalizeDouble(latest_price.bid - TKP*_Point,_Digits); // Take Profit
mrequest.symbol = _Symbol;// symbol
mrequest.volume = Lot;// number of lots for trading
mrequest.magic = EA_Magic;// Magic Number
mrequest.type= ORDER_TYPE_SELL;// sell order
mrequest.type_filling = ORDER_FILLING_FOK;// order execution type - all or nothing
mrequest.deviation=100;// slippage from the current price
At least that's what it says in the comments.
But, literates, please show me the number of the line where STP, sl and TKP, tp are compared with the current quote (or bar closing quote) and a choice is made - to close the position with a loss (profit) of 100 pips or to keep it further. I didn't see that. I saw that the opening and closing of a position is determined by MA ratios and the size of the deposit balance, but not by the presence of stop loss and take profit.
Now there is a legitimate question: "Who is holding me for a sucker - the author of a non-working programme or the site owners offering visitors a non-working programme?".
And also, micle, I thank you for your advice not to download everything and not to run indiscriminately the first thing that comes to hand. There is a good English proverb: "To know the flavour of a pudding you have to eat it". I tried this pudding and got indigestion. But the problem is that I am not a programmer and have not yet studied 4300 pages of the MQL5 manual, so I just have to use and study other people's programmes. And it is very frustrating when instead of a normally functioning product you get an outright ... .
I understand that no sane trader will not post for public access an Expert Advisor that implements a trading strategy that feeds him. And not because he is so greedy, but simply if a significant number of people will trade in a uniform way, the market will immediately change its properties, and the strategy will either become less profitable, or even begin to bring losses. Then he will have to start all over again. But it is ridiculous to consider this Expert Advisor as the implementation of a profitable trading strategy. Don't you agree? It is rather just a variant of a training example on the topic "How to build and configure a simple working Expert Advisor", unfortunately made by an underachiever.
But, literates, please show me the number of the line where STP, sl and TKP, tp are compared to the current quote (or bar close quote) and a choice is made - to close the position with a loss (profit) of 100 pips or to keep it further. I did not see this.
SL and TP values are specified in these lines:
mrequest.sl = NormalizeDouble(latest_price.ask - STP*_Point,_Digits); // Stop Loss mrequest.tp = NormalizeDouble(latest_price.ask + TKP*_Point,_Digits); // Take Profit
The order is then sent to the broker:
OrderSend(mrequest,mresult);SL and TP are executed on the broker's side, so the programme doesn't need to"sl and tp to compare with the current quote".
-----------------------------Probably the Expert Advisor is not working correctly because your account is Market Execution and the Expert Advisor is written for Instant Execution.
Hello honourable sir nasdaq. It is nice to get expert advice. I understand about the orders. So, the author did not draw these two lines in order not to load the programme and the chart. Good. But I ran the programme on Strategy Tester Visualisation, or in Russian on Strategy Tester MT5. Please, if it is not difficult, tell me in which mode this utility tests Expert Advisors: Market Execution or Instant Execution and whether it is possible to change this setting.
in which mode this utility tests Expert Advisors: Market Execution or Instant Execution and whether this setting can be changed.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use

MA:
A very simple EA based on the crossover of two Moving Average.
Author: Игорь Чугай