Greets, I've been trying my hand at writing MQL5 EAs for a while now and everything works as expected. I've always used the strategy tester on intra-day timeframes, but recently decided to give the Daily TF a try. Problem is the strategy tester always fails to place any test trades because the
Hi Everyone, I am performing a slow complete algorithm optimisaiton on an EA. The EA contains a boolean which if activated returns INIT_PARAMETERS_INCORRECT in the OnInit function when invalid combinations of parameters are encountered by the tester. (E.g. no stoploss + stoploss = 10 pips). The
How could one create a connection between MT5 EA and execute trades accordingly on binary broker like PocketOption I have MT2 trading connector working but it only has few brokers available. As PocketOption has feature of hotkey trading from keyboard alone. I even considered simulating button
Hello everyone so in this EA i have tried to detect a squeeze by subtracting the values of the upperband and the lowerband then dividing by the middle band to get the bandwidth i then created a squeezethreshold of 2% and check if the bandwidth value is below the squeeze threshhold if it is then i
Hi all, Mostly posting this in case someone else runs into this issue, this may fix the error in the title. I started from a fresh install of MT5, and upon trying to run a python script, the python Initialize function would produce " -10003, 'IPC initialize failed, MetaTrader 5 x64 not found' "
>>> lot = 0.1 >>> point = mt5.symbol_info(symbol).point >>> price = mt5.symbol_info_tick(symbol).ask >>> point 1 e- 05 >>> price 77.057 >>> deviation = 20 >>> request = { ... "action": mt5. TRADE_ACTION_DEAL , ... "symbol": symbol, ... "volume": lot, ... "type": mt5. ORDER_TYPE_BUY
Hi, I want to set an input parameter using INI file. For a single symbol it works find but I want to use it for multi-currency purpose. Here's the code that I use, input string InpSettingsFile = "Lybra/Test/external file.ini" ; //input file name, blank = not used int StoplossPoint
Hey guys, I tried to understand that and even used ChatGPT for it but still couldn't what is the difference between Equity Drawdown Maximal and Equity Drawdown Relative in this report and what should I really care about as an investor
hi dear.s i want a traling stop code for mql 5 . i want be nice
hi ive created this perfect pivot point object but im having trouble converting this code into one which creates rectangles to represent zones of potential support and resistance. Ive attached two EAs, one which creates the lines perfectly whilst the other is supposed to make zones but doing so
Hi i have an issue retrieving data. The EA prints the valid figures requested in the print function yet when it comes to the EURUSD, the EA suddenly thinks the low, high, open and close are the same value. In the following picture you'll see the same thing as i've just described yet the candlestick
hi, this is rather odd but ive noticed my MT5 settings when running an EA simply does not change when i make certain adjustments. For example, if i change the Bollinger Band Std from 1 to 4, the only chart visual bands do not change as ive seen them do. This is impact the results from when i print
How to ensure a pending order is executed ONLY when current spread is within the defined range ?
(5)
Hi all, A pending order was issued at 10am with a target price of X. At 11am price reached X so the pending order becomes a market order. Question is how to prevent that if current Spread is above a certain value? Any idea
Hi, I've this error 2023.09.24 08:02:56.564 2021.07.19 10:05:54 take profit triggered #39 sell 0.01 GBPUSD 1.37469 sl: 1.37339 tp: 1.37269 [#40 buy 0.01 GBPUSD at 1.37269] 2023.09.24 08:02:56.564 2021.07.19 10:05:54 deal #27 buy 0.01 GBPUSD at 1.37269 done (based on order #40) 2023.09.24
Hi I've been looking at this indicator and while all the other components seem to work as expected, the .ChinkouSpan seems incorrect. While the tooltip and display look 'sensible' the value returned from the .ChinkouSpan(26) function seems to be stuck at 1.79+308? Even with this simple version from
I tried BuyLimit comand on my EA using Deriv account to trade but i always get Invalid Price error message, I tried to add +- my corrected_price to add slippage (also Ask price, Above market price etc..) but it doesnt accept my order. Any idea on Deriv on Crash 300 Index ? > trade.BuyLimit(0.50
If an EA has this set up: Break even in Pips 5 Trailing Stop 25% Trailing Step in Pips 5 Would I be right that if EA goes in profit, then EA will not sell if EA is between 0-4 pips? Once over 5 pips, the EA will set a new Trailing Stop at 10 Pips and then new Trailing Stop every 5 Pips thereafter
I have a function for finding the price and reason for the last deal to have taken place. I made a change, it stopped working, so I changed it back...and it still wasn't working. I reverted to an older version and it STILL IS NOT WORKING. How is this possible? Oh yeah and backtesting on history data
Hello, I am coding an expert and for volume calculation using below function. double tradelot( double Entry, double SL) { double riskamount = AccountInfoDouble ( ACCOUNT_BALANCE ) * capital_risk / 100 ; double totalpointmoney = ( MathAbs (Entry-SL) / SymbolInfoDouble ( Symbol ()
Hi! I'm using MT5 and Python on Wine+Linux. My code logs in using mt5.initialize(path, login, password, server). It works fine on Windows, but in Linux it logs in, send and receive order information but the history_deals_get can't work. The terminal lacks the history and trade tabs from the tool box
Hello. Please, If I'm testing an EA with an initial balance of 200 USD and the Strategy tester shows that the Free Margin is negative, does this mean that the results of the EA are not good and that it could happen that in the real execution of the EA, 200 USD funds will be burned? Thank you
Hi! As recommended, I downloaded the METATESTER AGENTS MANAGER and install it here in my computer. I have no local network with any other computer. But I see 2 different METATESTER applications here: one when I call the executable directly in its folder. It is in Portuguese, the Agents appear in
Hello there I'm encountering an issue with the AppDialog standard library in MQL5 and would appreciate some assistance in resolving it. The problem I'm facing is related to the unexpected change in the panel name during program initialization, specifically within the CWndContainer module. Here's a
I would like to use this indicator and see the various trend lines, support and resistance, when I start it as expertadvisor to do backtests. the problem is that when I put it on a realtime graph the lines are marked correctly. when I put it as a backtest nothing is marked. how can I modify the code
Hi, this is a part of my EA, how can i convert this to a multi-symbol EA? Where's the best place to learn this? datetime old_time; string symbol_loop[] = { "USDJPY" , "EURUSD" , "USDCAD" , "GBPUSD" }; int RSI_Handle; int bb_Handle; #include <Trade/Trade.mqh> CTrade trade;
Hello, i saved a template with my custom indicator KeltnerChannel in Metatrader 5 and can load it there. But when i try it on the Strategy tester, it isn't working. CS 2 14:01:26.612 Custom Indicator loading of KeltnerChannel WS30,M1 failed [557] It's only working, if i use a build in one. How can i
Greetings I have created an EA but it does not take trades off line,it takes trades only when I am logged in,can you please guide? Kind Regards
Hi, ive taken this code from online but struggling to adapt it. In the backtest, the pivot points vanish once the week is over. Instead i want to see previous pivot points for it designated week, and for the lines to only be drawn during that week. How can i amend this code? int OnInit () { return
Hi, I've been trying to run an EA with an Indicator that uses a DLL. I can get it to run in the optimiser perfectly using all "Local Agents" selection, however I can't get it to run when I switch to 'Local Network Farm'. Regardless of whether the agents are set up on another machine or the same
Hi, I have below code : #include <Trade/Trade.mqh> input double Lots = 0.02 ; input double Lotfactor = 2 ; input int TpPoints = 100 ; input int SlPoints = 100 ; input int Magic = 111 ; CTrade trade; bool isTradeAllowed = true ; int OnInit () { trade.SetExpertMagicNumber (Magic); return (
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.