Expert Advisors and Automated Trading - page 6

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
Hello, i have error invalid stops. How can i fix by myself, i dont know coding.... Is there a way ? best regards
[Deleted]
Hello, How to do, let say EA usually take 10 ms and i want to set if EA taking more than 20ms during onTick operation exit/break whole operation in middle and start again in next tick
[Deleted]
Hello, I have built an multiTimeframe and MultiSymbol EA. For example, i am using Moving Average, it create handle for all the selected symbols and timeframe. 1. Sometime Due to Moving Average full EA get stuck 2. Sometime CopyBuffer get failed and return 0 (for all indicators) 3. When i deinit and
Hello, I've had issues using multicurrency EAs on MQL5 VPS. It looks like the EA cannot place orders on other symbols - even if the corresponding charts are open when I sync. Do you know how to solve this
Using specific deal/order tickets, Looping through all orders, Custom frameworks, Other (specify in comments)
Hi, I'm looking for a small EA utility which allows to close existing orders (opened manually or by other EAs) based on rules given by indicator values. E.g., it uses the stochastic indicator and closes the orders once the overbought or oversold regime of the specified trade instrument are reached
[Deleted]
Hello, I am using simple RSI + BollingerBands to find reversal and take a trade. i am not using any Take Profit or StopLoss defined directly in Order or defined in Point/Pips instead i am using Indicator to calculate When to close trade in profit (Take Profit similar) but the problem is i am
I look in the forum but this has not been answered although some similar topics but not this example. As the strategy tester is running my profit calculation is wrong. See these two examples, trading XAUUSD with USD as the currency. Can someone give me some insight here
  Checking errors  (1)
Why did you post your coding question in the MT 5 General section (a miscellaneous catch-all category) instead of the MT 5 EA section (non-indicator coding)? General rules and best pratices of the Forum. - General - MQL5 programming forum ? (20 17 ) Next time, post in the correct place. I
[Deleted]
Hello, Using #include <Trade\PositionInfo.mqh> #include <Trade\Trade.mqh> CPositionInfo m_position; // trade position object CTrade m_trade; // trading object Will make my EA slow? or should i use purely for example CTrade m_trade; or directly
Hi. Is there anybody here who has ever written an expert adviser which being able to read news feeds, and then distinguish between bullish and bearish ones? (Ex. Reuters, New York Times, Bloomberg, etc) If you know how does it work or if you already have that script inside your computer then would
  Cloud network  (1)
When I enable cloud network for optimization in the strategy tester, it looks like i am limited to a certain number of tasks. How can I make sure that all networks are used and there is no limit to the tasks
  Mobile messaging  (2)
Does anyone know if there is a way of sending a user a message on MT5 mobile without the MT5 terminal and EA being switched on? Thanks in advance
In general, my performance with backtesting and optimizing got worse and worse since I started with MQL5, but for some reason, since 2 days, some cores have just been disabled out of nowhere and get auto-disabled when I enable them again. Today, when I tried to optimize something, all my cores got
[Deleted]
Strategy // ===== Indicators ===== bool GreenCandle = true ; bool RedCandle = true ; double RSIValue = fRSI(rSymbol, SelectedTimeFrame, RSI_Period, RSI_AppliedPrice, SignalStrengthValue); if (RSIValue == 0 ) continue ; double
I want to count history deals from down to up. But my code not work perfectly. Please help me anyone.   HistorySelect(TimeCurrent(),0);   if(HistoryDealsTotal()>0)     {      for(uint i = uint(HistoryDealsTotal()-1); i >= 0; i--)        {         if(Deal.SelectByIndex(i)==true)...
Hello everyone, I have an Expert Advisor that operates based on trend conditions; it opens trades when the market starts to move in a clear direction (based on indicators). However, during sideways or ranging periods, it tends to accumulate losses or end up in break-even situations according to my
I'm using CustomRatesUpdate() function . It costs up to 2-3GB of disk space on real time running interval 1 sec in 24 hours (version A) but while I copy M1 timeframe data from server then CustomRatesUpdate() from 8/2024 just in 7MB (version B) . CustomRatesReplace() also has the same effect Version
Dear Forum Members Wish all Marry Christmas & Happy New Year. I have got above error while running Strategy Tester. Any clue what is this could be? Regards
[Deleted]
fRSI(SelectedSymbol, PERIOD_CURRENT , 14 , PRICE_CLOSE , 0 ); double fRSI( string sy, ENUM_TIMEFRAMES SelectedTimeFrame, int period, ENUM_APPLIED_PRICE applied_price, int shift) { double buf[ 1 ]; int handle= iRSI (sy,SelectedTimeFrame,period,applied_price); if (handle< 0 ) {
I am trying to find a way to calculate the appropriate volume for longs and shorts dependent on a fixed percentage of risk. I stumbled across the CMoneyFixedRisk money management class and set it up in my EA. Every time it is called it seems to always return the value 0.0. Below is an example of how
  ERROR :10030  (7)
#property copyright "Lucas Mariano Vieira" #property link "https://www.mql5.com" #property version "1.00" input int MAPeriodShort= 9 ; input int MAPeriodLong= 21 ; input int MAShift= 0 ; input ENUM_MA_METHOD MAMethodS= MODE_SMA ; input ENUM_MA_METHOD MAMethodL= MODE_SMA ; input
Hello I am trying to integrate an economic calendar into my MT5 EA so that the robot temporarily blocks trading before important news events. I am using the stub function EconomicNewsGetNext(), but I keep getting compilation errors like: - Undeclared identifier - Implicit conversion from unknown to
Context: This post is intended to be useful to those looking for ideas on how to set up an optimisation/setfile discovery process for themselves. Much more selfishly, I am also looking for advice from the more experienced on my optimisation process (which I will lay out below). I have been trading
Currently I am Using the Below Code In MQL4, //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ bool openURL( string url){ int APPEND
Sorry, but why are the simplest of things just impossible. The fact that there are other posts on here saying the same thing - with equally unclear responses - speaks volumes. The `PlaySound()` method - seriously? The file path ` C:\Users\<user>\AppData\Roaming\MetaQuotes\Terminal\Sounds ` is where
As you can see I already open the window to access those feature. But the window is nowhere to be found. I'm using MacOS M1 Tahoe 26.2. And Exness Demo Account for this experiment. Based from ChatGPT I still can access signal tab with Demo account, but why it's greyed out
Hello, I bought an Expert Advisor. Suddenly it's gone. The corresponding signal is also gone. In this case, it's the "Gold vs. Bitcoin Arbitrage" EA. Why aren't buyers informed about this ? It's not just strange, it's downright outrageous
Hello, While demo testing an algoritmic strategy on the US500, I get the message 'US500 history data load error.' Does anyone know how I can solve this