Expert Advisors and Automated Trading - page 20

Hi everybody, I need small help, i have written a EA and back tested , want to test it in Live. Is there anyway to do that, don't want to do auto trade. I want to run EA with latest current data. is it possible in MT5? Every time i run, it gives data until 1 night before. Thanks and
Hello Community, i just figuring out, what expert in the market is might really suitable for me. So far, could not get the demo installation to create a single trade. Instead i get various errors, like 2024.01 . 16 17 : 34 : 12.377 Core 01 2021.08 . 01 00 : 00 : 18 CTrade:: OrderSend : market buy
hello everyone how can i find the date of previous year and use it as an anchor point
I AM NEW TO VPS. I RECENTLY BOUGHT MY FIRST VPS. THIS MORNING MY EA SOLD EURUSD AT PRICE 1.06061. TRAILING STOP WAS SET 5 POINTS IN THE EA. EVEN THOUGH PRICE WENT DOWN 2 PIPS, THE TRAILING STOP WASN'T INITIATED. DURING THIS TIME THE PRICE WAS EXTREMELY VOLATILE AND MOVED LIGHTING FAST. MY QUESTION
I use the code, got the profits = 0. Please help me correct it. thank you. #property script_show_inputs input string com= "break" ; //+------------------------------------------------------------------+ //| Script program start function |
pip install MetaTrader5 ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none) ERROR: No matching distribution found for MetaTrader5 anyone knows how to deal with this
i want to create an expert that use dark bands indicator? but it is complicated. can any body helps? first problem is icustom function.when i use iCustom ( _Symbol , PERIOD_CURRENT , "Dark Bands MT5" ) it works but i need complete dark bands variable in icustom. because i want to change the
Hello, where can I download the library from #include <TradeConstants.mqh>,because it's not present in my include. Unfortunately, I can't find out where to find it. Please help
For mt5, I uploaded an ex5 file to the mql5 market several days ago and the validation was complete. But the process was terminated when I was busy. But when I try to upload the same file again the next day, it shows"Please recompile your file with new compiler", but the two files are exactly the
Hi all, I'm using the function PositionsTotal() to get the number of open positions, due to I'm using a hedge system. int num_positions=PositionsTotal(); but at each iteration it returns always 0, even if I opened two positions. What's wrong? Thanks
gidday. I have my ea that I normally only trade 1 or 2 pairs, BUT I want to use it on more pairs now. This function which determines its trail stop and stop loss depending on a bool; true or false function like so... bool margo() { if (equ< 0.85 *bal) return false ; if
I working with mql for a while and made some indicators and EAs. I notice that human made operations (press buy/sell button) are faster than EA operations (less delay between the action and the response). I always thought that it was only a mind trick, but I talked with a guy that work in a broker
Hi, I have an ideal that I can get lot size by amount of money at risk. But MQL5 doesn't have a default function to do that. So I create a function like: double GetLot( ENUM_ORDER_TYPE type, double SL, double openPrice, double moneyAmount) { if (moneyAmount == 0 || SL == 0 || openPrice == 0 )
I put an indicator on the chart and created a sub-chart and drag drop moving average on the sub-chart. I want to code a signal when moving average crossing the indicator then open or close the trade. The problem is that the moving average value difference is large (like photo attached) so that I
  MQL5 structure  (2)
I've made the overall code much simpler by avoiding candlestick type recognition, SLs etc but problem remains the same. How do I avoid the print statement from repeating itself ? //+-------------------------------------------------------------------------------------------------------+ //| Global
Hi, On MT5 when an EA is loaded and on inputs panel there are 4 options for the Filing of Orders (i have listed them below) But can someone please explain the difference between all 4? there is 1 - Order_Filling_FOK 2 - Order_Filling_IOC 3 - Order_Filling_Return 4 - Order_Filling_BOC Many thanks
Hello, Been researching and stuffing around for days, is there a method to consolidate multiple backtest reports into one? I've tried [name redacted] which sort of works but the report it generates is vastly different to that what MT5 produces, besides it doesn't report equity drawdown which is
Good morning I looked at a lot of code on this subject Codes in codebase, in this forum, and in the official doc https://www.mql5.com/en/docs/series/timeseries_access In the comments of this code we can read for the checkloadhistory() function //--- force timeseries build with copytime() //--- ask
Subject: Need Help – Experiencing Issues with MetaTrader 5 Account Switching Hello everyone, I hope this message finds you well. I'm currently facing an issue with my MetaTrader 5 setup, specifically with the account switching functionality. Despite my efforts, I'm unable to switch between
I am trying to upload an expert to the market, but I get an error code whenever it tries to validate: tester stopped because OnInit returns non-zero code 1 int OnInit () { if (!m_symbol.Name( Symbol ())) return ( INIT_FAILED ); RefreshRates(); m_trade.SetExpertMagicNumber(m_magic);
Hi! I've been struggling with an assignment for a while now. What if you don't want to use oncalculate function and indicators but build EA without using indicators. how can indexed time series as systematically rereadable arrays be created in this case ? I know that some pre-defined functions such
Hi, I can't seem to get this code to work. I want to know drawdown (ideally including swap+commission but I can live without those if needed) created by all running trades for a magic number. Here is the code I'm using (the EA is bigger but I think that these are the relevant lines): #include
Hi everyone, I've a question. In this days I tried to code an EA that detect the sessions and highlight it with a rectangle, after that opens a position when a session go over the previous. I used time structures to convert an integer number in a time and when time current is between a starting and
Hi, I am sitting with Youtube and trying to learn MQL5,, The video I am seeing are beeing done in MT4 and I am useing MT5. In my MT5 I do not have the Experts tab down in the bottom beside Journal?? So where do I see output from print in MT5? or is Print not used in MT5? I can use Comment, but then
I'm curious to ask whether the historical data used for testing on MT5 provided by the broker is supplied by MetaQuotes or by the broker themselves. If it is provided by the broker , why can't MT5 cloud use custom symbol data for calculations? however, what data is using when we using MT5 cloud
Has anyone encountered this ERROR before? I keep receiving this ERROR ALERT while optimizing, but eventually, the entire optimization process completes successfully. Do I need to fix this ERROR? Does it affect the optimization results? I attached my source code and hope someone can tell me why and
Hello, I have a function using the iATR method. My function is being called once per bar onTick(); I noticed when backtesting that my RAM gets filled up within a few seconds and my Windows freezes. If I comment-out the last line (IndicatorRelease) then the problem resolves. Why is that? int
Hi, i'm in desperate need of help. I have been trying to load string data from CSV into a string Array in different ways, void LoadStringsFromCsv( string filename, string &stringArray[]) { int handle = FileOpen (filename, FILE_READ | FILE_CSV | FILE_ANSI ); if (handle == INVALID_HANDLE ) {
Hello everyone: I have a question about strategy testing! I'm not sure I have the right idea on how to use strategy testing on MT5. I need an interface that lets me use all my EA's, indicators and scripts in MT5 and which allows me to test my *manual* strategy. It seems when I use the strategy
  Runtime error  (3)
2024.01.13 16:53:55.990 Core 1 genetic pass (0, 205) tested with error "critical runtime error 502 in OnTester function ( array out of range , module Experts\Ak14_V2.ex5, file Ak14_V2.mq5, line 214, col 19)" in 0:00:00.138 What kind of error is this? Does it affect my results