Expert Advisors and Automated Trading - page 9

Sorry to ask such a noob question. This has probably been answered before, but I've tried every way of phrasing this question in searches that I can think of, and have found no answer. Very often when a backtest finishes it does not seem to display the results in the "Results" tab of the "Strategy...
Hi, I'm a beginner trader from Norway looking for advice. I started trading XAUUSD manually two months ago with $1100 using TradingView connected to a Pepperstone account. The first month was a disaster, and I lost 35% of my account in a few trades because I didn't set stop-losses. My second month
  Need harmonic EA & Indicator  (161   1 2 3 4 5 ... 16 17)
Hi, Can someone make this harmonic EA for Eur/Usd and Usd/Chf please ? Input : Today open price ( gmt.00 ) BUY at = open price - 27 pips SL = 50 TP = open price SELL at = open price + 27 pips SL = 50 TP = open price The EA should only take place one time a day.wicht come first, SELL OR BUY
Hello, i'm having some troubles switching accounts in MT5 via python: -MT5 started manually -2 accounts have been connected manually. -logged into 1 account manually. i now tried to switch to the other account with mt5.login(account,password,server) as well as with
Bot, altın M5 ile uyumlu, ancak mevcut altın fiyatı 1900 civarında değil. Yukarıda EuroSD H1 de gösteriliyor. Test altın mı yoksa eurusd mı üzerinde yapılıyor? Bulamıyorum. Bilen biri bana yardımcı olabilir mi? Bu testi nasıl geçebilirim
I want to get the position ID of a trade right after opening it, but it always returns 0 . Here is the code I’m using: if (trade.Sell(volume, symbol, 0 , sl, tp)) { ulong order_ticket = trade.ResultOrder(); // Trying to get the position ID ulong pos_id = HistoryDealGetInteger (order_ticket
Hello, can you help me write this EA for MT5? If the previous candle is a BUY candle, then open a BUY. If the previous candle is a SELL candle, then open a SELL. If there is an existing position that matches the logic => keep it, do not open a new one. If there is no position that matches the logic
I want to create a robot (expert in MetaEditor) but I have a question: Does my laptop need to be on when the expert is working? For example if a robot wants to work for 5 hours, should the computer be turn on for 5 hours
I had custom inputs on my mt5 backtest screen. They were showing up fine and then after a certain amount of backtests, they disappeared. There are 4 new ones that showed up and don’t have anything to do with my current EA. I don’t know where they came from
  how to
With this library, I've been told it's possible to avoid using OnTimer and OnTick and still achieve polling as fast as 100ms. I'd like to understand how this can be done. if someone have some example is welcome https://www.mql5.com/en/blogs/post/706665 ; here library and documentation i not find
Hi guys i try to use a websocket for exchange data mt5 to my program i use this code for do that //+------------------------------------------------------------------+ //| TCP_Send_Test.mq5 |
When I backtest my Expert Advisor (EA) on a live account, the results differ significantly from those on the demo account. I suspect this discrepancy is caused by the spread difference — the live account has a 0.2 spread. I’m not entirely sure how to handle or adjust for this spread variation within
If I am running my Python script on my Windows Desktop, which will launch/login to MT5, if I have a VPS with Meta trader and it is turned on, when my script executes my trade, is it using the VPS or my desktop client connection
When I set up an EA, I have specific timeframes that I want to be able to alter. When I switch timeframes in the backtest MT5 screen it gives me different results. Should it only give results based on the EA specifications? Which one do I use
I have found that after every optimization, my hard drive health status decreases by 1%. Later, I found out that a large amount of data was written to the hard drive during each optimization.Is this normal? What is writing to the hard drive? I know that functions such as Print() will not be executed
CalendarValueHistory function times out if a period longer than one month is passed to it. I noticed this issue on b5327. Previously, this issue didn't exist, and the function returned all calendar events for the entire period. MqlCalendarValue Values[]; datetime from = TimeCurrent ()- 30 * 24 *
Hello everyone, I’m developing a multi-application system that communicates with MT5. Right now, the architecture is such that MT5 runs multiple Expert Advisors (EAs) to interact with different applications via TCP or other IPC mechanisms. The problem I face is the execution delay caused by MT5's
[Deleted]
  The Ultimate AI EA Project  (57   1 2 3 4 5 6)
Hello everyone. I would like to call upon every worthy programmer and trader to a crucial mission. A scientific project of a respectable standard, with the aim of easing the developing MQL programs using every tool available. A good start would be creating a public project then let anyone willing to
I've an ea to helps me put an SL and pending limit order, with calculated lot size relative to SL distance, since i trade on very small timeframe, i have to managed the SL distance range be small and tight as well, the issue is, when the price hit SL level alongside the slippage (or whatever it
Good morning I tried the new possibility for inputs It works. That's already good news. input ( name = "Other symbol than the current one" ) string gu_symbol = "" ; input ( name = "Timeframe to apply the MA" ) ENUM_TIMEFRAMES gu_TF = PERIOD_CURRENT ; input ( name =
According to https://www.mql5.com/en/docs/series/copybuffer , we can simple use double indicatorArr[]; CopyBuffer (m_indicator.Handle(), 0 , 0 , 10 , indicatorArr); // puts the latest 10 indicator values into array But why do I see many examples where it is used like this: double indicatorArr[];
I don't know if I'm the only one who came to think that making a successful autonomous expert advisor is like playing a tedious chess game against the market. Some people may say that it is impossible longterm, however it will also depend on how positions are managed. The way I see it, a manual
Hello, I've encountered soo many EA's being sold at MQL5 that shows good backtesting result but always fail when used in Live environment. I know there are discrepancies with spread, slippage and all others between backtest, demo and live but it's easy to see if the difference is too big so that
I have an array-based index (i.e., the index comes not from a time series based array). Now I want to use this index : double high[]; m_high.GetData( index , numberOfBars, high); // Method from Indicator.GetData() with calls common CopyBuffer()-method However, since buffer access is series-based
According to https://www.mql5.com/en/docs/standardlibrary/technicalindicators/cindicators/cindicator/cindicatorrefresh, it is recommended to always call Refresh() when retrieving data with GetData(). However, looking at the standard lib code (e.g., ExpertBase.mqh ),it does not follow this pattern
Hi, I have read https://www.metatrader5.com/en/automated-trading/strategy-tester and https://www.metatrader5.com/en/terminal/help/algotrading/testing#forward But I still don't understand what is actually going on here... nor can I find a proper answer anywhere else thus far! What is actually going
Hello dev. I wanted to make a bot that interacts with an API i built . Only issue is that WebRequest keeps returning -1. Whet i run the same code in mt5 it is able to GET data from the API. I have googled and rummaged through other peoples code to no avail. I am guessing the issue is in the code of
Hi, is anyone else having problems with the WebRequest() function calling an AWS API gateway resource? The issue I am experiencing is that the "Connection: keep-alive" is automatically added to the header. I tried to overwrite it with "Connection: close" in the header, but I have read that this is
I am having trouble creating a snippet of code to sit within in a EA to close all trades at the end of the day. MT5 build number 5.00 build 5260 Account type Netting Tester settings Model: 1-minute OHLC My expectation To close the trade as close to EOD as possible, and on Fridays must close before
Do you think there is an EA that combines multiple MT5 strategies and manages them automatically based on drawdown, equity, or market conditions? Would that be useful or just overkill