Expert Advisors and Automated Trading - page 31

Hi, I downloaded EURUSD M1 historical data and imported it on a custom Symbol. When I try to test an EA on it, I get several 10044 errors opening positions.  2018.11.07 19:02:51.499 2017.08.01 15:40:00   failed market buy 0.01 EURUSDh tp: 1.18944 [Only position closing is allowed] 2018.11.07 19:02...
Hello, I am using the WebRequest function in my code and encountering the following errors: ' WebRequest' - no one of the overloads can be applied to the function call When I run the code, it gives an error, and I receive the following message: ' WebRequest' - no one of the overloads can be applied
Hi Team, I have a question regarding the "Profit and Loss by Hours" feature in the backtest results. In the Strategy Tester , is it possible to analyze profit and loss based on specified trade open and close hours? The current graph only shows "Profit and Loss by Hours" without clarifying if it
I want to export all the XAUUSD history to use on a pretty old build. I guess the build num is 3310. I know I should open the symbols window, Create Custom Symbol, then copy from xauusd. What about the entire history? in the bar tab, I request M1 history but it is up to 2024.08.16 not from 2008
When the following Expert is initially attached to a chart, The SpinEdit value 25 is displayed. If the timeframe is changed, the value 25 is no longer displayed. However, clicking the up/down arrows will re-display the value. Changing timeframes again will hide the value. Is there a way to keep the
How am I supposed to interpret this? The charge implies I've used almost 75% of my storage on VPS, yet it is a brand new account running for 2 days. And if so what am I supposed to do about it
  OnTimer bug  (6)
There seems to be a bug with the OnTimer event. I'm trying to restart the timer inisde the OnTimer event and the first cycle after the restart is not executed. Let me show you an example: void OnInit () { EventSetTimer ( 2 ); } bool timer_set = false ; void OnTimer () { if (!timer_set) {
Hi everyone, I wanted to ask for your help, as I've been trying to download a file from a presigned AWS S3 url using the WebRequest function, but with no success. I had successfully downloaded a file from another URL of a website I own without any problem, but when trying to do the same for the S3
Hello guys My Terminal shows this pair incurred a short swap of $ -636.00 How would you calculate it in code from the Swap info of this pair, as shown ? Thank you
Can you run tests where you can make changes while running, because you know that making an EA without touching the settings while running is difficult, you could say impossible
Hi everyone, I'm new to programming in MQL5, and I'm trying to create a simple trading robot for the Brazilian market (mini index). My strategy is straightforward, but I’ve been running into issues where the robot doesn't open orders even when the conditions are met. I’d appreciate some guidance
I was testing my EA in visual mode and it seems like (please correct me if I am wrong), that if there is a buy stop order, say on a stock CFD, and price opens the next day beyond the buy stop price, that the tester assumes that the trade was opened AT the stop price, however, I would assume that in
Hi all, I have an EA that has been converted from mql4 to mql5. When I compile the code in MetaEditor I am getting an error that states this implicit conversion from 'number' to 'string' londonv1.mq5 192 28 implicit conversion from 'number' to 'string' londonv1.mq5 259 28 I believe that the issue
It is necessary to avoid a duplicate working of my Expert Advisor in paralel Charts. For ex, if it is already running in EURUSD chart, then if a user loads it into GBPUSD, it should not work but exit. It is because, my EA is not related to only one instrument or one chart, it works with several of
Will the following action consume 1 activation? For example, currently I installed an EA into my local PC, and then migrated to MT5's own VPS with 1 month subscription. Now I want to get another MT5 's own vps with 6 month subscription. Will changing the mt5 vps result in consuming 1 activation
Could anyone make me a ATR trailing stop indicator for the metatrader plattform or simply provide me with the script. When I define my ATR traling stop it's calculated from this common formula: ATR Figure = $0.08 Last Close = $6.78 3 x ATR Stop = $6.78 - ($0.08 x 3) = $6.78 - $0.24 = $6.54 The
Hello guys, I have an EA that reads data from a txt file and opens positions based on them I am testing this in strategy tester, the problem is when I change the name of txt file it still reads the previous file name and it isn't changed. and when I use the same file name and change the data in it
Hi everybody, I need to get the current datetime in a string, possibly in a SQL format (e.g. 2019-04-07 15:37:02). I've tried three methods of MQL5 standard library:  TimeCurrent, TimeGMT, TimeLocal but during backtest they all return the same date that is not the actual date. I need to get the...
I have some functions in a script file some of which are visible and callable from within the same script. Others though always throw the compile error -undeclared identifier. I'm assuming that i have something wrong with programmatic flow. Any help would be appreciated - the Copy File Function is
If your posting code please limit to forum specific MT5 only. Please take a look at a thought on logic for how to detect ranging or trending markets. Any thoughts or idea or other logic that I can implement to detect ranging or trending market would be great to hear. Please discuss your tactics on
import MetaTrader5 as mt5 rates = mt5.copy_rates_from_pos( "EURUSD" , mt5.TIMEFRAME_H4, 0 , 2 ) df = pd.DataFrame(rates) print (df) This code used to return OHLC But now it returns time bid ask last volume time_msc flags volume_real 0 1732176000 1.05466
After the last updates of MT5, I noticed that the MQL5 Debugger is unable to identify Local Variables, thus managing to display only Global ones. Does anyone know how to fix? Or do you know how to report the problem in the debugger
hi, i am searching for a indicator which can stop trading in any session i need, like i dont want to trade in asian session, it does not allow my terminal and ea to take position on asian session , looking for help from your guys
When I published my EA, the automatic verification failed and there was no trading operation.How to solve this
In MT5, in the Strategy Tester, debug tab, if I try and display the values of my "input" variables, it shows a value of "unknown identifier". It used to work fine but just stopped one day around 1 month ago. e.g. for the coded line "input bool testBOOL = true;" when the testBOOL is displayed in the
Hello, I am new to forex trading and need some advice. If I have an account balance of $1000, is it advisable to run EAs on several pairs on a single account, or should I rather divide up the balance into several accounts, one for each trading pair. My fear is that if just one trading pair goes
Hello i just started mql5 python today. I used the example tutorial. They work well but only values (bid price and ask price) are different. For example: when i run example code in "https://www.mql5.com/en/docs/integration/python_metatrader5" on python it prints current bid value as 85.334 and ask
I'm working on an EA and my procedure is that after adding new functionality I compile the EA to check for errors. After doing that 5-6 times and I compile the EA without errors this screenshot is what I see in input parameters. And from the Select Expert list I cant find my EA. I'm doing something
Hello, I would like to understand why some currency pairs, which perform very well and are profitable in real trading with an EA, do not show good results when backtested with the same EA. The backtest results are completely different from the real trading outcomes. What could be the reason for
While updating custom symbols using Service, one can hide/show the custom symbols from Market Watch using SymbolSelect(custom_symbol, false) but there is no way to "release" (detach) the custom symbol without having to call the SymbolSelect(). Unwanted side effect: User can not Hide/Show the custom