Expert Advisors and Automated Trading - page 104

Hi, I want to ask about file operation inside class Consider this is the basic code that I copy from here (MQL4 FileOpen) //--- correct way of working in the "file sandbox" ResetLastError (); filehandle= FileOpen ( "fractals.csv" , FILE_WRITE | FILE_CSV ); if (filehandle!= INVALID_HANDLE ) {
Hello Friends I have created CiZigZag.mqh indicator class to get Major/Minor High/Low values. However after adding this class to my strategy, the tester speed has drastically reduced. Now even after I have removed this class, the tester has not restored to the earlier speed and still slow. I hope
Hi all The Grid strategy has a number of stages 1) The entry strategy when no trades are active 2) Closing the initial trade in profit (Using TP / Trailing Stop) 3) Opening additional trade when the previous trade is in loss 4) Closing the basket of trades when their average profit is in profit
Does anyone know how to force MT5 terminal to NOT delete optimization cache files older than 30days? I want to be able to load older cache files into the terminal for analysis of forward results and I cannot find how to stop this deletion of cache files. The only option I'm aware of that the
  EA coding  (1)
looking for some one to <deleted>
Hello, I have been using MT5 Strategy and Optimiser successfully for long periods/times. Now it has decided not to download the data when I hit the Start for Optimizing an EA. There has been no changes to the Inputs. The Broker advice was not helpful, in fact it was downright risky. There has been
  Setting Trading Times  (24   1 2 3)
Hi all, a week into coding in MQL5 and struggling with setting trading times. For this particular strategy i only want it trading the US open, so need it to start at 9:30am local time, and finish at 9:45am (i prefer using local time as i am in a different time zone so don't want to have to account
Hello I'm running an EA on 5min timeframe and my issue is that the values inside the OnTick() section are only updating when a new 5min bar appears. For example I display some values on the label : https://ibb.co/4WdL3Kb and thethe values only update each 5 min. Is there is a way to have an update
#include <Arrays\ArrayObj.mqh> #include <Generic\ArrayList.mqh> #include <Generic\ArrayList.mqh> class DataRateStructure { public : string SymbolForDataRate; double DataRateData_Bid; double DataRateData_Ask; datetime DataRateDateTime;
Hello everybody, I am designing a function that will close a position the moment the current price crosses over a MA. the problem is that I am not able to properly define whether the price is above the MA or below the MA at the time that the position is open. I tried by matching the time the
Hi! NEWBIE HERE! I just want to ask.. if how to code this; how to COUNT ALL SELL SIGNAL before proceeding to trade.Sell. Ex. SELL COUNT = 5 execute trade.sell SELL COUNT = 4 don't proceed to trade.sell thank u
Hello everyone, I try to optimize the settings of an Indicator (in Combination with other Indicators) using an EA. When I use a low Number of parameter (setting Combinations) lets say something about 100, I get the same results for a specific Combination in Optimation and in visual mode/single Test
  Blocking Trades  (9)
Hi, is there any way how to block user opening any positions? e.g. after some %DD
I am not sure about the ticks requested in the View -> Symbols -> Ticks tab. In my case, it only has about a year and a half's history. Is the history before that 1. deleted by the broker, which implies the broker manages the tick history on their MT5 server 2. or it's by MetaQuotes who records the
Please how do I add Fibonacci retracement and helsiken to EA
Below is my code, can someone only add TP code //+------------------------------------------------------------------+ //| RehanKhan EA.mq5 | //| Copyright 2022, Umer Hayat | //|
Hi All. I am using this code input ENUM_TIMEFRAMES TF = PERIOD_M1 ; in optimization by genetic I need to use just 2 timeframes: M1 and M5 How to set it? One way is to use this code: input TF = 1 ; AND then in genetic tester optimization use for TF : start = 1 >> Step =4 >>
Does anyone have any complete practical example of how to start a SCRIPT through Windows? That is, I have the MT5 open and I want to start an MT5 SCRPIT but from Windows (without using or directly manipulating the MT5 platform)?
Hello, my programming knowledge is minimal, I only edit programs that have "some structures" of open source, but I'm not an expert, much less a professional in programming. I need to acquire the knowledge to know in what way I can execute a SCRIPT from Windows (external application). Or from MT5
Hi all, While tightening up automating my testing process I would like to grab the balance and equity graph at the end of a test. There is a right-click method for this on the balance/equity curve chart, so I am hoping there is a matching set of functionality in mql5. I have searched for a function
Hello, I'm using this custom indicator : https://www.mql5.com/en/code/14484 I have set the indicator into \MQL5\Indicators\vwap.ex5 I would like to get the value " sDailyStr" (which is the daily vwap price) to use it inside my EA. In my EA code, inside OnTick() I use the iCustom function : double
  Expert Advisor  (1)
I have built EA for deriv broker synthetic indices and stuck in its one of the important phase.... I want to add special margin call and stopt-out function in my EA... Can someone help me how can it be done... Because broker has set 50% for the stop out while i want to set at 70-80% .... can someone
Hey guys, First, as I'm not an native English speaker, I will do my best to explain what I'm trying to achieve. In short- I want to take only specific results from previous optimization, And only run those sets on different time period. In long- (The dates and number of sets given below are just for
Hello, I set a bollingers to my graph through my EA with this code handle = iBands ( _Symbol , PERIOD_CURRENT ,inPeriod, 1 ,InDeviation, PRICE_CLOSE ); ChartIndicatorAdd ( 0 , 0 , handle); I would like to know if there is a simple way to change the color of the bands on the charts ? Or do I need to
Hello, I am learning to code in mql5 and I would like to know how to display the indicators on the graph? And how to remove the Moving Average indicator (20) when I test. int BolBandsHandle; int OnInit () { BolBandsHandle = iBands ( NULL , PERIOD_H4 , 20 , 0 , 2 , PRICE_CLOSE );
I purchased an EA and installed it and it shows up in the list of EAs but when I try to attach it to a chart it says the EA is not configured. Attached screenshots. Any help is much appreciated
Hello Community! i am very interesting in learn to code this kind of interfaces, somebody could give a north in how or what tools are used to develop something like this picture? no mean I want to do exactly that, but is amazing how fast and good look has is it done complety with Canvas? is there a
Hi. Traders and Coders. I used this article to convert my MQL4 code to MQL5 code. https://www.mql5.com/en/articles/81 Just found that AccountFreeMarginCheck in MQL4 is not available in MQL5. Does anyone have some ways of checking free margin before sending order in MQL5 ? The code look like...
I've been using this code on a multi symbol EA trying to make it execute only once per bar but it executes on every tick , please help. //+------------------------------------------------------------------+ //| ProjectName | //| Copyright 2020, CompanyName | //| http://www.companyname.net |
  expert advisor  (10)
Hello, I'm new to mql5 and generally not a good programmer. I am playing around with an ea that utilises price differentials between last and previous prices as a volatility factor and places a trade based on this. My code compiled fine but upon stategy-testing, no trades are placed, hence no