Expert Advisors and Automated Trading - page 33

Hi , I want to optimize a strategy with many parameter. It is advise to do it maximum 3 parameter per optimization to avoid overfitting, so the optimization will be run twice. Let's say I have 6 parameter to optimize 3 parameter for entry (indicator parameter) and the other 3 for exit (tp sl). As
Errors: 'TimeHour' - undeclared identifier Line 19 Column 28 'currentTime' - some operator expected Line 19 Column 37 'OP_BUY' - undeclared identifier Line 31 Column 46 'OrderSend' - wrong parameters count Line 31 Column 27 'OP_BUY' - undeclared identifier Line 50 Column 54 'OrderSend' - wrong
Hello everyone, I am new with VPS, so let me describe my situation: - I created my EA by myself and did the test with data in the past, the result is fine. - My EA has a function to hedge after putting a position in one pair with another pair. For example: Sell EURUSD and hedge with a Buy AUDUSD. -
Hello guys, i am having issue to convert this function "as is" to mql5. I include at top thiis library: #include <Trade\SymbolInfo.mqh> #include <Arrays\ArrayString.mqh> #include <MT4Orders.mqh> #include <InitMQL4.mqh> #include <mql4compat.mqh> the function is this one Decompiled source code removed
Hi everyone, Is it possible to display the constant as text, for example: TRADE_RETCODE_DONE , instead of the return code: 10009 , I thought of the EnumToString function, but to do that I'd have to get the enumerator name? Thank you in advance for your insights Best Reguards, ZeroCafeine 😉
Hello, I have just set up my new laptop and I have a problem with the backtest speed. By running the same backtest, with the same EA, with the same parameters, on the VPS I was using till today it takes around 1 hour. VPS RAM 4GB VPS Processor 8 cores On my new laptop it takes a lot more. New Laptop
datetime day_time = iTime ( Symbol (), PERIOD_D1 , 2 ); double day_price= iHigh ( Symbol (), PERIOD_D1 , 2 ); int shift= iBarShift ( Symbol (), PERIOD_M15 ,day_time); datetime actual_time = iTime ( Symbol (), PERIOD_M15 ,shift); double actual_price = iHigh ( Symbol (), PERIOD_M15
Hi! I'm running a bot that i like very much. Anyway, would like to know if is it possible to add some general risk management directly in the account, bypassing the single chart with the single ea running in. From my search, the only way that seems possible is to do sorta of copytrading and add some
Is this a typo or does this make some sense? https://www.mql5.com/en/docs/basis/types/classes#initialization_list class CPerson { string m_first_name; // First name string m_second_name; // Second name public : //--- An empty default constructor
I know OrderCalcProfit() returns the profit/loss of a hypothetical position based on open price, close price, volume etc. how can one do the reverse calculation ? I need it co calculate the price for trailing SL. for an open position (which Open Price, Volume, and Symbol are known) how can I
Hi, I am using mt5. history_deals_get to download all deals. One issue I am facing is when multiple position is opened , and if I close them in a different order, it is quite difficult to identify which one is closed. There is no common identifier for the same trade (deal showing as as separate open
Hello everyone am have been trying to count down or simply count a boolean condition where So in the code below I have tried to go over 20 bars and using time differnce check if there is a double ma cross over but unfortunately this code doesnt seem to work it neither recognizes the first nor the
Hello community, came across a strange problem: It seems that calculations of double numbers can get unprecise. The script below should demonstrate this. After a couple of runs, 2 double numbers which should be exactly the same are sooner or later not same. void OnStart () { double NetPosition=
I have been experiencing a lot of bugs in the forward tester. One is that if there are more than 65536 passes to do in the forward tester, right at 65536 it stops finishing passes. I get an error that says xx forward passes not processed and returned to task queue. If you try to stop it or close it
  MT5 forward testing bugs.  (18   1 2)
This post is about a some weirdly related (I think) bugs that happen when forward testing optimized results. Please read through it all. The first bug is that the displayed results from the top section of backtesting passes in forward tab are wrong. (Highest scoring passes in the backtest category
Hello, I added a couple of EAs to my charts, they work perfectly but I am unable to save my custom setting as ".set" files. At the same time the EA do not upload the factory files from the Author that came with the purchase. Someone knows if I have t activate or change something in the MT5 settings
Dear Traders I want to get Daily Changes that shown in Details tab of Market Watch. Thanks
Is there a way to override the WebRequest headers added by default, such as Accept-Language? The default value for Accept-Language, I suppose, depends on the system locale, so for me it's ru,en;q=0.5 which means ru locale with weight 1 and en locale with weight 0.5 . My goal is to get a response
How can I send multiple requests at the same time. When we send multiple requests simultaneously, there are several milliseconds between requests. What suggestion is there to eliminate the time difference request.
Hello so i'v got this Ea code that works fine but sometimes after 1 or 2 good sessions day's it stops working. I have been using it on VPS . Maybe i can past the code here and someone can help me. I have attached text file with code. File attachment corrected by moderator
hi i`m at my wits end trying to find out how to contact the developer of [redacted] trading bot . no matter where i go or what i try i just cant understand what is required to access support from this developer why does it look so complicated just trying to get in touch with the developer
Hi everyone, like the title I have this weird problem The onInit function is the following. The symbols are stored in the input variable Symbols separated by ",". I have some array for checking new bar in different timefrimes (such as TimeLastCheckTickProcessed) for each symbol and then I have an
Sir, I am getting 2 Warning but I tried " (string) (Font_name) " . double Balance = AccountInfoDouble ( ACCOUNT_BALANCE ); double Equity = AccountInfoDouble ( ACCOUNT_EQUITY ); string Balance_text = "Balance = " + DoubleToString (Balance); string Font_name = "Tahoma" ; // Set Create
How do I test an EA in the demo? I'm clicking the DEMO button, but nothing happens
Hello friends When running the code, how can it detect that Metatrader is closed and restart
Hi, besides EAs and indicators, there is this service-thing. I remember I read somewhere, that such can be used to support custom-symbols. Is this possible? What I would like to to is to restrict a given symbol, like EURUSD, and then restrict it to specific trading hours, e. g. from 7:00am to 7:00pm
Hi, I want to run a code once a month on OnTimer() function and here's how I do it. void CStrategy::OnTimerEvent( string & SymbolArray[], int numberOfTradeableSymbols, string FileName, TRADE_DIRECTION TradeDirection) { MqlDateTime dt; datetime now= TimeLocal (dt); //if not saturday and at
//+------------------------------------------------------------------+ //| SMABot.mq5 | //| Copyright MetaQuotes Ltd. | //| https://www.mql5.com/en/users/metaquotes&nbsp ; |
This function is taking only one trade, when the positions is greater than 1 then it is supposed to take entry on every 200 points. example. first buy trade was taken when market was at 1.5000 now the second trade is supposed to be taken when price reaches 1.4980. i am attaching my ea code file as
*edit: when I posted the thread, I was confused about the correct way to calculate position size based on entry price and stop loss price, so don't take anything I say here as truth, unless someone else verifies it in the comments.*