Hi, So far yes, my code is full of options where I check if the trading is allowed, then do something, else do otherwise, but I was just wondering... do I really need it? I mean, isn't Metatrader "smart enough" to not allow the EA to trade if AutoTrading is not checked? In other words, what I'm
Dear All, I have question .. Why are MT5 backtest 'everytick' and 'everytick base on real ticks' so different? Which is more representative? thanks
I am so happy to join you guys. pliz anyone who is patient and willing to help me build a robot based on the zigzag indicator . even though i am not a professional, my strategy is so powerful with lots of wins than losses
Hi guys, I am using an EA to go through a few symbols in a list and also a few time frames, it worked good ,but lately i get a few errors for invalid request. I am using the CTrade library to open and manage the trades, and considering i dont work with the request struct directly i dont understand...
I'm working on dialing in EA settings for a MT5 EA and have been utilizing the agents available from MQL. There used to be anywhere from 200 to 500 agents used at any given time as long as I had enough money in my account... However, for the past couple of weeks it starts there and then within an
HELLO dear coders just want to send my Metatrader A account live equity to Metatrader B expert adviser as a live value . so Expert adviser B shows it as comment on chart / whats the true way to do this , both metatraders are open at the same laptop
HI, First I want to thanks everyone for that great forum and your help. I'm still learning how to programm EA but I'm struggling on something I'm sure you canl help me and give advice. I want to check from the current candle in the past for a pattern (3 Candle Swing) and I really don't know how to
hello, i tried to use copybuffer function, that every new bar, it will copy totalbars numbers. and when not new bar, it only copy the last bar data. but it give me out of range error. how to fix it? here is my code, please check it for me. thanks in advance
I'm going to learn to write expert advisors in mql5 for metatrader 5. i searched google and fonud several 1 hundred to 3 hundred pages books, another source was this: https://www.mql5.com/en/docs . in left down, you can find a link to download the whole document
Hello, I don't know why my PositionClose doesn't work : void crossClose( string symbolName, ENUM_TIMEFRAMES timeframe){ CTrade trade; ulong ticket = getLastTicket(symbolName); int signal = getCrossSignal(symbolName, timeframe); if ( PositionSelectByTicket (ticket)){ if (signal
Hello i'm writing an EA so at the formation of each new bar , multiple prices are collected from previous bars representing potential market execution levels. how can i use arrays or other data structures to collect the prices and filter through( mostly finding distance between prices)? // array to
Hi, If I would like to run 3 different EAs at the same account. Is it better open 1 MT5 for each EA or it should be more faster use the same MT5 for all EAs
Hi, I had an idea for a trading strategy and wanted to code it or maybe it exist already? Idea: Start buy order with 50 take profit points and 25 stop loss points If trade runs into take profit => reopen the same order again (50TP/25SL) If trade runs into stop loss => reopen order but in reverse. It
I would like to close in a loss but unfortunately it does not close at all with the code below. for ( int Loop= PositionsTotal ()- 1 ;Loop>= 0 ;Loop--) { if (m_position.SelectByIndex(Loop)) if (m_position. Symbol ()== Symbol ()) { double ProfitPips= PositionGetDouble ( POSITION_VOLUME )*
Hi,
Anyone know how's that ? The stoploss in the order list appears in yellow. And on the graph it's more weird, likely it has been trailed but it didn't touch it. Any answers ?
HELLO expert writers im very new in programming mql and am confused about a big problem , i only just but only want to send the BROKER A ACCOUNT EQUITY VALUE (that is changing continusely in every tick ) for example 5665 USD to BROKER B Metatrader EA . so THE metatrader B EA shows that recieved
My MQL5 is closing my position right after having the position open, my code was working perfect and from now where it started to happened. I have even create a new file completely from the zego to execute only one Buy position and the problem persists. OBS: i ahve check and my stop loss and take
I am getting this error on the H ashi indicator: array out of range in 'heiken_ashi.mq5' on this line: double haOpen=(ExtOBuffer[i-1]+ExtCBuffer[i-1])/2; The whole code is shown below: How could this error be solved? //+------------------------------------------------------------------+ //|
Hello, I am making an EA that draws some levels, I need the levels to be drawn at the end of the FOR cycle, but the execution is not sequential, even if I place the instruction after the FOR cycle, it is executed before. Is there any way to do it? Thank you
Hello, I have a very simple question. I want to buy EURUSD and close by Takeprofit or Stoploss. My code open the position but never close. Could you help me a little? MqlTick last_tick; SymbolInfoTick("EURUSD",last_tick); Ask=last_tick.ask; Bid=last_tick.bid; MqlTradeRequest
int OnInit () { //--- if (!m_symbol.Name( Symbol ())) // sets symbol name return ( INIT_FAILED ); RefreshRates(); { //--- Initializing expert if (!ExtExpert.Init(m_symbol.Name(), Period (),Expert_EveryTick,m_magic)); //--- failed printf ( __FUNCTION__ + ": error
I run my real account on ICMarkets. I tried backtesting data from ICMarkets and dukascopy (imported from TDS). ICMarkets data is 100% quality since Jan 1st, 2022. Dukascopy data is good quality for 19 years. So, which data will you perfer
I buy EA MT5 for trading, I want to know Can the seller modify the order signal online? or that ea will only work according to the programmed instruction set
Hi all, I am coming to this forum to find some help to understand where the error on my EA can come from. I have developed the same EA for multiple currencies (+ XAUUSD), and I have backtested it a lot without encountering any issue. However, once I put my EA on a demo account with XAUUSD, I am
Hi I want to know where I can learn more about different settings for intraday timefilter in mql5 wizard. What should be my settings if I want to trade during 00.06 hrs to 22.00 hrs thanking you
from my observations tick size SymbolInfoDouble (symbol, SYMBOL_TRADE_TICK_SIZE ); is the same as Point() for a specific symbol,100% though I'm not sure why they are being called and defined as different things on the docs, but the point I'm trying to make is that using Point() to calculate
#include <Trade\Trade.mqh> #include <Trade\PositionInfo.mqh> #include <Trade\DealInfo.mqh> CTrade trade; CDealInfo deal; CPositionInfo info; enum types{ONLY_BUY,ONLY_SELL,BOTH}; input types Types = BOTH; input int RSIPeriod = 2 ; // RSI Period input ENUM_APPLIED_PRICE
I want to find the pip difference between open price and close price of last candle. How can I do that in mql5? Thank you in advance 💓
Hi. My EA is working fine with one account on my VPS, and when I try to run it on account number 2, it won't attach to chart. So I believe I have to sync it with the VPS, and here is where my problem start... My navigator window looks like this: I do not have the option to sync, as in this image: I
Hi everyone, Hoping someone can help me with this. When I call for the current Hour and Minute using the below code, it returns the correct information on live data but when using it in strategy tester it always returns 0. Any ideas? MqlDateTime dt_struct; datetime dtSer = TimeCurrent

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.