Expert Advisors and Automated Trading - page 76

HI, I'm coming from Excel VBA and relatively new to MQL5. In VBA IDE, we can set a condition formula in Watch Window (e.g., Var1 = 3, Var2 = 7, etc.) and Debugging will pause automatically when that condition becomes true. In MQL5 IDE, can we do something similar without having to insert
//I have a problem that I need your help to suggest. In the backtest process, there is only one open order. after it closed There are no more open orders. How do I fix it? #include <Trade/Trade.mqh> CTrade trade; //+------------------------------------------------------------------+ int
no errors, but no trades are done while testing ... why? //#include <MetaTrader5\MetaTrader5.mqh> #include <Trade\Trade.mqh> #include <Trade\AccountInfo.mqh> #include <Object.mqh> // Resto del código de tu programa // Definir los parámetros de entrada input int MA_Period = 20 ; // _Period de la MMA
Hi all, please let me know if I'm allowed to ask this or if I'm in the right section but can someone answer my question. So ive published a product (EA) with the wrong name to what I wanted, now I cant change it as its been published. Am I able to hide the product from market (as you cant delete)
Hi guys, today I experienced a very strange EA behavior when i tried to read from a txt file in the MT5 tester. The file is located in the "normal" terminal folder and should be loaded by using #property tester_file. Since it did not work with the txt file I also tried opening a csv file. Now the
Hello everyone, I'm new to coding, currently Im writing one that will open trade based on a specific time. For example, if the current time is 21:00:00, and match the condition time, it will open a market order. However, the problem is the OnTick() function requests the order continously, it lead to
What is difference between Symbol() and _Symbol? Any help would be highly appreciated. 
Hi Guys, I was backtesting my EA on two different brokers ( all two proposed by terminal in two different PC) , brokers are specifically : AMPGlobal ( IP=78.140.180.54 located in netherland) and MetaQuotes-Demo IP=78.140.180.48 located in netherland ) the problems is that I started the EA with a TF
//+------------------------------------------------------------------+ //| trailing_stop.mq5 | //| Copyright 2023, MetaQuotes Ltd. | //| https://www.mql5.com |
How can I fix a trading algorithm that was encoded my trading ID, to put another ID because I want use another broker Please help. the developer is not responding to me to assit
hi I included this library: #include <Trade\Trade.mqh> but when using this variable: FreeMargin() this error eppears: what is wrong
i'm trying to use an ONNX file in my expert. my onnx file has 49 inputs at input index 0, has 3 outputs at output index 0, and 1 output at output index 1. when i try to run session vector v_input = vector ::Ones( 49 ); vector v_output( 3 ); vector x_output( 1 ); if (! OnnxRun (onnx_handle
Please I wrote out this code but whenever I try to compile it gives me this errors //+------------------------------------------------------------------+ //| ARTaker.mq5 | //| Copyright 2023, MetaQuotes Ltd. | //|
I wonder about the accuracy of broker data on MT5. I made a lot of comparisons on different backtests carried out recently and my findings are quite disappointing. I find that my backtests can vary greatly from one broker to another while having exactly the same parameters in my EA. In addition, I
Heya team, I got this error today and I don't have anything to catch random breaks like this that I'm not foreseeing. The EA ended up spamming the server this way an unmentionable amount of times. How do I write some catch code for odd errors like this? Maybe something like "If error count exceeds
Hi! I'm currently trying to stich my first EA together and was finally able to compile without any errors. When running the backtest, I can see all the data/indicators I wanted to include showing up properly, but no trades are being executed, even though all conditions are met. I suppose the EA is
Hello, for Metatrader5 in python, market_book_get is not working. It always print "mt5.market_book_add('EURUSD') failed, error code = (1, 'Success')". How to solve this problem ? Thanks This is the script: import MetaTrader5 as mt5 import time # display data on the MetaTrader 5 package print(
  Code Help  (2)
Hey guys i'm trying to code a bot with the the last 3 values from zig zag, bot will have some conditions. First, have a fixed timeframe to get the data, if reach 50% level and 38% from the last 2 values from zig zag, reduce timeframe for one i choose and buy or sell if a new candle is positive or
TicketType = myposition.Type(); //A TicketType = myposition.PositionType(); //B I used option //A above to get the ticket type using the standard libraries #include <Trade\Trade.mqh> #include <Trade\OrderInfo.mqh> / #include <Trade\PositionInfo.mqh> #include
  Partial Close  (5)
I'd like to know how i would write a function that will close a partial of all open positions that are in profit every 10 pips. I'm writing a grid EA which has sell stops placed every 10 pips below the opening price and buy stops every 10 pips above the opening price. So how could i go about this
Hello, good day, fellow programmers. I wanted to ask if there is a better way to get the minimum/maximun values. I use this function to add and/or subtract to open a position, either buy or sell. but I get different results when changing the values, for example from 1 to another value, for example
Hi guys, i'm building some services like myfxbook and i want to can send request directly to the broker mt4/mt5 server without going trough a MT4/MT5 terminal, is it any reference about the protocol? Any librairy for python/c++/rust doing that? Best regards
I experience a really bad performance with the strategy tester on the following setup (which has plenty of power to offer): Dell server with Intel Xeon Gold 6326, VMware ESX 7.0 as a host system and Win 2022 Server as a guest. The guest has 32 cores and 256GB RAM assigned. This is a setup that
Hello all, This is a very straightforward question. How much do we need to pay to get a very profitable fully automated EA right from purchase already optimised? What I have in mind is at least 10-20% profit per month from the available capital while combining 2 or 3 robots of different strategies
Hello, I'm not able to download a free EA on my MacBook. When I click the download button, nothing happens. Are these EA's and indicators Windows Only? Thanks for sharing Greetings Chris
It is obvious, documentation has not all details in this case, I am trying to get behind whats actually coded here. I have written following test to find out... now I am maximal confused. float f_in = NULL ; ulong ul_in = NULL ; float out1 = MathMin (f_in, ul_in); // No error/warnint float out2
so i have created an expert that is drawing 2 horizontal lines in the prev weeks close Highest and Lowest value. I want to check if the price has gone above the prev weeks high and if so to check if the daily rsi 2 days ago is < yesterday's rsi value and if yesterday's rsi value is > than current
Dear experts, I have BUTTON and LABEL Objects on my chart and I want to delete all these chart objects during the removal of EA from Chart. I tried both of these in Deinit() and they did not work: void Deinit( const int reason) { StopTimer(); if (reason == 1 ) { ObjectsDeleteAll ( 0 );};
So I want a series of conditions to come true before I enter a trade. I tried to build multiple ifs inside on tick but it doesn't suit to my needs. I don't want all of my conditions to come true to the same tick. I just want them to come true the one after the other. For example if condition 1 is
Hi How to make SimplePanel1 and SimplePanel1 indicator on the main chart window and on the subwindow //+------------------------------------------------------------------+ //| SimplePanel.mq4 | //| Copyright 2009-2014, MetaQuotes