Expert Advisors and Automated Trading - page 28

Hi, I made an EA (this is my first Ea) and when testing it, even there is no date and time variables on it, the orders on Friday are not executed and the Diary send a message "market closed". The startegy is based on the direction of an MA and it has 3 variables for stop loss (stoplosspoints
Based on the documentation which lists a Login and a Password entries, I thought creating my custom config file that would allow me to run EAs programatically from a Windows command line should be a relatively straightforward task. I created the following very basic .ini file, almost identical to
I have a question about this mt5 python solution, do i understand this solution correctly, you need to install for every mt5 account into which you want to login also a seoerrate mt5 terninal on the same comouter? Or can you just login to any mt5 account with this python libary without need to
i am fairly new to coding. its been two days since i have been working on this. compiling it brings 2 errors, i have checked the trade mqh file for help. but made more errors on the way. here is the code. #include<Trade\Trade.mqh> // Create a Ctrade instance void OnTick () { // create an empty
Hi all, I came across a youtube video someone (Can not find the video i searched history on every browser and phone) was making code changes to position sizer from earnforex to have an indent on breakeven of specified value and also for the trailing stop to start once tp1 is achieved instead of
Hi, i have my personal money management Expert and send a sample of my expert to prop-firm provider. they told me that i'm not allowed to use this expert and have to use other experts that confirmed by them. in this regard you are kindly requested to let me know if i use my personal expert, how
good day. I need some advice: when I run some expert EA on a chart for "test" and the "Strategy tester" opens under the chart, after the back-test is done, I right-click on the fourth tab "Backtest" and select "Report" at the bottom and "Open XML ...". I save the file to disk and open it and there
What do you guys considerer essential in risk management and account protection? Anything other them, auto flattening by time / loss / profit, max trade count, max loss sequence, daily profit protection using trailing features, maximum open trades count, maximum open risk
//+------------------------------------------------------------------+ //| OxygenAI.mq5 | //| Copyright 2025, Hüseyin Avni Ekmekçi | //| haekmekci@hotmail.com |
Hi to alla guys , Wile i was trying to set my EA code for a strategy in AUXUSD I get a strange value for SYMBOL_TRADE_TICK_VALUE, spcifically this is my code snippet : int OnInit() { string szSymbol = "XAUUSD"; bool selected = SymbolSelect(szSymbol, true ); // select in market Watch bool found =
From my understanding ObjectCreate() can only draw lines on the chart_id which is always the current chart inside the strategy tester . bool CChartObjectVLine::Create( long chart_id, const string name, const int window, const datetime time) { if (! ObjectCreate (chart_id,name, OBJ_VLINE
//+------------------------------------------------------------------+ //| OxygenTR.mq5 | //| Copyright 2025, Hüseyin Avni Ekmekçi | //| haekmekci@hotmail.com |
//+------------------------------------------------------------------+ //| OxygenTR.mq5 | //| Copyright 2025, Hüseyin Avni Ekmekçi | //| haekmekci@hotmail.com |
In OnTick(), if i want sell gold in $ 3230 , due to delays in broker,the next tick not find 3230 Position,repeated sell,i used Sleep(),but not much effect. Is there any other way
Hi everyone, I'm looking for a lot size that will be result in margin used equal to 1% of account balance across the different instruments I'm looking for a lot size calculation that will "normalise" any forex pair/commodity/crypto to use a margin equal to 1% of my account balance per trade (no stop
Hi there, does anybody have a remedy to this: Whenever an indicator is included via iCustom() or IndicatorCreate() in an Expert Advisor, and that Expert Advisor is then tested in the Strategy Tester (in visual mode), the included indicator also shows in the Strategy Tester . According to
I use SOA to distribute processed data . So, to make life easier i tried to use the ArraySetAsSeries() function for reverse access. For some reason ArraySetOfSeries() does not reverse my indexing order, I don't know if I'm doing something wrong or is it not supposed to work only with OnCalculate
I've been trying to calculate target price for a given profit value (in account currency) but I have failed! I've opened a position in USDJPY and with the following state: Volume: 0.01 Entry price: 152.982 Current price: 153.449 Current profit: $ 3.60 Now I'm trying to calculate the profit in MQL5
[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