this is my code and it is not placing an order:- import MetaTrader5 as mt5 import time mt5 .initialize() risk_percentage = 1 .0 balance = mt5 .account_info().balance risk_amount = balance * ( risk_percentage / 100.0 ) while True : candle_data = mt5 .copy_rates_from_pos( "XAUUSDm" , mt5
[Deleted]
Hi everyone, so I made a multi-symbol and multi-timeframe EA but the backtest and live results are different, some trades are missed on the live trade. How can this be fixed? Also the trailing stop seems to hit earlier compared to the backtest. Should I just make the EA single timeframe and symbol
Hello Sir I am trying to get the indicator bufffer details to my EA, but I am unable to get it, why? In the strategy tester visual screen all details are available but in the EA file I am not getting. The Super signal indicator code is as follows: <Incorrectly posted code deleted> In my EA I am
I need a help how to lock my EA/Script based on my login account number and one broker only such as "FXDD" ? example: my login number in my broker "FXDD" is 12345 , and I want my EA/Script can run only in that login number and FXDD broker. please help NOTE: better if you can give me an example of
Hello, everyone. My name is David, and although I am still learning MQL5 . I am having trouble getting my bot to close out positions. I want the ask line to cancel out any buy positions on that currency pair and switch to selling when it drops below the 50 MA (Mavalue), and the bid line to do the
Hello Guys, I'm new to coding, and I have this question; I'm trying to create support resistance expert; it draws 2 lines on 5minTF if the conditions are met; however, the lines keep moving ( I want the lines fixed, and if there is another signal, I want to draw extra line , and so on). How can I
Dear fellow traders, after closing and reopening mt5 , pass number disappears from all my optimization result tabs as shown in the picture. Any idea how i might resolve this ? Thank you very much for your support , wishing you all sort of great things for your future
Hi there, I'd like to know any MQL4/5 function to get commission fee before open order. Thanks in advance.
Hi, I found that in MQL5 there's PositionsTotal() and OrdersTotal(). From the documentation PositionsTotal() returns open position, does it means that PositionsTotal() only count buy and sell order while OrdersTotal () also count stop and limit order
Hi everyone , I am on the lookout for anyone that might be able to help me with an idea I have that disables completely market executions and only allows me to trade with pending limits. I currently use a expert advisor to place my trades but want to completely take away the ability to execute at
hello guys help me ! I need code for EA if some moment write data to file
I found this bug when using EnumToString() to display the swap calculation mode of a symbol. #define PRINT(A) Print ( #A + " = \"" + (A) + "\"" ) void OnStart () { Print ( "Build: " , TerminalInfoInteger ( TERMINAL_BUILD )); PRINT( EnumToString (( ENUM_SYMBOL_SWAP_MODE )
I have an indicator that has values of -1, 0 and 1. I am trying to programatically capture the transition from -1 to 1 which does not happen in a sequential manner. Here is an example of a valid trigger that I would like to capture to signal an open trade flag Let say we are looking back over the
im trying to list my ea, but it needs a custom indicator to make it run. how and where do i put the indicator file
Hello friends. I have this code I wrote. I tried getting all the closed profits by magic number over a period of time. But it's not getting the right value. It works perfectly for mt4, but mt5 is not so clear, because if the concept of IN and OUT. The IN part has the magic number but the OUT part
Hi, So when I run a simulation run the repot shows an absolute drawdown or 47.62%. But when I look at the graph and download the full report, the running balance has a drawdown of only 7%. I downloaded the full report and set up an excel spreadsheet to calculate the running max of the balance and
Is changing an EA settings or mass adding them to all open charts possible by any script?
I'm running test accounts for all currencies so changing settings or adding them to each chart can be really time consuming any help would be much appreciated.
Thanks in advance.
Do you know anyone who has time to help me figure out how copiers and Expert advisors in MLQ5 work in MT4 and MT5. I’ve read articles, watched videos, asked for help on MLQ5 forum. They all assume that you know something about how they work. I don't. I have tried many times to follow the advise
Dear fellow members , lets say i have generated 1000 xml optimization reports on various timeframes , pairs , and EAs. Do you know of any way to filter them out (ex : number of trades > 10) and aggregate them in a single database/excel file to view the results ? Right now , going through all this
#include <Expert\Expert.mqh> #include <Expert\Signal\SignalFibonacci.mqh> #include <Indicators\Indicators.mqh> #include <Expert\Trailing\TrailingNone.mqh> #include <Expert\Money\MoneyNone.mqh> //+------------------------------------------------------------------+ //| Inputs |
In reading the initial documentation for scripts, it appears that they are started by attaching to a specific chart. I am wondering if it is possible to write a script that acts at a more global level with the ability to open up additional charts, and set things like the associated time frame, and
Hello, I'm trying to pull candle data, copy_rates_from and copy_rates_from_pos return no data. Snippet of my code: timezone = pytz.timezone('US/Eastern') utc_from = datetime.datetime(2023, 1, 1, tzinfo=timezone) rates = mt5.copy_rates_from("EURUSD", mt5.TIMEFRAME_M5, utc_from, 100) for rate in
Hello, I started using MT5 for EAs a few days ago and for the life of me NO MATTER WHAT I DO! My bot simply wishes to only upload and trade on the euro chart.... :( All I wanted to do was try Crypto, ETH specifically. I created using the expert advisor (generator) wizard I've tried to
Hi, after login (but without subscription), I can't see the SL/TP used by the trader for his/her historical trades (whereas a friend of mine can). Hence the question: how is it possible to systematically display columns SL and TP? It is necessary to subscribe to have access to this information
I have a trading algorithm created in Python that integrates with MT5 through APIs. Any idea on what would be the cheapest w/ low latency I could deploy it into
I have the below code in my EA. When I compile Order ticket is said to be uninitialized and the OrderSend value is said to need checking. How can i fix this? void DeletePendingOrder( ENUM_ORDER_TYPE type ) { long order_ticket; HistorySelect ( 0 , TimeCurrent ()); for ( int i=
im backtesting ea and i just want to ask fellow traders how accurate is mt5 real tick every tick backtest is and if it is reliable and to be considerd
SignalSubscribe function call returns error 4014. What's wrong with it?ERR_FUNCTION_NOT_ALLOWED 4014 Системная функция не разрешена для вызова
I'm trying to work with ea but not working probably, it's not taking the deal
Hi, I have seen so many solutions similar to this but not really the same as what I wanted to do. I want to run something like a Daily trend indicator, then an Hourly trend indicator, then a 5 minutes oscillator indicator. The TF needs to be a "static input" in case I want to change it. I figure

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.