Expert Advisors and Automated Trading - page 43

Hi all, is there any way to access the built-in economic calendar during backtest? I tried CalendarValueHistory and while it does give proper results when executing the code on a live chart, it returns no results during backtest. Thank you in advance
I love MT5 but there are some problems that does not allow me to switch from MT4. 1. The spread in the backtests comes from the data and we cannot define a value. We know that spreads change a lot from broker to broker and having a fixed predefined value does not allow to test certain strategies and...
Is there any way to check some open order when the user clicks the button to close the terminal and prevent the terminal from closing until the order is closed? I tried doing it in the OnDeinit event but it didn't work: void OnDeinit ( const int reason) { if ( PositionSelect ( _Symbol )) {
Assume I want to get data from page https://www.abc.com using web requests However in the Allowed URL user input https://abc.com because when copy pasting from browser the www gets neglected. The web-request fails in this case as the web request returns -1. My understanding is Allowed URLs list
My demo terminal is not setting a position identifier for positions ... and naturally it is absent also for deals and orders on the history tab. What can be the reason? Thanks.
[Deleted]
I have been facing some issues on testing OnTimer but it does not happen always only sometimes so hard to record the event, Timer stops and I also use time compare like if current bar timelocal is not syncing fast to last 2 bars time then alert ,so i may know when OnTimer function freezes and i can
the red and gray lines seems to be the line graph of the "open ask & close price "... my EA does not hay ANY indicator.. where tthose lines comes from ??? and how to disable them ??? the "help info" of the MT5 does not offer help
double array[ 10 ] = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 }; double array2[ 10 ] = { 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 }; for ( int i = 0 ; i < 10 ; i++){ ArrayInsert (array,array2, 0 , 0 , 1 ); } ArrayPrint (array); To provide some background and a simple illustration using a 1 d
Help Me❗ How to connect 2 Forex Robots that do not have the same Magic Number? Hello Bro. Currently, I have 2 Forex Robots trading on the same account with the same currency pair. However, these 2 Robots do not have the same Magic Number (this is my own intention because if set up with the same
The product validation of my EA keeps failing, so I am unable to add it to the market it is an EA based on indices and should work on NY open till close. Due to the fact that no time constraint is allowed, I made the time constraint optional and the default time to be all through the day but it can
I am using MQL5 in Borsa Istanbul. I trade in futures markets. In our exchange, just like in cryptocurrency exchanges, buyers and sellers place market maker orders, and this is how the market is formed. There is no spread like the FX markets, instead the buyer and seller meet at the best price and
Hello everyone.I´ve been experiencing an issue, on my MT5, which seems to be a setting one, but can´t figure out why. I can´t execute a delete PENDING, non from a MQL5 bot, and from PYTHON API either.Both bots seem to be correctly coded, MQL5´s one compiles well, and works in Backtesting, but when I
Hi every one, Is it possible to find out from the asset description whether we can go long and short at the same time, or do we have to do the test ourselves and open 2 opposite positions? exemple on USDJPY here : Best Reguards, ZeroCafeine 😊
[Deleted]
Hello, I have an ea in my hand. but I don't have codes. When EA opens a transaction, is there something that will automatically reverse that transaction, disable the robot, and then activate EA again when the transaction is completed? Is this possible
#property copyright "Copyright 2023, MetaQuotes Ltd." #property link "https://www.mql5.com" #property version "1.00" #include <Trade/Trade.mqh> CTrade trade; int handlefastma, handlemiddlema, handleslowma; double Ask = SymbolInfoDouble ( _Symbol , SYMBOL_ASK ); double Bid = SymbolInfoDouble
  Rates position  (1)
Hi I'm traying to make this work, but can make it work propperly. I use this: MqlRates rates[]; ArraySetAsSeries (rates, true ); int copied= CopyRates ( _Symbol , PERIOD_CURRENT , 0 , 7 ,rates); if (copied<= 0 ) Print ( "Error copying price data " , GetLastError ()); but when testing
i am a newbie of mt5 trader. i was practicing my coding with the moving average strategy. but there is a problem happened. i can run my code but the journal always shows me "failed instant sell 0.001 EURUSD(UST+3) at 1.0906 [Invalid volume]" when i make the order. is anyone can help me to point out
Can any1 tell me how to get a specific time using it historical Ask price to backtest a EA THX
Why during mt5 backtesting shortkeys(+ for zoom in , - for zoom out) are not working
Hi all, I think it should be already included, but... 🤷‍♂️ The MetaTrader 5 package for macOS is perfect. It works perfectly with wine. But it doesn't come with python package. If the user knows how to use the wine command (like me) can try to install python into it. But, I don't know why the
Hello Community, I am new, and have been getting amazing results with back testing on a demo account. Once I open and fund a live account and apply the exact same EA and variables, should I expect similar results? I have watched some videos, and I do not expect the exact same results, but possibly
Trying to create an array, which will hold say 10 arrays each of size 5 made up of type double
Hello, I am not sure if this process has been explained elsewhere.. but I will proceed to ask the question here. I want to run two Expert Advisors on the same account. One would be executing trades and the other would be monitoring the daily drawdown then send an alert if it comes close to a limit
EA wont work. any help? i ve tried lots of clean install.. changed many setting. stuck,, it did work for a few day
  4 EMA bot  (2)
Hello guys. I am in the process of developing a bot for MT5 but I simply cannot get it to work as I want. It sells when it is above 55 and buys when it is below. It should make a buy when it crosses EMA 55 with EMA 8, 13 and 21 and vice versa. THANKS! :* File is added below
I'm trying to run this code I got from the documentation page: from datetime import datetime import MetaTrader5 as mt5 # connect to MetaTrader 5 if not mt5.initialize(): print("initialize() failed") mt5.shutdown() # request connection status and parameters print(mt5.terminal_info()) # get
How to create multiple Bitmap using CCanvas? I have coded a sample code below. When you attach it, you will see only 1 Bitmap instead of 2. Notice in the CreateBitmap function, both has a different name. #property copyright "Copyright 2023, MetaQuotes Ltd." #property link
Hey guys, I have been encountering an issue with the strategy tester on MT5 since some time. I used it before to run tests and everything worked perfectly until yesterday I launched a backtest and it kept getting stuck at the stage of loading data. I will show you a picture of what the Journal is
  find Chart ID  (4)
I use two time frame in Strategy Tester . with function ChartID () i can find first chart id . who can i find second time frame (in this screenshot M30) Chart ID
Hello, may I know why I get different back test result with On Visual Mode & Off Visual Mode although all the settings are same? Which results are more accurate (with visual mode on or off)