I have an EA in MT5 which is designed to convert messages into a trade. The connection works, but I have encountered an issue I don't know how to fix. In telegram, I made a bot which recieves webhooks from tradingview. These messages are correctly recieved and displayed on the chat. However the
Hi, I'm trying for the first time this class and followed this guide https://www.mql5.com/en/articles/481 . Problem is that after placing the order I need to get the ticket because I'm trying to manage the operations by myself. The problem is that even the operation is placed and it has a ticket, a
when we creat OBJ_EDIT, we can modify its value manually. But on backtest, if we modify it's value, it can not change. How to solve it
When I access MT5 from python, I can get date and price information, but not last and tick_volume. I couldn't get them with my own code, nor with the official sample code. The result is always 0. from datetime import datetime import MetaTrader5 as mt5 import pandas as pd if not mt5.initialize()
Hello everyone, I'm trying to develop a pattern robot, it should send the signal at the OPENING of the ZERO candle ( O[0] ). It is sending correctly on the Zero candle, but on the next candle it sends the pattern again, even though it is a new zero candle and the pattern is already one candle
Hi i am developing a backtester in python so i have tried to use the official python example https://www.mql5.com/en/docs/python_metatrader5/mt5copyticksrange_py to copy ticks but the volume seems to be always 0. is there any way i can get the volume information as well. Thanks in advance
Do you think anyone can help to explain what is the reason the order will be cancelled automatically? I am a newbie in the EA trade. Some setting was wrong
Hi I'm David, could anyone help me with a quick question: So basically I need a script that exports the trading accounts info that means (date, profit/loss, commission, etc.), and it has to do it automatically, how do I procede ? Thanks. :)
Hi, I am new in mt5. i am confused about the price used in back test. something very simple as below. i hope someone can confirm my understanding CSymbolInfo info; void OnTick () { double ask=info.Ask(); double close= iClose ( NULL , PERIOD_CURRENT , 0 ); if (ma1.Main( 0 )>ma2.Main( 0 ) &&
Error, martingale calculation. the doubling of the lot in the martinagale strategy proves to be inconsistent. It jumps from 0.1 to 0.2 to 1.6, after the take it goes back to 0.1 and then jumps to 0.8. Which part of the code could be the problem
Hey all, I would like to ask how to get the exact values of mql calendar ? I already got the value and divided it with 1 million as suggested, but it is still rounding up . I tried typecasting as well but still the same. In this case, the exact value is 46.5, but it keeps producing 46 as the value
hi, can someone please help me with this: I'm trying to get the correct account balance at the start of the month (1st), the code so far does give me the correct balance when the month changes to a new month, but the problem is when the EA is loaded the start balance of the month is reflected as
Hi, I am in the process of getting to know various Expert Advisors. When I install one for free, I can only test it using the 'start test' button. I cannot run it unless it's for testing purposes. What can I do? I have installed several, but I can only start them as a test, no matter which one
I am new to MT5 and I copy a code from https://www.youtube.com/watch?v=d9-_bb58PgE and https://www.youtube.com/watch?v=PgxhNRoe4AM and It says there are errors. //+------------------------------------------------------------------+ //|
Hi, I have this pc with 32gb RAM, during optimization truckloads of data are written to my Windows disk which affects my disk health. Now, I am aware of the fact that reducing agents will prevent this from happening but then the whole process takes much longer and it already takes ages with all
Hi there, I am very new to MQL5 and trying to create custom indicator //+------------------------------------------------------------------+ //| Hull_info.mq5 | //| Copyright 2024, MetaQuotes Ltd. | //|
I am quite new to coding in mql5 and have written my own EA. It seems to work fine in the strategy tester and places both long and short trades. But in live trading it only places long trades and has not placed any shorts. I suspect it has something to do with my code for calculation lot size based
I create my EA and use do while for get signal entry : ... Improperly formatted code removed by moderator. Please EDIT your post and use the CODE button (Alt-S) when inserting code. Hover your mouse over your post and select " edit " ... ... With this code, i got a problem freeze chart when i
hi, can someone please help me with this: I'm trying to get the correct account balance at the start of the month (1st), the code so far does give me the correct balance when the month changes to a new month, but the problem is when the EA is loaded the start balance of the month is reflected as
Hey guys, I'm currently working on an expert advisor, in which I use the OnTrade() function to trigger chart object creation functions. Basically, I want to manually draw arrows and lines on the chart, somewhat similar to how the native trade entry/exit arrows and sl/tp lines work. In order to do
Hi, I made some automation to create a new machine everyday, and everytime I install metatrader from my broker, however metatrader algo-trading is always disabled when it starts a new mt5. Consequently, my orders returns: 10027 - TRADE_RETCODE_CLIENT_DISABLES_AT - Autotrading disabled by client
hi i am trying to receive a message from python via Socket the message is "hi from python" , but in mt5 terminal i only receive character "h" please take a look at my mql5 codes and the images i attached please help me thanks bool HTTPRecv( int socket, uint timeout) { char rsp[]; string
Hi! In C programming language, one way to swap numbers is: #define swap(a,b) (a=a+b;b=a-b;a=a-b;) How can we write this in MQL5?
I have an error in the WebRequest section. Can anyone help me edit it // Define your Telegram bot token and chat ID input string BotToken = "YOUR_BOT_TOKEN" ; input string ChatID = "YOUR_CHAT_ID" ; //+------------------------------------------------------------------+ //| Expert initialization
How to correctly apply the weights of instruments in the portfolio to the position size? I have a portfolio with n instruments and strategy buy and hold (to next rebalance) each instrument has a specific weight (weights add up to 1) Please suggest ideas on how to correctly convert weights to the
Hey all, I would like to ask if anyone of you know how to get enum as an input variable in string. I tried this #define method and StringFind() function but it produce some error and warning as per this picture. Here I also attach the code I tried to write: #define Nonfarm_Payrolls "Nonfarm
Hello, Im developing an EA that uses some custom indicators, wich I load with the iCustom function, like: almaHandle = iCustom ( _Symbol , PERIOD_CURRENT , "name" ); Now, I have the problem that although I of course know what are the parameters of those indicators, becuase I can see them in the
if (IsNewBar()) max_contada = false; if (IsNewBar()) min_contada = false; if (contar_max_min == 1 ){ if (!max_contada && rates[ 0 ].close > rates[ 1 ].high){ rompeu_max++; max_contada = true; } if (!min_contada && rates[ 0 ].close > rates[ 1 ].low){
Hey all. Wonder if anyone can help. I have a python application that creates a batch file and an ini file for me for the purpose of batch processing tests with various test data. This works great and generates a batch file and an ini file for me. However when trying to use this via the batch file
I have read a number of articals in this forum but still don't have solution. Can someone tell me what OpenCL code to add into my EA in order to use GPU for backtest
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.