Expert Advisors and Automated Trading - page 27

[Deleted]
I'm consistently receiving error 5273 when invoking SocketRead MQL5 API. I connect to the server from an MT terminal and would like to check periodically if some data have arrived from the server. Here is my code: if (client== INVALID_HANDLE ) return false ; uchar rbuf[ 512 ]; uint rlen=
Can someone please explain genetic optimization. I am reading Auto-tuning: ParameterGetRange and ParameterSetRange and my question is if this approach can be used with genetic optimization or only with "slow complete algorithm". The author has two input params FastOsMA and SlowOsMA and the rule is
Hi , but if i not have history , how can recover a commission of instruments ? thanks
Hello everyone When I use the iIchimoku function in MQL5 code, the Chikou Span value, which should be equal to the current candle's close price, is incorrect and returns a wrong value. Could you please guide me? Thank you
Hi, It suddenly appear that on my MT5 with a new adviser, after fast test, I got a list of optimization results, when I double click one of it, the result on backtest and graph doesn't match the profit result on optimization results. Here is the backtest result when double click above Pass:4 504
I am at a total loss of understanding. I read this thread: https://www.mql5.com/en/forum/326554 and tried using the news.mqh file and couldn't get it to draw lines properly, so then I have tried using Rene Balke's CalendarHistory.mqh file and it seems to correctly save all the values in a script but
Hi i have a and expert in ontick it call 2 function void OnTick () { CALC_DATA(); DrawLine4SnipeAll(); } void DrawLine4SnipeAll() { //Print("object_line4SniepAll: ", object_line4SniepAll); // Creazione della linea se non esiste if (g_dominance == "BUY" ) { if (
Hi All, If I run the onTick function to tell me CurrentTime, how can I filter the EA to do actions only when the time is :00 seconds? Thanks for the answers
How to copyright / protect your expert advisor for MT5? Which code should be added? Or when you want to copyright to a certain ip address or Name of User
Hi, I'm trying to test a strategy in MT5 created in SQ. In SQ, the strategy looks great, but in MT5, it doesn't execute any trades. The tester log shows the following message every time it apparently attempts to execute a trade: Any idea what the error could be? 01:10:43.129 Core 1 2024.02.16
  Neural network  (6)
Where can I learn neural network in mql5? Or which book can I use to learn neural network in mql5 or mql4
string TestROC_( int nPeriod, string cPair) { int i; int sizeOfnResultROC = nPeriod; double nResultROC[]; double nResultClose; double nResult; double nResultAbs; double nResultA; double nResultB; int nRow = 2 ; int nCol = 3 ; ArrayResize
I’ve recently started programming and I’ve encountered a small issue. I’m using MetaEditor through my broker’s terminal (Puprime). After compiling the file and sending it to someone using a different broker, they receive an error message stating that a newer version is required. Does this mean I
my source: if (condition1) { operator1; } else if (condition2) { operator2; } else if (condition3) { operator3; } //but metaeditor " catl+," format this: if (condition1) { operator1; } else if (condition2) { operator2; } else if (condition3) { operator3; } my condition1,2,3 are same
  Closing a trade.  (1)
Good day. Say someone asks me to "Modify their trade closing by Including a delay to function A" Function A closes trades when an indicstor gets a particular setup. When modification is done as per specific requirements. How ever clients main problem wasnt what they asked for. But it is that
I am coding an EA for trading SAR. My bear positions, based on the SAR, never action. All bull positions work fine. Using counters for each function I have confirmed that every function works as required. values. in the below code simply refers to a pre-made structure. void OnTick () {
How to write iCCOnArray for RSI in mql5
  What is wrong?  (2)
string cciOnRsi_ ( int nPeriod, string cPair) { double rsi[]; double cci[]; ArrayResize (rsi, Bars ); ArraySetAsSeries (rsi, true ); for ( int i= Bars ; i>= 0 ; i--) { rsi[i]= iRSI (cPair,nTimeFrame1,Period_EA, PRICE_CLOSE ,i); } double cci[i] = iCCIOnArray(rsi, 0 ,Period_EA, 0 );
I am writing to report a persistent issue I am experiencing when compiling MQL5 code in MetaEditor. Problem Description: When compiling code that calls the symbolInfo.VolumeStep() method from the CSymbolInfo class (included via <Trade/SymbolInfo.mqh> ), I consistently receive the errors 'VolumeStep'
How to write this mql4 code to mql5: string TestCCIonRSI( int nPeriod, string cPair) { int sizeOfaNizDan = nPeriod; double aNizDan[]; int i; double nResult; int nRow = 2 ; int nCol = 3 ; ArrayResize (aNizDan,sizeOfaNizDan); ArraySetAsSeries (aNizDan, true ); for (i =
Dear all, After many months of back-testing with Expert Advisors (EAs) I wrote myself in MT5, I decided to dive into live trading. But, for about a week now I am stuck. I log in to my live account, open the chart of the instrument I want to trade, drag my EA to chart, I enable algo trading both in
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