Expert Advisors and Automated Trading - page 9

I have no knowledge of coding yet while compiling an ea i managed to reduce the 15 errors to just 2, both are the same '' 'if' - open parenthesis expected '' and when i click on this error it leads me to this point in the code which i cannot rectify void tick22() {if {tick22==true} { and
Sir, I backtested into 10,000 steps optimisation and it took 50 minutes and cost $9.45 in MQL5 Cloud !!! Please see attached this Photo Anyone have good solution low cost in MQL5 Cloud
Please, how I can check if market is open or closed in MT5, I cant find answer. something similar to MT4 - MarketInfo(Symbol(),MODE_TRADEALLOWED) this command doesn't exist in MT5 anymore. Thank you
Good afternoon, I have a problem with this EA, which should activate buy orders when the EMA5 is above the EMA21, and sell orders if it is the other way around. However, I have noticed that even though the EMA5 is above the EMA21, sell orders are still opened sometimes. The same thing happens when
Good day. I have a code panel now this panel works fine but when I change chart or Time frame I get an error (Invalid Pointer Access ) MyButton *b = (MyButton*)m_buttons.At(i); b.Color( clrWhite ); //font color
Has anyone figured out how to add in the daily roll over rate charges that OANDA charges for open trades into a backtests? (On another MT5 broker, not OANDA) Even if you have the set the interest rates standard to one setting, it would still be super useful to have it deduct or deposit money into
Hello and thanks for you time! I have this problem with all the candle pattern EAs, when i backtest them at daylie timeframes and they have to open a trade at open price the trade doesnt open, at 8H timeframes and lower i dont have this problem, so maybe there is a problem with opening trade at open
Hey. I have a client that run my EA on 2 different account (and different brokers) on the same computer and without VPS. It’s possible ? Run EA without VPS can lead to bug ? He have an open trade with 1 of the account and no trades with the second. (With the same EA, same settings) Can you help
Sometimes an order get executed on the server-side while my EA is on the way of processing a modify on that order. Everytime that happens it needs to wait full 3 minutes until a 'timeout' error returns, because I figure my server is simply not good on handling that. What I need is setting a way for
This is the Custom function I'm about to use for check and set trailing stops. loop picks each position and check the trailing condition and set it if needed. but The PostionModify(); function is no appear in the meta editor even though I type it. I have no idea what the reason is. Cz I'm still in
Hello, Please can anyone help fix my EA code I am trying to build, below are errors I am getting when running backtest: 'SymbolInfoInteger' - no one of the overloads can be applied to the function call Moving Average.mq5 40 8 could be one of 2 function(s) Moving Average.mq5 40 8 built-in: long
Hello all, apparently this is a newbie question. I wish to get the mql5 code that listens for trade transactions using the OnTradeTransaction function and prints a message showing the price when a buy stop order is triggered. Please help as I don't even know where to start from after declaring the
Hello, I’m currently working on a neural network based expert advisor and I need to know the limits to consider for MT5 optimization. Does anyone have the information about the maximum number of variables, steps and passes during optimization under MT5? Also, is there any way to bypass the applied
Hello, Getting inspiration from the source example Controls.mq5, I created my own CDialogApp panel. It works, but I'm not wondering how to distinguish between events ocurring in the panel and events ocurring on the chart. To make it simple, I need to intercept both clicks on the chart and clicks on
Here is the code block that doesn't works. If the condition is true, I need to place a order for the price I specified. I've checked the code block using comment(); and playsound(); . the code block pass when the specified conditions are met. The SellSignal() custom function is an example. inside
  OnInit() execution fail  (17   1 2)
A very serious bug is, that MT5 (MT4 maybe - not debugged) stops execution of EA without any any error message, the EA is just gone from the chart - OR - MT5 freezes and with this freeze, the whole Windows instance freezes as well. In case of last, the only way to get out is using the task manager
After adding multi line comment to my EA i noticed huge spike in CPU usage while Backtesting in Visual mode on every tick string comment = "First Line\n" ; comment += "Second Line\n" ; comment += "Third Line\n" ; Comment (comment); So i decided to crate my own Comment function and it turned out to
[Deleted]
I have trouble uploading my EA and keep geting this massage Validation completed with errors and in the report : test on EURUSD,H1 (netting) 2022.04.27 10:29:59 failed instant buy 0.2 EURUSD at 1.05887 tp: 1.06387 [Volume limit reached] 2022.04.27 10:29:59 failed instant buy 0.2 EURUSD at 1.05887
Guys , am trying to publish my EA on the Market and I keep getting "not enough money" error .The recommendation is to try and test my EA with $1 , which is impossible coz that $1 will never be enough under any circumstance. The other recommended fix is to put a code not to output the error , but am
Hello All, please I am trying to use the OnTradeTransaction function to manage my positions such that I want to replace a buy position that closes due to take profit with a buy limit order and replace a buy position that closes due to stop loss with a buy stop order. Also vice-versa for sell
Dear All, I am still a beginner in MQL5. I want to add a function of pausing my EA for a specified time after a set profit target is made. I am totally clueless as to how to achieve this. For instance, I want to place several buy trades at different times and I want the EA to keep monitoring my
Hi, I'm new to MQL5 coding. Every time I type something in (Like function) these keywords are before the function name (bool, double, string) I curious to know what exactly mean by it. sometimes I've seen same function is in different formats like bool, double and string. Does it mean the data type
[Deleted]
Hello forum, good day. I'm still relatively new to MQL/MetaTrader and have an EA that would like to use in MT4/MT5 with a real account. What I would like to do is to start trading with it, how is this possible? Best regards and thank you in advance, codeMolecules
Using my mobile phone, I paid for an mt4 expert adviser(EA). The problem is that unfortunately when I am entering in my MT4 platform, on the market tab, that EA is not recognised as being purchased. I raised this issue to the mql5 support, but still no answer. Did any of you encountered the same
Hi everyone, I'm programming an expert advisor for mt4 but when i run it on icmarket or any broker and the bot start opening a trade, it is not setting up the right price for the tp and sl. For exemple, imagine it opened a buy order at the price 1900 and i fix the tp at 30. It will set up randomly
Dear Fellow Members I am trying to use, possibly a new approach with classes to create a multi symbol expert advisor. The main logic of it is explained below: The ArunFX.mq5, the expert will have different parameters and create instances of ExpertBase class for each symbol; The ExpertBase.mqh class
  Volume Tick  (1)
Hello! I would like to retrieve all ticks for the past n candles. In MqlTick structure, what is tick[i].volum and tick[i].volum_real ? I am geting zero for both of them unless I connect to a broker wich is giving real volume. Can I retrieve tick_volume at every tick for forex market using MqlTick
Can't figure this out. I am calling a market buy/sell and provide all properties that are required with values, but yet I continually get "Invalid Request" in the error message. When it prints out, all properties have the correct values, but the request still is invalid. Is there something else I
Can some help clarify me on this! Is control point test on MT4 same as Every thick test on MT5? if no, what is the equivalent test for control point on MT5? And what is the equivalent test for every thick of MT4 on MT5? This is a lot confusing to me and I need clarity Please
All, Firstly I understand that back/forward testing is not an indicator of future results... When I optimise on MT5 using Demo account , therefore Demo data feed I always get 99% history quality. When I optimise using a Live account therefore Live server feed I am getting 80% - 30% history quality