Expert Advisors and Automated Trading - page 27

//+------------------------------------------------------------------+ //| ProjectName | //| Copyright 2020, CompanyName | //| http://www.companyname.net |
Good day Here is some code that takes a larger time frame and divides it into 1 minute candles and sums the volume of each of the 1 minute candles. I expected this to equal the same volume of the larger time frame but is seems like the iTime function is sometimes returning the incorrect start time
Hi, I'm desperate to finish this. I have an onnx model Inputs dense_input tensor FLOAT (- 1 , 130 , 1 ) Outputs dense_4 tensor FLOAT (- 1 , - 1 , 1 ) and can't make this EA work //+------------------------------------------------------------------+ //|
Hello, I purchased an EA and whenever I try to load it on to charts I am getting this error in the journal: initializing of (EA NAME) (ASSET) failed with code 1 It runs fine in the tester but does not load onto charts. My developer is not having this issue and it is not a broker issue. I also tried
Hello, when I try to add an expert to my mt5 I always get this error: mt5 initialization of expert failed with code 0 (prepare to execution failed) First I thought it was because of my Implementation but this even happens when using a Metaquotes-example. What does this error mean
OK, I appreciate that none of you are mind readers, but have any of you come across the following error before, and if so, did you manage to get to the bottom of it? The piece of erroneous code is shown here... static void Cards::AddCards() { string symbols[]; int count =
Good day, im looking for some support on getting my GraphicInterface to show up in the Chart. Im using MQL5 to write my EA and using MT5 to test. it. The EA is compiling without any errors in Meta editor, The Experts window is printing: 2024.01.30 11:03:28.989 CTM_TradeManager_EA (GBPUSD,H1)
void OnStart () { string sym = Symbol (); bool cus = true ; bool is = SymbolExist (sym, cus); double last_high = SymbolInfoDouble (sym, SYMBOL_ASK ); Print (sym + " : update " + last_high); double hi = last_high + 100 ; double low = last_high - 200 ; if (is) { bool ok
  EMAs Crossover  (4)
Hi everyone... I have a code that works well, but when for example the slow ema crosses the fast ema and the ea has to sell , It works but sometimes immediately after this the next candle makes the cross over to the way that we have to buy so the previous cross over was fake actually and the ea
Hello, I have attached the code for a function I am using to move the stop loss to break even. I do not see any issue with the code, but I am obviously missing something because it is not working. It is supposed to iterate through all open positions, and if a position is 5 pips in profit the stop
With the most recent update, it seems Metatrader 5 is having issues with the strategy tester. I attempted to update MT5, but I already have the latest software it seems. For your reference, I am using Version 5.00 Build 4158 26 Jan 2024. This is the exact message I am getting on the Journal tab of
  Multiple EA  (3)
Hello ... I just can't find the right answer in the forum. So I hope there are some specialists here who can help me. I have 10 expert advisors on my real account and would like to only have a maximum of 2 running at any time. the Expert Advisors all work very well. Only if everyone places orders at
Hello, has anyone seen this error when trying to validate an update to the market? test on EURUSD,H1 (netting) EURUSD: no history data from 2020.04.01 00:00 to 2020.08.01 00:00 there are no trading operations Do you know the solution to this problem? I've seen many, but never this one. Thanks in
[Deleted]
original code:Print("Launched the EA ",MQLInfoString(MQL5_PROGRAM_NAME));   should be:Print("Launched the EA ",MQLInfoString(MQL_PROGRAM_NAME)); 
Hi all, I am attempting to modify my TP after placing a trade. The problem seems to be that i am using the same stop loss. This is what i Want. However, if i put in a new Sl by subtracting .00001 from the prev stop loss, it works. I am assuming that positionModify wants new values. How can i only
I'd like to know more about the actual algorithms (code)used to generate ticks in the backtester . The description in the Help file for the option to generate ticks using OHLC values is clear enough, but I have questions about the other two methods: * Randomly by Real Volume. Can I assume that
Hello. When I start debugging with historical data from MetaEditor, it changes my EA's input parameters and I can't figure out where can I set those? These are not the defaults and they are not what I set in strategy tester before starting the debugging
int OnInit () { //--- Newbar(); ma_Handle= iMA ( _Symbol , PERIOD_CURRENT ,maPeriod, 0 , MODE_SMA ,rsi); rsi= iRSI ( _Symbol , PERIOD_CURRENT , 7 , PRICE_CLOSE ); stocha= iStochastic ( _Symbol , PERIOD_CURRENT , 13 , 3 , 3 , MODE_SMA , STO_CLOSECLOSE ); ChartIndicatorAdd ( 0 , 1 ,rsi);
Hi, attached is my simple function to breakeven stoploss after price reaches certain profits on that pair. It is working on all the forex pairs i have tested but, not working on other pairs like indices and cryptos. Im trying to figure out how do i amend my code for this but cant really find much at
Hi, I observe the optimizer in MT5 getting slower and slower over time. At first, it shows to need 20 hours for 10000 runs. After 2000 runs it shows 600hrs . Quite often, when all agents are done, the optimizer waits and waits before it starts the next iteration. Is there anything I can check in
Hi, I've experiencing a virtual hosting error with code 1003. I looked in the web and found nothing about virtual hosting error code. Anyone can explain to me about the virtual hosting error
int cntBuy = 0 ; int cntSell = 0 ; void OnTick (){ Comment ( "\n\n\n\n\n" + "Buy Count : " , cntBuy, "\n" , "Sell Count : " , cntSell, "\n" ); cntBuy = 0 ; cntSell = 0 ; // initialize counts for ( int i = PositionsTotal () - 1 ; i >= 0 ; i--){
ObjectSetText(labelName, "text to display" , 10 , "Arial" , text_color); The above line of code is giving me the following errors: 'ObjectSetText' - undeclared identifier ',' - unexpected token 'labelName' - some operator expected ',' - unexpected token ',' - unexpected token ',' - unexpected token
Good day, I got this error when running optimization , but this error does not occur when I run single test . This error did not affect the test results, but after a few thousand passes my log file was stuffed to tens of GB of data, which is very irritating. I wrote the MACD indicator using Custom
My EA is created with the idea that it should execute a buy order when the current price goes below the lower band and a sell order when the current price crosses above the upper band. But he doesn't react as he wishes. At first he carried out orders but now nothing I review the code but I don't
  Optimization  (2)
I will do optimization test for my expert but it will be from 1974 .. it will take long i know.. so i will buy new laptop.. so which specifications do you advise me to buy .. for example i will buy laptop by core i9 gen13 ram 64..etc
Hello MQL5 community, I'm curious about the potential impact of the operating system architecture (64-bit vs. 32-bit) on the performance and operation of Expert Advisors (EAs). Specifically: Does the nature of the operating system (64-bit or 32-bit) affect the operation of EAs developed in MQL4 and
I am trying to practice my coding EA skills and created an EA around RSI levels. When i try to back test the ea, it opens a position up on RSI level between 50-60 (range) and the example input variables are based on 70 and 30. Is this a coding issue or something to do with the back test / days off
For a while I have been using this .bat script to automate testing on the MT5 strategy tester to optimise my EA. It edits the .ini file for adjust for set file to load, the pair, timeframe and also then loops how many times to do this. Recently I have had an issue where it would do several sets like
Hi, I'm trying a new multicurrency strategy on MT5, I personally wrote the code which opens new trades only if certain conditions are met. The strategy constantly monitors the price of different forex currencies and according to the strategy tester it should have already opened several trades in the