Expert Advisors and Automated Trading

Let's look at the results of the tests on one and a few characters. The tests will be conducted in All ticks mode. You can use your own multisymbol EA schemes to reproduce the problem and share your results. Let us denote the problem. For example, if you test one symbol, the test time takes 1
Looking at the journal, you can see it is trying to modify the same position with the same SL and TP every tick: 2024.05.23 13:15:36.661 2024.05.01 21:00:58 order performed buy 1 at 1.06904 [#6 buy 1 EURUSD at 1.06904] 2024.05.23 13:15:36.663 2024.05.01 21:00:58 CTrade::OrderSend: market buy 1.00
Hi , i try to look if exist a oreder all close , i find many article but all example have this include #include <Trade\PositionInfo.mqh> #include <Trade\Trade.mqh> but where i find this library ? thanks
Hi Please help me out to debug problem/error in my code. I am getting different values for Highest and Lowest prices, though the data set is for the same period. The CurrOpen, PrevOpen and PrevClose are calculated correctly on each NewH01 bar, but Highest/Lowest prices are changed. Relevant section
Hi, Is it possible to add more than one EA to a single chart ? When I try, MT5 always remove the already installed EA... why this limitation ? Thanks! Erwann
So it seems that that 'classic' way to calculate ATR stoploss can fall apart depending on the brokers configuration for a <symbol> double CalcLots( double PctEquityX, double SlDistanceX){ double ticksize = SymbolInfoDouble ( _Symbol , SYMBOL_TRADE_TICK_SIZE ); //<-- Smallest px increment
Goal to get new specified Forex Session start-end times in CPRSession[] ... (Code in ' bold' letters) ForexSession are calculated and populated in cFxSession[day][sessionID] and arrayprint used to display calculated values. CPRSession[] is created to get particular sessionID start-end times (Broker
Hey guys, So, I have made a very simple EA, which does exceptionally well in backtesting (on some forex pairs. Not all, ofcourse - makes sense). In backtest, it makes approximately 1 trade per day - give or take. Although more forwardtesting needs to be done, it seems to do equally well when trading
  History deals  (4)
Hello. I want to get the number of consecutive losses from the history but I want to filter the deals by comment" ". So I noticed that the DEAL_ENTRY_IN has different comment from DEAL_ENTRY_OUT. So how do I retrieve the information? Code below int MaxConsecutiveLosses(){ HistorySelect ( 0
Hey everyone just wondering what peoples opinions are, I’ve come across this strategy quant program and the "quant analyzer" part of it looks pretty cool for doing the Monte Carlo optimizations.. I’ve been having trouble get good results in live markets even after getting good back & forward tests
Hi guys, I'm coding a range breakout strategy, and as the title says, I'm having difficulty with the that particular problem
Hello, what happened to http://ec.forexprostools.com/ this link is not commercial neither advert I dont see why moderator should delete it. I am trying to access the rss news feed on the link above but I am getting " You don't have permission to access / on this server. " what is the new alternarive
void Partialclosing(){ double ask = SymbolInfoDouble ( _Symbol , SYMBOL_ASK ); double bid = SymbolInfoDouble ( _Symbol , SYMBOL_BID ); ask = NormalizeDouble (ask, _Digits ); bid = NormalizeDouble (bid, _Digits ); for ( int i = PositionsTotal ()- 1 ; i >= 0 ; i--){ ulong posticket =
Can you tell me if this is a realistic tester figure? And is this a good or bad result for a year with a deposit of $3,000
Hello, Summary: I have an EA that loads several indicators as resources, and I've been using this EA since last year. My EA has been working correctly in the Strategy Tester until a recent MT5 release (I don't remember exactly which one), when I began receiving resource loading errors in iCustom. I
Hi, I'm facing a strange issue here. I have an Expert Advisor, "Main EA", which loads a custom indicator , "MW MSSS Rev Hammer.ex5" with iCustom. The whole code is stable for weeks and for weeks I have been doing backtestings without changing the indicator's source file, only the Main EA and even so
Hi everyone. During coding of my 1st EA, I always found a solution for every issue that appeared and everything surprisingly works well, so far.... till yesterday. I intend to code another of the functions - specifically: Re-entering a trade, if that trade ends on BE or in loss, but only if the
Hi, I'm trying to migrate an expert from mql4 to mql5, but I can't get the ticket of the new position that just opened. In mql4, OrderSend() will return the ticket automiticly, but in mql5, trade.mqh m_trade.Buy only return true or false. Please help me about how to get the ticket of position that
  Suggest
Dear MetaTrader Support Team, Iam Maurice Khalil .. highly value the innovation and efficiency that the MetaTrader platform offers to traders and investors around the globe. My extensive use of your platform has allowed me to deeply appreciate its powerful features, including the backtesting tools
hello, I can't access m_close (an array of close prices defined ) in ExpertSignalMACD.mqh that inherits from ExpertSignal.mqh even though CiMACD which is used in the ExpertSignalMACD needs it , because of applied price of MACD indicator . why in used_series of SignalMACD m_close does not initialize
i understand what the usage of ZeroMemory is. but then i see it was included on TradeRequest SL/TP modification . so, is it necessary to use it on pending order modification? because for each request-result action, the previous one will be overwritten right (cmiiw). all variables in my code will
I have been using AI to create custom expert advisor for my needs, I have provided code below for the custom EA that should send alerts to my telegram channel. There is no error in compilation. This ea sends initial message that "Alert system initiated" to my telegram which means that the API and
Hello! trying to make a VWAP indicator that will update the data based on a anchor point that is movable. Like a vertical Line will appear on the chart and from that line towards candle 0, prices are updated and calculated corectly. The problem that I have is with printing that VWAP line on the
Validation when publishing Expert Adviser I received a "Not enough money" error, how can I fix it? No issues were encountered in backtesting or live trading
Good morning, I have an account that I use to backtest strategies. I have a limit regarding the tester: It only tests 10K combination at a time and it doesn't apply the spread I want to use. I would like to change these settings but I don't know how to do it If someone know the way to changes thoses
Hi there, i'm not a coder and new to this, i am now trying to build an EA but keep getting errors in the below code but i have no idea what's wrong. is it a rare problem or anyone knows how to fix it? Appreciated for the help! //+------------------------------------------------------------------+
i have a take profit of " 150 " points but , I'd like to partially close a position if it get 50 points profits then modify the remaining position with a take profit ( 100 points) , here's my code the problem is that the position closes fully at 50 points , i understand why but can't figure out how
Hello, Sorry for the very noob question but I was trying to code with the wizard a VERY easy strategy => if price opens below and closes above EMA200 then take a Long. I'm able to set up the paramters with the wizard, but the only thing I don't see is where to actually tell the wizard/code that the
What is MQL5 Wizard : The MetaTrader 5 Trading Platform includes the MQL5 Wizard , which allows to quickly generate code of an Expert Advisor (Expert Advisor builder). With MQL5 Wizard, knowledge of programming languages is no longer a prerequisite for creating trading robots . In the past, it