Expert Advisors and Automated Trading - page 31

Hi, I am currently developing an EA for MT5. The bot is running well on the EURUSD chart but the strategy tester doesn't execute any trades. Can someone help me please
Hello! I just used the profiler on historical data to see which functions take the longest and which use most of the CPU. I was suprised that the profiler only shows the total CPU and self CPU. I used the profiler quite a while ago and I thought I remembered that it also shows the functions call
i have an expert that open some trades , i need another expert that addresses those trades (by tickets or something else) and close them . thanks in advance
I wanted to try Larry Williams' Trading Day of Month strategies, but I had a hard time figuring out how to calculate the current trading day of the month accurately (basically similar in concept to business day calculations in Excel). I could not find code on this site for it ... I am SURE someone
Hi, What is the fastest way to get the last quote for about 10,000 symbols and keep them updated? I want to make kind of a server to communicate to delphi. I tried MqlTick ticks_array[]; CopyTicks (symbol_name, ticks_array, COPY_TICKS_ALL , 0 , 1 ); To get the quotes, but its slow and does not
Hi everyone, I hope you're well! I've started programming a little expert advisor. When I press a button, it draws me the TP, Entry and theoretical SL lines, with the position size calculated according to the risk I've predefined, as shown in the following image. I think I've made it a bit difficult
I recently noted an EA with some amazing performance even in my own backstesting of it (a 98% accuracy, a 49 profit factor). The user interface is pretty simple and very few parameters one can modify other than the number of entries and how big they can be. It can only operate one pair. Of course
Hello everyone, good afternoon. I'm seeking guidance on the feasibility of conducting backtesting using the Strategy Tester + Strategy Optimizer, specifically for a specific month within a defined range of years. To be more specific, I would like to know if it's possible to select, for instance
Sir, I have 20 StopLevel & 19 Spread in OctaFX Broker. I am getting too many error "Invalid Stop".....(Please see this Attached Photo What am I wrong this Source code ? //+------------------------------------------------------------------+ //| Breakeven Gain & Breakeven
Hi everybody, I need small help, i have written a EA and back tested , want to test it in Live. Is there anyway to do that, don't want to do auto trade. I want to run EA with latest current data. is it possible in MT5? Every time i run, it gives data until 1 night before. Thanks and
Hello Community, i just figuring out, what expert in the market is might really suitable for me. So far, could not get the demo installation to create a single trade. Instead i get various errors, like 2024.01 . 16 17 : 34 : 12.377 Core 01 2021.08 . 01 00 : 00 : 18 CTrade:: OrderSend : market buy
hello everyone how can i find the date of previous year and use it as an anchor point
I AM NEW TO VPS. I RECENTLY BOUGHT MY FIRST VPS. THIS MORNING MY EA SOLD EURUSD AT PRICE 1.06061. TRAILING STOP WAS SET 5 POINTS IN THE EA. EVEN THOUGH PRICE WENT DOWN 2 PIPS, THE TRAILING STOP WASN'T INITIATED. DURING THIS TIME THE PRICE WAS EXTREMELY VOLATILE AND MOVED LIGHTING FAST. MY QUESTION
I use the code, got the profits = 0. Please help me correct it. thank you. #property script_show_inputs input string com= "break" ; //+------------------------------------------------------------------+ //| Script program start function |
pip install MetaTrader5 ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none) ERROR: No matching distribution found for MetaTrader5 anyone knows how to deal with this
i want to create an expert that use dark bands indicator? but it is complicated. can any body helps? first problem is icustom function.when i use iCustom ( _Symbol , PERIOD_CURRENT , "Dark Bands MT5" ) it works but i need complete dark bands variable in icustom. because i want to change the
For mt5, I uploaded an ex5 file to the mql5 market several days ago and the validation was complete. But the process was terminated when I was busy. But when I try to upload the same file again the next day, it shows"Please recompile your file with new compiler", but the two files are exactly the
Hi all, I'm using the function PositionsTotal() to get the number of open positions, due to I'm using a hedge system. int num_positions=PositionsTotal(); but at each iteration it returns always 0, even if I opened two positions. What's wrong? Thanks
gidday. I have my ea that I normally only trade 1 or 2 pairs, BUT I want to use it on more pairs now. This function which determines its trail stop and stop loss depending on a bool; true or false function like so... bool margo() { if (equ< 0.85 *bal) return false ; if
I working with mql for a while and made some indicators and EAs. I notice that human made operations (press buy/sell button) are faster than EA operations (less delay between the action and the response). I always thought that it was only a mind trick, but I talked with a guy that work in a broker
Hi, I have an ideal that I can get lot size by amount of money at risk. But MQL5 doesn't have a default function to do that. So I create a function like: double GetLot( ENUM_ORDER_TYPE type, double SL, double openPrice, double moneyAmount) { if (moneyAmount == 0 || SL == 0 || openPrice == 0 )
I put an indicator on the chart and created a sub-chart and drag drop moving average on the sub-chart. I want to code a signal when moving average crossing the indicator then open or close the trade. The problem is that the moving average value difference is large (like photo attached) so that I
  MQL5 structure  (2)
I've made the overall code much simpler by avoiding candlestick type recognition, SLs etc but problem remains the same. How do I avoid the print statement from repeating itself ? //+-------------------------------------------------------------------------------------------------------+ //| Global
Hi, On MT5 when an EA is loaded and on inputs panel there are 4 options for the Filing of Orders (i have listed them below) But can someone please explain the difference between all 4? there is 1 - Order_Filling_FOK 2 - Order_Filling_IOC 3 - Order_Filling_Return 4 - Order_Filling_BOC Many thanks
Hello, Been researching and stuffing around for days, is there a method to consolidate multiple backtest reports into one? I've tried [name redacted] which sort of works but the report it generates is vastly different to that what MT5 produces, besides it doesn't report equity drawdown which is
Good morning I looked at a lot of code on this subject Codes in codebase, in this forum, and in the official doc https://www.mql5.com/en/docs/series/timeseries_access In the comments of this code we can read for the checkloadhistory() function //--- force timeseries build with copytime() //--- ask
Subject: Need Help – Experiencing Issues with MetaTrader 5 Account Switching Hello everyone, I hope this message finds you well. I'm currently facing an issue with my MetaTrader 5 setup, specifically with the account switching functionality. Despite my efforts, I'm unable to switch between
I am trying to upload an expert to the market, but I get an error code whenever it tries to validate: tester stopped because OnInit returns non-zero code 1 int OnInit () { if (!m_symbol.Name( Symbol ())) return ( INIT_FAILED ); RefreshRates(); m_trade.SetExpertMagicNumber(m_magic);
Hi! I've been struggling with an assignment for a while now. What if you don't want to use oncalculate function and indicators but build EA without using indicators. how can indexed time series as systematically rereadable arrays be created in this case ? I know that some pre-defined functions such
Hi, I can't seem to get this code to work. I want to know drawdown (ideally including swap+commission but I can live without those if needed) created by all running trades for a magic number. Here is the code I'm using (the EA is bigger but I think that these are the relevant lines): #include