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

작업 종료됨

실행 시간 20 초
고객의 피드백
Great guy. Thanks a lot man
피고용인의 피드백
Thanks for the fair business.

명시

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!!!


응답함

1
개발자 1
등급
(76)
프로젝트
94
34%
중재
9
78% / 0%
기한 초과
0
작업중
2
개발자 2
등급
(172)
프로젝트
221
57%
중재
7
29% / 29%
기한 초과
7
3%
작업중
3
개발자 3
등급
(8)
프로젝트
12
8%
중재
1
0% / 100%
기한 초과
0
무료
4
개발자 4
등급
(8)
프로젝트
11
18%
중재
6
50% / 17%
기한 초과
1
9%
작업중
5
개발자 5
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
6
개발자 6
등급
(2)
프로젝트
3
0%
중재
0
기한 초과
0
무료
7
개발자 7
등급
(186)
프로젝트
191
27%
중재
0
기한 초과
3
2%
무료
8
개발자 8
등급
(52)
프로젝트
96
24%
중재
9
22% / 22%
기한 초과
12
13%
작업중
9
개발자 9
등급
(66)
프로젝트
143
34%
중재
11
9% / 55%
기한 초과
26
18%
작업중
비슷한 주문
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
Hello guys, Iam an investor in an account that runs Arbitrage EA on one broker and it works just fantastic.. The guy who runs the EA obviously doesnt want to sell the EA because he profits from that. I would like to find someone that can develop me one Arbitrage (HFT) EA that works perfect on MT5 and trades XAUUSD (gold) specifically. If you would like and can help me i would appriciate it! Best regards

프로젝트 정보

예산
30+ USD
개발자에게
27 USD