Expert Advisors and Automated Trading - page 3

Hello everyone, I have several Expert Advisors running on different MT5 terminals, all with the same broker. However, sometimes I notice a strange issue: one terminal executes a setup even though the conditions are not met , while on another terminal (same EA, same broker, same timeframe, same
Hi, if have an EA that loads, handles and unloads several indicators. Therefore I created a wrapper class to hold indicator objects in a CHashMap <string ident , cObject obj > Things working fine for indicators like iATR, iMA and others. Now I have a custom indicator that draws a bunch of lines
Hello I wrote a function in order to detect whether my SL was hit: inside the OnTrade() function I compare the Low of the current bar iLow(symbol_,PERIOD_CURRENT,0) with my SL level. For Example if I was long and Low<= SL, I would know the SL was triggered. It turns out that rarely works.... when SL
Subject: Backtest Results Depend on EA File Name – Please Review This Critical Behavior Dear MetaQuotes Development Team, My name is Somchai Suthimanorom, an EA developer and MetaTrader 5 user. I would like to report an unexpected and concerning behavior in the MT5 Strategy Tester, which directly
Hello everyone, I'm developing an EA and upon trying to get the account balance I'm getting the value 0. Does anyone know which is the reason of this? Here there is an example of how I'm getting a 0. void OnInit () { Print ( "OnInit: " , AccountInfoDouble ( ACCOUNT_BALANCE )); } void OnTick ()
I have split my mq5 code for my EA between one *.mq5 file and many *.mqh file so that I can separate my source code according to topic and so that the source is not in just one humungous file. But it appears that when I use Next Bookmark, that it only jumps within the current selected file and not
All of a sudden an EA that I have used for several months started to misbehave. I narrowed it down to HistoryDealsTotal(). As a simplified example, here is my OnTester() function: double OnTester () { if (! HistorySelect ( 0 , TimeCurrent ())) Print ( "HistorySelect() failed!" ); else Print (
Hi, I'm writing an EA and I'm trying to use the indicator "Linear Regression Value (apply to) - indicator for MetaTrader 5" --> https://www.mql5.com/en/code/50569 I'm trying to apply the indicator to the RSI indicator. Reading the documentation: When you call a custom indicator from mql5-program
Greetings Please assist with my panel I created. When I press the Buy/Sell stop, "Pending stop pips" & "No. of Trades" buttons everything works perfectly but as for my TP & SL they do not show my take profit & stop loss levels at all. Below is my code please assist if you know the problem. #property
good day. I have an indicator set on my Templates so I open another Chart using my EA, and I run long chart_id = ChartOpen (_symbol, _period); if (chart_id == 0 ) return ( ERR_CHART_NOT_FOUND ); ChartSetInteger ( ChartID (), CHART_BRING_TO_TOP , true ); so now my default
Good Day Trust that you are all well. I updated MT5 to the latest version when restarting the Platform I found that most of my trading EA's are no longer on the charts, it is not just 1 EA it EA's from different Vendors. Is there a fix? Thanks Rene
Hi all, I’m running into an issue with my MT5 integration and wanted to see if anyone has dealt with something similar. The Issue in Simple Terms: My trading platform (on an OpenSUSE staging server) is generating signals correctly (e.g., BTC at 69% confidence). The problem is those signals aren’t
I'm getting complete opposite result when testing on every tick or 1min OHLC. the EA and input parameters are exactly the same but in the case of 1min ohlc I get 50000 profit while in every tick I get -7000 losses. this happens on many pairs testing on a period of 2 years 0811-0813 someone have had
Hello guys, I’ve a problem with publishing my EA on the market. Although I’ve read all the related articles and topics on this forum to find a solution for it, but still I’m struggling with validation of my EA. All the obligations of the MQL4 has been included in my EA, but still I receive the error...
Hi I know nothing about MTQ4/5 - so am just beginning ;) I downloaded the following trading EA - fuzzy_logic_for_algotraders.mtq5 (23KB) For whatever reason it includes MT4Orders.mqh and so I downloaded that library and placed it in the 'include' folder I get 11 errors and 3 warnings on compiling
Hello everyone, I have been trying for several hours to reproduce the Sharpe Ratio statistics that appear in the Strategy Tester, but I cannot figure out the formula used by MetaTrader 5 to arrive at the displayed result. To do this, I followed the article ‘ Mathematics in trading: Sharpe and
Hello everyone, I’ve seen Expert Advisors that have managed to run profitably for years. Even a few martingale strategies have kept going much longer than expected. But sooner or later, most seem to blow the account or simply stop performing the way they once did. It makes me wonder what it really
I’m seeing a consistent mismatch between the history available on a live chart and what the Strategy Tester gives me. I only need to show OnInit() to illustrate it. Code used in OnInit : int OnInit () { PrintFormat ( "MQL_TESTER=%d | DATA_PATH=%s" , ( int ) MQLInfoInteger (
Hi All i'm testing a strategy on the minute timeframe. I understand that on the graph, the minute data doesn't go back further than about 3 months, however on the strategy tester graph it shows minute data going back 6 months if i'm testing to 6 months back. I have also found that with some
My mt5 recently updated to version 5 build 5200, now, my EA which was working perfectly yesterday isn't
Hey! I have a problem with backtesting my EA in MT5. Attached below is a chart that appears in the MT5 terminal after backtesting. Here some of the trade history arrows do not appear on candles. Instead they are little or too much offset from the candle. I have seen this happen many times. My
I have an EA that runs on the startegy tester for optimization I have created 5 custom symbols that are 5min timeframe minimum and all are loaded and fine I try to run optimization on all the 5 symbols and diffrent timeframes at same time the issue is some passes fail on the tester while tring this
hi please see attatched what causes this large price drop in an MT5 backtest. Missing data
Hi everyone, After last update, I think ObjectGetString does not work properly. Following code, prints nothing and gives the error 5040: void OnStart () { string name = "lbl_test" ; ObjectCreate ( 0 , name, OBJ_LABEL , 0 , 0 , 0 ); ObjectSetString ( 0 , name, OBJPROP_TEXT , "This is it" );
I want to hide an object on a chart in Mt5 when the scale of this chart changes to 0 or 1 (the scale can change from 0 to 5). unfortunately MQL5 does not have a command like ObjectSetInteger ( 0 , "name" , OBJPROP_TIMEFRAMES , OBJ_PERIOD_H1 | OBJ_PERIOD_D1 ) for chart_scale. I found a way to hide
In Strategy Tester , the backtesting stalls when using all market watch symbols - see screenshots below. The Strategy Tester is stuck here for a very long time. It happens with other EAs as well. When running the same backtest multiple times, sometimes it finishes all tests and sometimes it doesn't
Well I've just been doing some testing and experienced some very strange behaviour. I was expecting 1 min OHLC and Open Prices to give very similar results as I had created two custom symbols , both with a spread of 1 point. What I got was two curves that diverged from each other (The red line and
I have made a custom indicator written in MQL5 which does the following: 1- Calculate the 9-period hull moving average for the open prices. Name it HMA9open 2- Calculate the 9-period hull moving average for the high prices. Name it HMA9high 3- Calculate the 9-period hull moving
Hi everybody, like always and done without any problems in previous versions of MT5 I want to test my (unmodified) EA by the strategy tester. But since I've installed MT5 build 2926 I cannot open any pending orders. I get the error messages CP 0 16 : 18 : 13.970 Tester DE30,H1