Expert Advisors and Automated Trading - page 47

Good afternoon colleagues, I'm starting to think that I have some serious understanding problem, but I can't figure this out. It's a rectangle, and I want it to be built from the bottom left corner. This is the code: // ChartIdent is ChartID() ObjectCreate (ChartIdent, "BGRectangle"
Hello esteemed community, I have developed an Expert Advisor (EA) for MT4 which is designed to trade multiple symbols concurrently. I am interested in submitting my EA to the MQL5 Market, but I am aware that the standard strategy tester in MetaTrader 4 may not support multi-symbol backtesting, which
I have an error in the WebRequest section. Can anyone help me edit it // Define your Telegram bot token and chat ID input string BotToken = "YOUR_BOT_TOKEN" ; input string ChatID = "YOUR_CHAT_ID" ; //+------------------------------------------------------------------+ //| Expert initialization
I am trying to calculate iBandsOnArray for MQL5 but i am only able to get the middle line value in my expert my upper and lower line keep giving me wrong values i think the problem is from the standard deviation if i can get a standard deviation function that i can apply to the current bb mid value,...
Sorry for the simple question, I am very new to MQL5. I know how to create a generic array, but am now trying to create a list of undefined size, which values can be added to. Most of the literature I read seemed to go over my head
hi, i want to create an EA which has 3-5 profit targets for every trade in a hedging account . is the best way to achieve this is by placing 3-5 different trades and setting different TPs? Are there any other potentially more efficient ways to achieve this
Hi, I'm trying to make my first ea and I wanted to add to it that it would open a long opsition when a short one is closed and viceversa only thing is I can't seem to find a function that calls to the last closed position, I thought it would be one of the History, Position, or Order functions but I
Hi, I tried to calculate profit from long position and short position. When I print it I notice there's difference in profit between print statement and trade tab on strategy tester. Here's the screenshot on trade tab, and here's the print statement. CS 0 22 : 23 : 21.027 Averaging
Hi, I'm trying to create a function which returns the number of indicators in use at a given time. For now the code is showing no errors or warnings but the function always returns 0. Since both the final 2 parameters are set as true, the function should be returning 2. How can i resolve this issue
Hello everyone, I'm looking for a way to send a hotkey or simulate a keyboard shortcut from within my EA without using the Win32 DLL. I understand that using the Win32 DLL is a common approach, but I'm exploring alternative methods to achieve this functionality. Is there a non-Win32 DLL method or
I have looked everywhere but I cannot find an answer to this. When I am testing a bot and looking at the optimization results , in the result column the numbers are different colors. What does that mean/indicate
Hi, could someone help me? I'm trying to write a code to modify a position with up and down buttons. The button are correctly working but the attempt to modify the position ends in unknown retcode 0. Here's the code for ( int i = PositionsTotal () - 1 ; i >= 0 ; i--) // loop all Open Positions { if
The MetaTrader 5 Python package offers the order_send() function, analogous to MQL5's OrderSend() . This is a synchronous function; the caller has to wait for the MT5 server response before proceeding. When a trading strategy necessitates multiple orders at varying prices or symbols, using the
Hi I have this code to close position when reach a specific profit(0.50) e loss(-10) buy when i run strategy tester i get profits like 2,3,4 and losses like -23,-12 Can someone help me, double TargetLoss=- 10 ; double TargetProfit= 0.50 ; double profit= AccountInfoDouble ( ACCOUNT_EQUITY )-
Hello, I would like to ask for help with my Expert Advisor that runs only first time after compilation. Every other attempt to run EA fails with OnInit with runtime error code 5035 . For example: I make no change in my Expert Advisor mql5 file I compile EA mql5 file I run the Single test in Strategy
Hi, When I make more MT5 EA backtest with enabled ZigZag indicator filter with same settings on my EA panel, sometimes I get different backtest result. If I made a backtest with same EA settings on same data I must get same backtest result no matter how many times I do it. This is a serious problem
Hi Everyone, I'm facing a problem with my MT5. When I click on button to start an optimisation using a hedge demo account it simply doesn't start. My memory goes to 100%, and my HD working until get full, but the optimisation not start after 1 hour. I'm trying do this optimisation in a dual xeon
  error  (5)
hi there how can i fix this problem? i just write this code and mql5 tell me: '&&' - operand expected EMA1.mq5 55 86 if (High1>Open1>Close1>Low1 && High1-Open1<= 10 * Point && Close1-Low1<= 10 * Point && High1>High2 && Close1>Close2) { } Improperly formatted code edited by moderator
Hello, I developed an EA (account Netting ) which uses pending orders SellLimi t and BuyLimit instead of MT5 native TakeProfit . The reason for this was to avoid the slippage that occurs when using MT5's TP and SP, since they close market positions and not with book orders. EA Places Orders
Hi all, I'm testing an expert on D1 time frame in which I wrote the following condition to open pending orders request_type = ORDER_TIME_DAY I see that in some cases pending orders are not deleted at the end of the day. What could be the reason? Thank you
Im very new to using MQL5 and Expert Advisors. I have spent a while getting the basic code for a Triple Super trend advisor. At the point im at it buys and sells and closes the position. However, it is extremely slow in doing each action resulting in missing the trend. I really cant understand if it
If you have a good strategy and are willing to share it, I can write an advisor
Hello everyone, I am new, I would like your help with a problem: I am practicing writing a Martingale EA, I want orders to be opened by time instead of points/pips. For example, every 15 minutes an order will be opened, with a maximum of 3 orders. Please help me. Thank you. ( The code below is
Hello, I am runing an EA downloaded from internet on my demo account. Now I want to remove/change it's comments by any way. Is this possible
extern int AccountRow = 1 ; extern int DelayMinutes = 2 ; // AccountRow - Your favourites account number // DelayMinutes - Delay in minutes, has to be greater than the chart timeframe #include <WinUser32.mqh> #import "user32.dll" int GetParent( int hWnd); int GetDlgItem( int hDlg, int
Whenever I run it through the strategy tester , the trade always closes on the first candle after opening and then the simulation stops out. First time writing one of these, but any help would be much appreciated. Code is as follows #include <Trade/Trade.mqh> CTrade trade; int OnInit () { Print
Hi, I have a mq5 file importing a .Net DLL, that compiles in MetaEditor. When running it in MT5, it shows errors like this: 2022.02.05 17:49:58.337 MT5NetTest (Test2,M1) function 'MT5Net.SampleMT5::Get1DDouble' not found in 'E:\Apps\MT5\MQL5\Libraries\XMT5Net.dll' Is there a Visual Studio solution
Hi, This code is work on my PC : ZZHandle= iCustom ( NULL , zigzag_filter_timeframe, "Examples\\ZigZag" , Depth, Deviation, Backstep); ArraySetAsSeries (ZZValue, true ); but cant work on VHOST. 2023.09.21 01:48:21.506 NightGrid (XAUUSD,M15) cannot load custom indicator 'Examples\ZigZag' [4802] What
  error in MQ5 EA  (3)
I beg you friends. can somebody guide me on how to fix these 2 errors OnTick function declared with wrong type or/and parameters 0 0 '(' - expressions are not allowed on a global scope RSIvsADX.mq5 26 5 unexpected end of program 1 1
Hi, I'm experimenting with graphical objects (like dialog) and chart events, and I was wondering wether if there's a mapping of the candles for the click event coords or not, I mean, if my expert has a Cue Line to track candle operations (stored by candle time), am I able to move that Cue Line