Test Report Errors (Invalid Stops) on Expert Advisor upload for MQL5 : NEED HELP WITH CORRECTING ERROR CODE

İş tamamlandı

Tamamlanma süresi: 20 saniye
Müşteri tarafından geri bildirim
Great guy. Thanks a lot man
Geliştirici tarafından geri bildirim
Thanks for the fair business.

İş Gereklilikleri

Hi All,


I am in the process of uploading an expert advisor to the MQL5 Market place.


However, it comes up with this error code below during the Test Report:

ERROR CODE FROM TEST REPORT:

test on EURUSD,H1 (netting strategy tester report 104 total trades test on XAUUSD,D1 (netting) 2021.02.17 01:05:00 failed instant sell 1 XAUUSD at 1792.65 sl: 1792.95 tp: 1792.15 [Invalid stops] 2021.03.30 01:05:00 failed instant sell 1 XAUUSD at 1712.68 sl: 1712.98 tp: 1712.18 [Invalid stops] 2021.05.03 01:05:00 failed instant sell 1 XAUUSD at 1766.81 sl: 1767.11 tp: 1766.31 [Invalid stops] 2021.07.22 01:05:00 failed instant sell 1 XAUUSD at 1803.83 sl: 1804.13 tp: 1803.33 [Invalid stops] 2021.08.06 01:05:00 failed instant sell 1 XAUUSD at 1804.65 sl: 1804.95 tp: 1804.15 [Invalid stops] there are no trading operations

SECTIONS OF MY SCRIPT WHICH MAY BE CAUSING ISSUES:

void Trailing(string symb){ int TrailingStep = 0; double sl = 0; if ( PositionsTotal() > 0 ) { for (int i = PositionsTotal() - 1 ; i >= 0 ; i--) { if (!o_position.SelectByIndex(i)) {break;} if (o_position.Magic() == MagicNumber ) { if (o_position.PositionType() == POSITION_TYPE_BUY){ double price = SymbolInfoDouble(symb,SYMBOL_BID); if (price - o_position.PriceOpen() <= 0) {continue;} if(price-o_position.PriceOpen()>=TrailingStart*point) { if(o_position.StopLoss()<price-TrailingStop*point-TrailingStep*point || (o_position.StopLoss() < o_position.PriceOpen() && o_position.StopLoss()<price-TrailingStop*point)) { o_trade.PositionModify(o_position.Ticket(),price-TrailingStop*point,o_position.TakeProfit()); } } } else if (o_position.PositionType() == POSITION_TYPE_SELL){ double price = SymbolInfoDouble(symb,SYMBOL_ASK); if (price - o_position.PriceOpen() >= 0) {continue;} if((o_position.PriceOpen()-price)>TrailingStart*point) { if((o_position.StopLoss()>price+TrailingStop*point+TrailingStep*point) || (o_position.StopLoss()==0) || (o_position.StopLoss()>o_position.PriceOpen() && o_position.StopLoss()>price+TrailingStop*point)) { o_trade.PositionModify(o_position.Ticket(),price+TrailingStop*point,o_position.TakeProfit()); } } } } } } } double getLot(int _points){ string _symbol = _Symbol; double _risk_percent = LotSize; if (LotType == FIXED){return LotSize;} double minlot = SymbolInfoDouble(_symbol,SYMBOL_VOLUME_MIN); double maxlot = SymbolInfoDouble(_symbol,SYMBOL_VOLUME_MAX); double steplot = SymbolInfoDouble(_symbol, SYMBOL_VOLUME_STEP); double money_risk = NormalizeDouble(AccountInfoDouble(ACCOUNT_EQUITY)*_risk_percent/100,2); double calc_point_cost = NormalizeDouble(money_risk/_points,2); double lot_point_cost=SymbolInfoDouble(_symbol, SYMBOL_TRADE_TICK_VALUE_LOSS); while(!MathIsValidNumber(lot_point_cost) || lot_point_cost==0){ lot_point_cost=SymbolInfoDouble(_symbol, SYMBOL_TRADE_TICK_VALUE_LOSS); } double lot = calc_point_cost/lot_point_cost; if (lot<=minlot) {lot = minlot;} else if (lot>maxlot) {lot=maxlot;} else if (lot>minlot && lot<maxlot){ int k = int ((lot-minlot)/steplot); lot = NormalizeDouble(minlot+k*steplot,2); } return (lot); } int getNumberOfTrades(string symb){ int count = 0; if ( PositionsTotal() > 0 ) { for (int i = PositionsTotal() - 1 ; i >= 0 ; i--) { if (!o_position.SelectByIndex(i)) {break;} if (o_position.Magic() == MagicNumber && o_position.Symbol() == symb) { count++; } } } return(count); } void CloseReversal(ENUM_POSITION_TYPE type) { if ( PositionsTotal() > 0 ) { for (int i = PositionsTotal() - 1 ; i >= 0 ; i--) { if (!o_position.SelectByIndex(i)) {break;} if (o_position.Magic() == MagicNumber && o_position.Symbol() == _Symbol && type == o_position.PositionType()) { o_trade.PositionClose(o_position.Ticket()); } } } } double NormalizeLots(double Lots){ string symb = _Symbol; double minlot = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN); double maxlot = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX); double steplot = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_STEP); double lots = MathFloor(Lots / steplot) * steplot; if (lots < minlot){return minlot;} if (lots > maxlot){return maxlot;} return lots; } //+------------------------------------------------------------------+ //| Check for close position conditions | //+------------------------------------------------------------------+ bool IsFillingTypeAllowed(string symbol, int filll_type) { int filling = (int)SymbolInfoInteger(symbol, SYMBOL_FILLING_MODE); return ((filling && filll_type) == filll_type); } //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit(void) { if (!o_symbol.Name(Symbol())) return(INIT_FAILED); // sets symbol name o_trade.SetExpertMagicNumber(MagicNumber); if (IsFillingTypeAllowed(o_symbol.Name(),SYMBOL_FILLING_FOK)) { o_trade.SetTypeFilling(ORDER_FILLING_FOK); } else if (IsFillingTypeAllowed(o_symbol.Name(),SYMBOL_FILLING_IOC)){ o_trade.SetTypeFilling(SYMBOL_FILLING_IOC); } else { o_trade.SetTypeFilling(ORDER_FILLING_RETURN); } o_trade.SetDeviationInPoints(Slippage);


