Expert Advisors and Automated Trading - page 15

Hi i am newbie in programming. i want to develop simple EA that trade once every trend confirmation, but in my code the EA open the trade in every bar after trend confirmation. if (trend[ 0 ] == - 1 ) // -1 means sell { obj_Trade.Sell(LotSize, _Symbol ,bid,bid+StopLoss* _Point , bid-TakeProfit*
  What is wrong?  (1)
for the ParSar: double GetSARValue( string cPair, int nPeriod, int bar) { double sar[ 1 ]; int sarHandle = iSAR (cPair,nTimeFrame1,Step,Maximum, 0 ); if (sarHandle!= INVALID_HANDLE ) { CopyBuffer (sarHandle, 0 ,bar, 1 ,sar); } return (sar[ 0 ]); }
I am learning how to code in mql5, I am trying to make an EA but can't be able to get the correct indicator values for each candlestick, I hope some experienced programmer can help
Hi all, I'm using #property tester_file "tester_configs.bin" to pass a binary file containing pre-generated JSON configurations to my EA. This used to work perfectly for the past 3 months, but now for some reason, Mt5 refuses to copy my tester file when starting the optimization process. The file is
Hello guys i want know is it possible for an ea to trade a small balance of $10
Hello everyone.I´ve been experiencing an issue, on my MT5, which seems to be a setting one, but can´t figure out why. I can´t execute a delete PENDING, non from a MQL5 bot, and from PYTHON API either.Both bots seem to be correctly coded, MQL5´s one compiles well, and works in Backtesting, but when I
Hi All Some assistance, has anyone seem this error before on Mt5. " Order Failed! Reason: Unsupported filling mode" 🚀 Placing Immediate BUY Order: XAUUSD 📌 Supported Filling Modes for XAUUSD: 1 📌 Sending BUY Order: XAUUSD @ 2936.88 (TP: 2966.88, SL: 2916.88) 📝 Order Request Details: {'action'
Hi all, I use several different scripts which I just drop and drag manually to charts. Is it possible to automate this? For example at the commencement of the 16hr candle, call Script 1 to EUR/USD chart. Thanks in advance
  Yearly OHLC  (4)
Hi! I saw it's possible to get the OHLC of the month using the enum time frame, is the same possible with a yearly time frame? Thank you
I noticed this behavior start once I restarted MT5. I don't think there was any updates when it restarted. I'm currently running MT5 Build 4831. Context: My EA will place a buy order every time the previous candle closed below the lower Bollinger band. So when there is a new bar I check if the
In MQL5 I get this error: wrong parameters count for iSAR: string TestParSar_( int nPeriod, string cPair) { double nResultClose; double nResultSar; nResultSar= iSAR (cPair,nTimeFrame1,Step,Maximum, 0 ); nResultClose = iClose (cPair,nTimeFrame1, 0 ); if (nResultClose < nResultSar)
Hello everyone! I am looking to employ a trading system that takes entries & exits according to price action. I am interested in a free expert advisor that uses Bollinger bands as an indicator. Once price exits the upper Bollinger band an entry would be taken declaring a breakout (vice-versa for the
I am trying to code 'correctly' and efficiently in MT5. I have an EA that loops through different currency pairs and for each currency looks at an Indicator using the iCustom function. As I understand I don't need to RELEASE a handle but .... 1. Do I need a separate HANDLE for each currency PAIR
Is anyone able to use the cloud protector as of February 16 2025? It can’t connect to it. Thank you
There are some groups of people out there who used a step based ATR trailing stoploss for their trend following systems so I decided to code this since I couldn't find any free source code out there on the mql5 forum. It seems to be working properly for me right now so here is part of the source
I've been backtesting a US30 EA strategy. The results seem promising, so I'm testing over a longer timer period. When I expanded the test date range to 2 years, I hit a snag where the data quality, according to the Strategy Tester backtest tab, dropped to 20% - obviously not good. Their US30 data
It seems like SymbolInfoSessionTrade() has changed recently. In my EA I check for the end of the session time, calling from OnTimer() and send a message at the end of the session. This has been working fine for more than a year. Recently, I'm receiving those messages on the weekend, when the server
  "Day of month"  (4)
Deleted/undeleted by moderator William Roeder (wrong post) hi. how can i get day of month in mql5 in integer? I easily used : TimeDay(Time[n]) for comparing, but in ME5 I can't find anything like this. Can someone explain it to me or show me how to write it, cause I'm not a pro coder? thanks
I wasn't able to find any documentation on how to override the CObject virtual methods Load, Save, and Compare to make use of(CList and CArrayObj ) load, save, and sort features - so I managed to hack my way through it. I'm posting it here in case anyone else is interested in using the
Anyone who can assist me with a free python bridge that links mt4 and python so that l can establish comms btwn the two and test my EA
Hi all. Thanks for all the help so far with a few questions I've posted recently. Here's another. Well, a bunch of related ones... I've read a number of posts and the doc'n about Order vs Deal vs Position, including this documentation , and this , and others . A few things I'm unclear on, and
Hi all , i have bought an EA but it doesn't work. I tried to reach the author but he doesn't respond. The issue is that the EA stop after few second is lauched with reason 9. This happen in both backtest and live. I have tested ICMarkets, AXI and Roboforex, it has the same behaviour on all the
Hello everyone, I’ve noticed that in the standard MQL5 library ( Expert.mqh ), the CExpert class (derived from CExpertBase ) implements its own Init() method without calling the parent class’s CExpertBase::Init() . This seems unusual because: Inheritance Principle : Child classes typically call
Hello! In this module, it is supposed to close half the volume after the price moves 10 pips into profit and move the stop loss to the entry point plus commission. However, unfortunately, after 10 pips of profit, the entire volume is closed in consecutive positions. Module code: void
Hi guys how calcolate a stop loss with ATR ? anyone have some example ? i find but not have a good example i tryed double atrSL = 2.0 ; SL = NormalizeDouble (OpenPrice - (ATR_Value * atrSL), Digits ()); but not return me a price correct
Hello, I am new to this? Is there an solution? I don't want to open a new chart for every pair, when I also want to trade manually together with expert advisor, so I want to open also manual trades from there, but without getting interrupted by the EA. The expert advisor has a setting with hidden tp
The product rule -: " Embedding any limitations by time, account type or number, financial instrument, etc. into your Program is prohibited. All such actions will be considered as unfriendly to the Buyer and are prohibited. " I want to code an EA to work only on special instrument also in specific
Im fairly new to all of this and I got started by watching a video of a guy who explained a simple EA called "simple MACD expert". Its a free bot from the market place. The guy in the video I was watching is using the same bot and even the same version and his was displaying a magic number in the
Hello everyone, I'm experiencing an issue with the activator in my EA. The EA is supposed to validate a license key by contacting a verification page using the WebRequest function. Although the EA appears to connect to the page, I never receive any response. In the Experts log, I see the following