Expert Advisors and Automated Trading - page 65

Hi there, I tried to optimize my program in the strategy tester. But when i maximise on balance max its seems that the EA doesnt have random end results: It seems to max out at 12080 and 8890 with no passes in between. The EA uses stop loss and TP and minimum amount of trades per pass is 200. What
I have thought that there might be some function that can get me previous Bid or Ask price similar to the one that give OHLC value. But I could not see any such function.    Please let me know how I can get the previous values of the Bid or Ask?
I am trying to calculate lotsize for my EA - everything is fine except the commission per lot aspect. Does anyone have idea of how to obtain commission per lot in mql5? I have seen some EAs that developers are able to account for commission per lot for a symbol. Anyone there to help
I have written an expert advisor in MT4 and I want to convert it to MT5. Everything seems to work except I can't open or close any orders. I used the function from the MT5 reference library: //+------------------------------------------------------------------+ //| Expert initialization function
Hi all, I am trying to add elements (values of an indicator), tick by tick, to an array. I managed to do it with the following code but I imagine there is a more practical way without all of the shifting. And obviously the code below results in some lagging. #include <Arrays\ArrayDouble.mqh>
Hello everyone, I hope you're well. Do you know of a free utility or indicator that provides a history of spreads within a candle, or at least retrieves maximum and minimum values? If not, is it possible to record the largest and smallest spreads for each candle and save them in a table? Do you
[Deleted]
Hello people. I am just starting out to learn coding my EA and its been a week of thick studying how best i can code it. This EA trades 1M candle open and does not have a Stop loss, and i am well with that. Can anyone help me with the code or help me complete the script. I would be grateful 1. I
Is there any way to collect market close time so we can close positions before market closes? No matter general or specifically for each instrument, to prevent market gaps' affections. It is MQL5 question, however if you have any solution for MQL4 too, it would be double appreciated
I have this situation where I exit on a bar that even exceeds its high/low on the tester. (See picture for reference). M5 Timeframe. Here is the code on how I exit trades. I have been using it since a long time. Its just accumulation of codes i read here and inputs of my own preference. void
I want to backtest one indicator named StableFX. But when I try to run the test "0" buffer of the StableFX indicator is -134, for example, but 0 buffer pulled with iCustom() is -65 on the same date. So the value showed by indicator and value pulled by iCustom is always different. I checked
  API on MT5  (10)
Hi, After reading https://www.mql5.com/en/forum/218890 and the update https://www.metatrader5.com/en/news/2187 as I understand regarding APIs for MT5 offers: 1) Python Integration 2) Server API (for brokers, not end users) 3) Web Api ( some third parties). 1) Am I missing some other as this seems
  EA news problem  (1)
I need the values: - news date and time (USD) - news impact type (USD) from uses in EA in the code i used string date=values[1] string impact=values[8] but it gives me error illegal operation use void OnTick () { //--- codice Paese per EU (ISO 3166-1 Alpha-2) string EU_code= "US" ; //---
Hello! I'm having trouble with a simple index counter in loop. I have tried every way to get it to work. * I have moved this function out of the OnTick section and called it as a separate function from there. * I have tried to include the moments of data array changes based on indexes when the index
Hi, There is an indicator I want to use in my EA and i have changed some of the inputs i've put the inputs i want to use in the iCustom function but when I run the EA and click on the indicator used, some of the inputs are staying at the normal values and not the ones that I want to use. For
  Data for backtesting  (30   1 2 3)
Hi everyone, I use MT5. I've been trialling the use of tickstory and Tick Data Suite (TDS) for sourcing symbol data for better backtesting. My trading strategies are based on the close of M15 timeframe and above so I'm not looking at HFT, more swing trading. Based on this fact I'm planning on using
  MA in my EA Code  (1)
Dear Coders, Would you tell me the if statement if i want to only take buy positions when price is above certain MA and Vice versa ? thank you
Hi everyone, today out of the blue i thought i would try cloud optimisations and i've been getting some strange errors.. anyone had this happen before
Dear all, I appologize if I ask something banal, but I have an issue with Strategy Tester (ST) in Meta Trader 5 (MT5), constantly stealin the focus from other open windows. Here is my situation: I developed a number of Windows batch files which I use for backtesting of the experts I am developing
I'm having the following error. Can anyone suggest a fix. I got currency data working by increasing the max bars, but not sure how to fix this error. TerminalInfo(community_account=False, community_connection=False, connected=True, dlls_allowed=False, trade_allowed=False, tradeapi_disabled=False
[Deleted]
I have a trend unfriendly (reversal) strategy which works well but fails well also. I have it coded by 90% but its in form of an indicator and not ready to run on strategy tester . If i want to know what caused failure, any optimization method or AI program may provide solution in a better way but I
Hello, I'm trying to think in a way (If possible) of having an Expert which operates in multiple Symbols at a time, but I'd like to get your opinion on the best approach. I have seen this post https://www.mql5.com/en/forum/212858, which shed some light into the problem, but I would like to use the
I am currently running my expert advisor on a demo to check the functionality and I got a message stating that it’s changing my lot size. I have never ran into this before. Does anyone know what this is from? I can’t find any information on it. “ 2023.07.21 16:09:28 - Check Lot: Lot has been
I'm 50 years old ... Programming tools, polishing my math a little, statistics, machine learning and optimization algorithms, etc etc ... My estimation is ... I need to spend the nights of my weekdays of my life for 4 years at least to get a robust and working knowledge in machine learning
  SymbolInfoDouble returning le-05  (34   1 2 3 4)
Hi, My apologies if this has been addressed before: Print(SymbolInfoDouble("EURUSD",SYMBOL_POINT)); is returning le-05 Print(SymbolInfoDouble("GBPJPY",SYMBOL_POINT)); is returning 0.001 which is correct I cant understand why EURUSD and GBPUSD etc all return le-05? MT5 version 5 build 1940. Any help...
I have an EA that open successive position, but instead of opening new position, it keep modifying the initial trade For example : . I open a but for 0.01 .i open an other buy instead of opening a new buy, it increase the lot size of the fisrt buy to 0.02 How to fix that
Hello everyone, I have recently encountered a question while designing an Expert Advisor (EA) using MetaTrader 5 (MT5), and I would like to discuss and seek help from all of you. My question is, can we create an EA in MT5 without having access to the source code or program of a specific indicator
I'm successfully selling CPU to the Cloud Strategy Tester. I have only the module installed together with METATRADER-5; I mean, I didn't installed the standalone Strategy Tester module. My question: do I need to keep METATRADER-5 opened to allow others to test (and rent) my CPU or can I close the
I have been learning MQL5 , and I have written some simple EAs. However, I have have the problem of evaluating my EAs. How to know if my EA is better than the average? When an EA is ready for demo forward-testing
Hello to everyone! Can anybody make it clear for me, why this amazingly sophisticated code does not work? So, the deal is I am dropping that Script onto my Graph, and as a result I get a Messege: Invalid request - 10013. To tell the truth this messege is not able to clarify anything for me. If you
Hi, I've programmed MQL5 for a while but don't know much about MQL4 and I need to convert some MQL4 code with trade function to work with MQL5. As far as I can see, MQL4 deals with both positions/orders with the same functions, whilst MQL5 has separate functions for positions/orders. For example, am