Expert Advisors and Automated Trading - page 26

I have an EA that places limit orders according to the price level. So sometimes it is necessary modify them to adjust to the current price. Is there any difference between using the order modify or just cancelling the orders and replacing them again? I know in the end both will do the same thing
Hello, wondering if anyone could help out, im trying to code my EA in Mql5 but i get this error, Any help on how to resolve this. Thank you in Advance Note: The starthour and endhour are already defined Part of the Code concerning time... void OnTick () { datetime currentTime = TimeCurrent ();
Could you please explain how you conduct backtesting for trading strategies and how you determine when it's the right time to start live trading
To all users that seem to want to ask questions in private instead of the forum, please don't. Ask your questions in the forum, not in private. Reserve the private messages for truly private interactions only, not generalised questions about MetaTrader , MQL or other generalised queries. Anyway, I
Hello Does SELECTION _BY_POS exist in MQL5
Hi all, is there any way to access the built-in economic calendar during backtest? I tried CalendarValueHistory and while it does give proper results when executing the code on a live chart, it returns no results during backtest. Thank you in advance
  Bug in strategy tester  (67   1 2 3 4 5 6 7)
Hi there. I searched the forums but could not find an answer or similar existing topic. The issue I have for a while with MT5 is freezing after selecting "Run single test" from optimization results window. The version I have is latest version from my broker (version 5.00 build 4153 dated 22 Jan
hi, i would like to use the MT5 strategy tester with an Expert Advisor running these variables: leverage 1:1000 account size USD$100, $300, $500, 1000 is it possible? i have been searching for articles on this (forum, google, etc.), but to no avail. thank you
I am using MT5, and when I use a yen account, ea using Opencl, I get "cannot get Opencl platforms please install opencl drivers" and "opencl dll not found please install I get the error message "Opencl drivers". Dollar accounts can be traded without problems. I have the same situation with several
I have been reading that news filters based on the MQL5 calendar do not work in the backtesting mode, and that a likely reason for this is that historical news data are rarely available and/or reliable. Yet, when I look over the data available in the calendar, I see news back a few years. So could
Hi Guys, Thanks for your time to help! I wrote my EA to have ALLOT of optimization parameters and tried my best to us the initialization codes to return error codes if the optimization parameters doesn't make sense, thus trying to reduce the time spent in optimization for scenarios that just doesn't
  Too many positions  (10)
Hi everyone, i have a problem on my EA, which works with a grid system. The system should open a new buy position when bid price is 180 points lower than last opened position price. This level is called "nexyBuy". The problem occurs only on certain moments, for example backtesting with usdcad on 10
  backtest mt5  (7)
hello!! in my robot i see big results but in demo account no....where is problem?? look and the foto an dplease help me what need to do,thanks a lot!! lot/
im trying a basic stochastic EA which works great until it doesn't. I've put just a stop loss in the input variables clicked Ok but the stop loss doesn't show when back testing. anything silly I've missed?
folks, how do i detect if a trade transaction was a stoploss hit and that it had closed the position? some code i tried : void OnTradeTransaction ( const MqlTradeTransaction & trans, // trade transaction structure const MqlTradeRequest & request, // request structure const
MT5/Any Trade platform question - As an example, Imagine, Your Account Balance - $10,000, you risk 1% per trade ($100) You want to place a trade and your - Entry Pirce - $100 - SL - $50 - Target is $150 - Question 1 - Is it possible to split your profit in to 3 ? ( I want do this automatically for
Code compiled, with out error. but alert not generating. Is there is any method to verify and correct the problem // Global variables to store spread data double openSpread = 0 ; double highSpread = 0 ; double lowSpread = 0 ; datetime openTime; datetime highTime; datetime lowTime; double lastSpread
I tested not only my bot but famous [redacted] through [redacted] broker and i had this issue while doing so, but the code is ok, no fobidden functions, etc... No 2025 backtesting is being possible to be done. What can i do
I am wanting to run my ea on a US broker under fifo rules. the bot doesn't have to average often but when it does it can take up to 4 trades in the same direction on the same pair. all trades on the same pair and direction are all of the same size. they do no increase when it does this, it will
hello friend i have been creating an EA with a stop loss and a trailing stop loss but the thing on my first EA i uploaded on the market i was successful but the thing is im having problem to upload my second EA cause it have stop loss there is anyone with help cause im stuck but the thing is working
Hello, how can I write the expert code on my mobile
Two different charts open on two seperate tabs. If i dont want EA to run on one tab/chart I disbale "live trading" in the common tab, but this disables the EA in **both** tabs. Is it not possible to have the EA running in just the charts I choose
Hello again. I'm building my strategy and it's becoming big, and I need a better way to manage how the objects interact with each other. I'm new to OOP. Can I generate signals—events like—instead of manually checking for conditions on every signal object from the trading class? Then, the trade class
  Failed EA upload  (4)
Hi, i have a product for sale that i have updated a few times. Had some errors on update. volume and not enough money errors. Which i fixed. I have the latest version ready to update. I added EnableTimeframeTrendFilter = true; // Enable trend filter on H1 and H4 and Trading modes. Trading modes is
I created a working script, but when I load it to the chart I don't get Input Window like I get loading an EA, It loads automatically with its defaults. What should I do with it? I remember, I started learning mql5 , and back then it always asked for submission with an input window
Hello, Any expert advisor or script out there that when I open a trade it automatically places stop loss based on Previous X Number of candles high/low (Buy order the stop loss will be on previous X number of candles low and vise versa) . And not tied to any pair (open for all pairs and markets) on
Hi all, I have a question regarding the following issue: The second-generation i5 CPU delivers roughly three times the performance of a Xeon, yet their Single Thread Ratings (Xeon is 1117 vs. 1492 for the i5) don’t indicate such a large gap. What could be causing this significant performance
Hi All, I am having this error when calling OrderSend function . I hope someone can help me. This is error log : 2021.11 . 11 04 : 10 : 45.254 TEST (EURUSD,M5) Alert : Open market order: Error 10013 - Invalid request 2021.11 . 11 04 : 10 : 45.254 TEST (EURUSD,M5) MqlTradeRequest - action: 1
Hi, I have run 10 genetic optimisations across various markets and backtest / forward test periods. All the tests consisted of the same inputs. Now that I have run these tests I wanted to view all the forward and back test results, but only 4 of the 10 had the forward results saved and the forward
Hello there! :) At start ill say that im beginner writing EA's but im trying my best to improve each day. I have just managed to put all function together, at least what i thought, no error, compiling no problem. But when i put it into test, indicators load, but it doesnt take a trade, if anybody