Expert Advisors and Automated Trading - page 27

All, I'm sure there is a very simple answer to my question, but I ran out of ideas. I want to backtest a simple EA, just to learn MQL5 and test different EA strategies. I have an "input parameter" section which is shown (names and values) when I apply an EA to a chart. If I change an input parameter...
So I have a Class Object (TickMA) that aggregates tick data in proprietary fashion. The class object is instantiated and updated from my EA. Problem: I want to visually present data contained in the EA Class to an separate window indicator. Looking for a way to pass the pointer from the EA to the
Is there a built in fast function ? heres what i'm doing so far double array[]={ 1.1 , 2.2 , 3.3 , 4.4 , 5.5 }; double array2[]={ 6.6 , 7.7 , 8.8 , 9.9 , 0.0 }; matrix M; vector copier; M.Init( 5 , 2 ); copier.Assign(array); M.Col(copier, 0 ); copier.Assign(array2); M.Col(copier, 1
I want to access the last tick of the depth of market and want to know if it is a selling or buying order, but the way I am doing it doesn't have any information about this. I'm using the mt5.symbol_info_tick(symbol) in Python to access the last tick. Can anyone help me
  DDE server  (8)
In MT4. Tools>options>server Tick box to enable DDE server. In MT5. This is not there. Any suggestions? Am I missing something? I need the option to enable DDE server to link a program to it. Can anyone help? Thanks in advance. John.
I am not sure if i have done this right; Please check that I have done this correctly. I have written a bool function (for my ea) that checks (i hope) that it is NOT a friday. bool IsNotFriday() { MqlDateTime structTime; datetime time[]; CopyTime ( NULL , PERIOD_CURRENT , 0 , 3 ,time);
Hi . Does anyone know how can create object in second time frame in Strategy tester ? I searched everywhere, but I didn't find anything . For visual analysis I need to be create object in other time frames
Hello, I need some help. I have a question about the MT5 Cloud network for strategy tester optimisation. It's the first time I'm trying to use it. First I have topup my balance in MQL5 account of 10$. So I started the Optimisation. Optimisation has a total of 558 combinations/tasks. After I launched
  News Tab?  (3)
Hi, I was planing to Dev and integrate a News filter in my strategy EA.. I have a Demo account at *** with MT5, but I do not have the News TAB? Is it only prod accounts or not all brokers that offers News Tab in MT5? anyone that made a News filter for stop trading -5 min before and after important
Ladies and Gentleman, I have read a lot of threads here at Forex TSD and want to show sincere respect for all the programmers here who have done so much for the community and also thanx for the ppl who created this forum. Now I have a problem. I'm looking for an EA that closes pending orders after a...
Hi, I was this last three days sharing my computer. The first day the agents worked well (i think). I mean, i saw the CPU working and the RAM was allocated and then when the task finish the memory was free. However, yesterday and today it worked in a different way. In the morning the agents worked
//+------------------------------------------------------------------+ //| HelloMQL5.mq5 | //| TarikR | //| |
Hi guys! I would like to sell Indicators (and perhaps EA's) in the META MARKET and directly too (outside the MARKET). I'm reading about how to effectively protect an Indicator (or an EA) for EVALUATION PURPOSES (for the bought versions I can provide a good scheme based on the user account). I had
Hi guys I'm new to mql5 and I'm writing an expert. I make changes and compile the code with F7 or the button above the screen written "compile" but when I run strategy tester I get the error: " debug version of 'test.ex5', please recompile" it. Even when I close the program and debugger and open
Hi, When I retrieve tick data in the symbol manager there are some ticks which have a missing bid or ask value. Why is this? Many thanks
Hey people, I'm new to mql5 coding and I've been wondering, does PositionsTotal() detect all positions opened by all running EAs or just the positions opened by the EA it's running from? Thank you in advance :)
Hi, I am new to coding, could please help. I brought my code down to two errors and I can't seem to get this right. void OnTick () { // Ensure there is at least one bar of data if ( Bars <= inRSIPeriod || Bars == 0 ) // Corrected syntax without additional parentheses { Print (
Hello Everyone, Please I need help with a code function in my EA. The Array index works correctly but the Array Maximum gives error value. for ( int x = PositionsTotal (); x>= 0 ; x--) { ulong ticket = PositionGetTicket (x); if ( PositionSelectByTicket (ticket))
Hi, I have this EA, and I whant to make it only close trades that have any magic number. How can I do this? //+------------------------------------------------------------------+ //| Timer.mq5 | //|
I Have a PC with a AMD threadripper 3995wx with 64 cores and I want to share this cores with another computer. The thing is on Metatrader 5 Strategy Tester I can only share 32cores, I even tried to add the 64 with command line they appear on the Strategy tester but I can't start i tried to use more
Hello, I have a Python Bot that registers in the MetaEditor and that will not display on the Charts when I drag it or double click it. Any suggestions ? Thanks
Hello, I have a question. Recently I developed a EA that reacts to events that happened from my Windows Form application through a GUI Controller . Now I want to migrate from Windows Forms to MAUI application since windows forms UI is very limited and it doesn't accept cross-platform. Does someone
hi friends how i can calculate how many nights passed after an order opened
#include <Trade/Trade.mqh> CTrade trade; int rsiHandle; ulong posTicket; int handleSlowMA; int handleFastMA; int OnInit () { int rsiHandle = iRSI ( _Symbol , PERIOD_CURRENT , 6 , PRICE_CLOSE ); int handleSlowMA = iMA ( _Symbol , PERIOD_H1 , 200 , 0 , MODE_EMA , PRICE_CLOSE ); int
Hi, I want to delete file using ShellExecuteW like code below but failed to launch cmd to delete the file. Anyone knows the problem? #import "shell32.dll" int ShellExecuteW( int hwnd, string Operation, string File, string Parameters, string Directory, int ShowCmd); #import //
Hello there, I created an EA that catches spikes. I backtested and it worked fine. But it fails to catch those spikes during a real-time test. Instead, it opens the position after the market has spike
Hi I want to create EA to get news times. I get history with: CalendarValueHistory (newsHistory,startDate,endDate, NULL , "USD" )) and i get event info with: CalendarEventById (newsHistory[ 0 ].event_id, event); but event.name and time of news in history that i get is not match with calendar in
The example code at https://www.mql5.com/en/docs/standardlibrary/controls/cspinedit works fine for me (v.5.00 build 2302) but when I change the minimum, maximum, and current value parameters from 10, 100, and 50 to numbers with a decimal (e.g., 0.00001, 0.00010, and 0.00010, respectively), I get the
I did an expert, and optimized it severeal days on historical data, it looks good. so I decided to test it on real data but nothing happens after checking , it turned out that CopyBufer hangs when copying data from the iMA function where the period is set to over 100,000 but it only hangs on real
Hi All, I have an EA running on a VPS purchased through MT4 - the EA seems to run great when MT4 is closed on my computer, however, when I open MT4 on my computer to monitor/update/check things it is placing duplicate trades. Is there a fix to this? In reading through the journal, it looks like MT4