Expert Advisors and Automated Trading - page 7

Hello. I am trying to code my first Expert Advisor in MQL5, and I am having an issue getting the correct values from indicators, specifically RSI and ATR in my case. This is the code I am using: int atrHandle; int rsiHandle; atrHandle = iATR ( NULL , 0 , ATR_Period); rsiHandle = iRSI ( NULL , 0
Hi, Target: Server restarts... MetaTrader is comming back up with autostart scripts or whatever... Problem: Sometimes EA's are not attached to the Chart anymore. So somehow I want to check if everything is right (TimeFrames, EA's, etc.. ) A visual TestTool doesn't seem right.... Does anyone have a
Hello everyone, I have developed an Expert Advisor (EA) for MetaTrader 5 (MT5) and, to test it with high-quality data, I used QuantDataManager to download historical tick data . After downloading the necessary data, I went to MT5, created the symbols, and loaded the ticks (the image below shows the
Hello, I would like to be reimbursed because the EA makes many loss. I would like to earn money, not to lose money. Please, how to be reimbursed from an EA. I already activated the EA but it's a scam, it makes only loss money. Please help me to be reimbursed. Also the service desk didn't reply me
Gents, I'm running backtests using the 'Run Single Test' function directly from the Optimization Results tool and the Strategy Tester with the same parameters, but the results are significantly different. Has anyone else experienced this? Any insights on why this might be happening?"
My EA in tester only shows sells. At the same time the journal registers both sells and buys. Notice the vertical dotted lines which must be interconnected between the buys a nd the sells during b a cktesting in the normal situation . Ple explain what's wrong with the settings?? The code is as
void Trail() { Print ( "Trail() called for symbol: " , _Symbol ); // Log the function call and current chart symbol int totalPositions = PositionsTotal (); for ( int i = 0 ; i < totalPositions; i++) { ulong ticket = PositionGetTicket (i); if ( PositionSelectByTicket
Hello, I have 2 installations of MT5, on 1 when I perform backtest with visual mode I can also see the trades made during the backtest on my main chart directly in MT5 main window, so I can further play with indicators and all the values and still see the trades. In my another MT5 installation this
Hi folks, I have built an algo that trades 6 different strategies.... I want to establish the best strategy to trade. I wouldn't like to do a slow complete optimisation for all 6 strategies as it will take many weeks to complete. So my question is: Would it be a good idea to run a faster genetic
Hello I want to make my indicator signals that are given as alerts automatically. It means to automatically open a trade for me and set profit and loss limits. Is there a cheap tool? Introduce some examples of it
Hello, how can one get the same, actual New York-time all year long , no matter whether it's summer- or winter-time there? How can this be achieved with MQL5 if one doesn't live in the New York-time zone themselves? Something like the missing TimeNewYork() -function? Because MQL5 only provides our
  Strategy tester  (2)
Hello, Bellow function giving always result of 0 in the strategy tester, but is working when loaded on a script. I do not understand why Thanks! double ATR( int index, ENUM_TIMEFRAMES timeframe) { double atr[]; double res= 0 ; int maxtries = 3 ; int retrycount= 0 ; ArraySetAsSeries (atr
For those who are experienced in programming EAs, I'd value your opinion on this. If you have an EA that makes buy and sell positions based on valid strong signals, is this better than having a lot of position management code (recovery trades, PnL analysis etc.)? I wrote a script full of position
Hello to All, I am seeing inconsistent results using iBarShift() within the Strategy Tester that I cannot explain. This problem arose whilst using a library that works very well for more current dates but is reporting incorrect results for earlier historical dates. Unfortunately my specific use case
I'm seeking a Telegram copy trader that performs basic copy trading functions and includes the following feature: When a trade signal is sent e.g., XAUUSD SELL Entry: 2345-2347, SL: 2350, TP:1 TP:2 TP:3), I want the EA to open trades within the specified entry range (2345-2347). The EA should allow
  How to LOCK/Encrypt EA  (193   1 2 3 4 5 ... 19 20)
Guys how can I LOCK my EA so that no one can see or change anything...like you normally get DEMO from the signal provider websites?? Thanks Babar
Hi Guys, i'm thinking about how to protect my own programmed EA against decompiling by other people and thinking about a server based solution were the EA needs to connect to my server and get their trade data over something like an api with key authentication. So my question is, has anybody done...
  Strategy tester  (3)
With the last upgrade the strategy tester stopped working. I tried reinstalling but now it won't start at all. How to solve the problem? thank you
Sir , I want to Convert MQL4 to MQL5 Source code 👇 MQL4 :- for ( int pos = OrdersHistoryTotal() - 1 ; pos >= 0 ; pos--) { if ( OrderSelect (pos, SELECT_BY_POS, MODE_HISTORY)) { if (OrderProfit() != 0.0 ) { if (OrderClosePrice() !=
Hi, I have a problem using the genetic optimization. Once a start a first test everything is fine: But when I start a new test after this one, random cores stay "ready" and do not work (sometimes 4 or more) and then, the test get stuck: I have to disable all core and enable it again or simply
I'm not sure if MQL know their Socket TLS functions aren't suitable for Websocket , i've been spending all time of my every last 5 days searching this forum, that forum and all forum on how to make WSS Websocket work all to no avail. Should one just go to WinAPI for every little function
Good evening I have a person who would like to buy an MQL5 indicator in the marketplace. In fact I don't know what will happen to the client. He gets an ex5? He needs to do an icustom() on this bought/rented indicator I would like to know where the ex5 will be installed in the metrader directories
Good Day, I'm trying to create an EA that checks the number of open trades per currency pair then sends an email if the number of open trades is greater than or equal to set number. With the help of ChatGPT I've made some progress but the code sends 100s or 1000s of emails when th condition is meet
I am trying to login to Metatrader account and I have been receiving this error code. Please see code below; I first import necessary libraries and initialize which works fine from datetime import datetime import MetaTrader5 as mt5 mt5.initialize() But when I try to log in using the below code, I
Hi there! I'm working on an EA that uses pending orders and I need them to expire x bars after they are created but my broker/symbol doesn´t support GTC or Time Specified Expiration. this is the workaround I´ve created: When conditions are met, it creates a pending order and stores the Expiration
I need run a certain modules of an EA to be run with only one symbol, let say "EURUSD" and block others ( GBPUSD ) to do the same. For ex, if my robot is used in one symbol (EURUSD), and if it is runnig some module of closing all orders, I need to block other symbols to do the same. That means, for
I'm trying to write the code that would count the times something happens. It doesn't matter what. You don't need any existing code. I'm just learning and trying to understand scope and the order that things are processed. It's all still pretty new. I just want to write, for example: if(a == b) { do
Hi there, Can someone tell me if there is any limitation in MT5 which prevents creating a seconds chart with more than one day of historical data? I hired a coder to create an EA for me which reads tick data and creates an offline chart which gets updated every tick , and you can create custom
Hi all. My goal: to establish exposure limits in order to diversify my entries across pairs on a multi symbol FX EA. For this I plan on having an array of volumes, which I then "operate a calculation on" to get values into an array of USD exposure values. Where I am: I have an array with the asset
Hello Community Members, I was trying to publish my EA. It says test on EURUSD,H1 strategy tester report not found How can this be solved. If it'a bug on mql then how can this be reported. Thanks