Can someone help me with these error as I am new to coding.PLEASE NO TIME WASTERS, ONLY EXPERIENCED CODERS!!!


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(76)
Projeler
94
34%
Arabuluculuk
9
78% / 0%
Süresi dolmuş
0
Çalışıyor
2
Geliştirici 2
Derecelendirme
(172)
Projeler
221
57%
Arabuluculuk
7
29% / 29%
Süresi dolmuş
7
3%
Çalışıyor
3
Geliştirici 3
Derecelendirme
(8)
Projeler
12
8%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Ücretsiz
4
Geliştirici 4
Derecelendirme
(8)
Projeler
11
18%
Arabuluculuk
6
50% / 17%
Süresi dolmuş
1
9%
Çalışıyor
5
Geliştirici 5
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Ücretsiz
6
Geliştirici 6
Derecelendirme
(2)
Projeler
3
0%
Arabuluculuk
0
Süresi dolmuş
0
Ücretsiz
7
Geliştirici 7
Derecelendirme
(186)
Projeler
191
27%
Arabuluculuk
0
Süresi dolmuş
3
2%
Ücretsiz
8
Geliştirici 8
Derecelendirme
(52)
Projeler
96
24%
Arabuluculuk
9
22% / 22%
Süresi dolmuş
12
13%
Çalışıyor
9
Geliştirici 9
Derecelendirme
(66)
Projeler
143
34%
Arabuluculuk
11
9% / 55%
Süresi dolmuş
26
18%
Çalışıyor
Benzer siparişler
Looking to have made a HFT/EA for live cash account's for indices, metals and forex for MT5 3 separate EA’s. Must not have any losses. ( I have a few MT4 HFTs that just take profit no losses) so I need to have the same with this new MT5 HFT. (If you need a copy to see how it operates let me know) Please only reply if you can program this HFT I request or have one like I requested. All business and messages will be
Hey, im looking for a person who can create an my very own version of pineconnector, which should have all the option of pineconnector and it should be user-friendly without any complications
HI, I'm looking for an experienced person who can add buy/sell indications and Alerts on existing Pinescript along with little modification of the script and the script should connect to MT5 platform using pineconnector MT5 platform should excute trade instantly as based on the alerts/indications on tradingview script
We are seeking a highly experienced Forex EA Developer for our MT4 platform. The ideal candidate must meet our following criteria: Language Proficiency: Must speak English fluently - no exceptions Must write in English proficiently - no exceptions Must understand English clearly - no exceptions Availability: Must work in the Eastern Standard Time (EST) zone Developer must be available full-time for this project with
hello... saya menginginkan EA GRID?AVERAGING dengan kondisi : > bisa meletakan sell&buy Limit pada nilai tertentu > bisa meletakkan sell&buy stop pada nilai tertentu > bisa melakukan order sell/buy limit/stop (sesuai setting) berdasarkan Nilai RSI > bisa membatasi jumlah order > ada fungsi TP dan SL > rangkuman hasil kerja EA selama mingguan terimakasih, semoga bisa bekerjasama dengan baik
I already have the EA completed. I just need to add 2 params and fix the feature (GV) to make sure that no order is missed for any reason. Maybe GV is not enough and need to add another feature
Need to create ea to trade in indian market by placing orders to Indian market platform through API form mqlHere's a basic outline of what script should include: Define Heikin Ashi candle pattern: Convert regular candles to Heikin Ashi candles. Order Execution: Execute orders on the open of the second candle after the signal is generated. Buy Call: When a buy call is generated, initiate a call option order. Set
I want the trade to trigger anytime it sees the opportunity on all time frames, sl tp should be automated and all trades should be trigger anytime on cpi news and etc
Добрый день. Мне нужно создать сигнального бота. У меня есть индикатор на Trading View, который выделяет точку интереса - спрос/предложение. (но я в нем не уверен, подойдет ли он для робота, возможно такой индикатор нужно будет написать). Нужно чтоб все зоны были экстримальные, то есть, если произойдет пробитие зоны то менялся тренд. Как я торгую? Индикатор выделяет зону. Мне нужно увидеть подтверждение в пределах
I need someone to help me convert my tradingview pinescript to mt4, I only got $20 for this and I am gonna be giving you more works ahead, Also I will be paying with cryptocurrency cause my PayPal os not working here, Don't know why

Proje bilgisi

Bütçe
30+ USD
Geliştirici için
27 USD