Expert Advisors and Automated Trading - page 13

Hello I just want to make sure I am not going crazy. My MT5 EA is not creating Databases (.db files or .sqlite files) when it is run in the Strategy Tester. Although I can see the EA create a Database when I drop it on a Live chart. I want to make it clear, I am not talking about databases with web
Sometimes I can't understand why it is wrong like the example below: if (bb ) printf ( "@X " + BestEntry + " " + P261_UpDn[tm][SignalIdx].Entry); if (bEntry) printf ( "@Y " + BestEntry + " " + P261_UpDn[tm][SignalIdx].Entry); Why does the result depend on the condition even though the variable
Hi everyone! I'm new to MQL5 and just starting to learn algorithmic trading. What do you think is the best way to start building my first EA? Should I begin with simple moving average strategies, or is there something else you recommend for beginners? I don’t need something profitable right now
I’m currently coding an MT5 EA and I’d like to add an image/logo directly onto the chart (not just text or lines). I’ve been experimenting with OBJ_BITMAP and OBJ_BITMAP_LABEL, but I’m not fully sure how to properly load and display a custom image in the EA. Has anyone here done this before?🤷‍♂️
Has any body encountered something like this before when trying to test a single strategy? It's weird because I am facing the same problem on all mt5s. I tried running on multiple VPSes, different computer, OSes. Funny but its working for everybody else but me
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
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