Expert Advisors and Automated Trading - page 21

  Test todays bars  (4)
Is there a way to test todays M1 bars or should i wait till tommorrow
void OnChartEvent ( const int id, const long & lparam, const double & dparam, const string & sparam) { if (id == CHARTEVENT_KEYDOWN ) { Print ( TerminalInfoInteger ( TERMINAL_KEYSTATE_CONTROL )); } } On a key down event, it will print the states of the Ctrl key. It
Hello When I initially backtest my system, I test using all market watch symbols and then I individually backtest each result that shows positive performance. The problem is, the individual backtest doesnt match the all market watch symbols test. For example. Here are the top performing symbols
Hello team, months ago i bought an expert from MQL5 as i tested it before and the results was amazing. but when i bought it the way how the EA works is way diffrent and it keeps losing trades. however the author has deleted the EA after a while and not even updating the expert. The EA made me much
hello i need mql5.mqh file for include library
Hi. Could someone point me out where to find the drawing tool for charting LONG/SHORTS positions within the graph? Like the one in the pic attached. . I
Good morning I see in the doc SymbolInfoSessionTrade - Market Info - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5 What is it for? uint [in] Ordinal number of a session, whose beginning and end time we want to receive. Indexing of sessions starts with 0
I had a lot of problems in my code with ArrayInitialize() function after the new mt5 build 5100, so i made a workaround for me and i'm sharing here, sorry for the late as the corrections are probably coming in new build announced (build 5120). I'm posting directly here in 'General Forum' section
“Vast sea of EAs, zillion good-looking robots, each promising riches, but leaving traders and investors stranded on the shores of uncertainty.” © My contribution toward: – MetaQuotes analytical tools and metrics for evaluating strategy performance – more transparent and informed trading
Let me preface this with the following : this might not be a terminal issue but it looks like a terminal issue. The code is creating a lot of objects and has 2 indicators embedded in the EA. 1 indicator is used normally the other is a workaround for the following. On deinit the terminal has no time
the strange thing is, the expert just did well in testing, it was able to trade in tester without problem. now no matter what I do, it pops a  [trade disabled] error each time EA tries to open a position. trade disabled in tester ??? how ? and why it happens suddenly, without changing anything ?...
Hello, i still have problems to get HistorySelect properly. Basically, HistorySelect does not return orders latest place. They can be seen in the history tab but are not reflected through History order list. Find attached a simple EA proving this. Simply open a position with BUY or SELL...
Greetings, I'd like to detect when the SL or TP level is hit and take appropriate action. Is the following snippet correct? void OnTradeTransaction ( const MqlTradeTransaction & trans, const MqlTradeRequest & request, const MqlTradeResult & result) { if ( HistoryDealSelect (trans.deal)) {
Hi, When using the "Strategy Tester" with "Single" and backtesting an EA with "visual mode with the display of charts, indicators and trades" checked, has anyone else also get the error "cannot load indicator 'average true range' [4805]"? I got this error after MT5 updated. When I try to run the
  Issue with strategy tester  (16   1 2)
Hey guys, I have been encountering an issue with the strategy tester on MT5 since some time. I used it before to run tests and everything worked perfectly until yesterday I launched a backtest and it kept getting stuck at the stage of loading data. I will show you a picture of what the Journal is
I was converting my own indicator from MQL4 to MQL5 and while I'm pretty good at both standards, the result in MQL5 was wildly different. the culprit was some uninitialized local variables inside loops, that which worked well under MQL4 but crazy under MQL5. // Something like this in MQL4 will
Hi all, I'm now trying to integrate my bot developed in nodejs with MetaTrader5. I could install the npm package called mql5-connector-js but I don't know what to do in the MT5 side to make all features work. Has anyone done this before? Thank you
I made an EA that compiled without problems... but when I tried to test it, no sells or sales were made. How can I solve this problem? //+------------------------------------------------------------------+ #property copyright "Copyright 2023, MetaQuotes Software Corp." #property link
Hi guys, first of all I'm not a coder and so I tried to create a bot with deepseek. I managed to create it , the strategy work on candle rejections based on pips. The problem is that in every tick backtest the bot is profitable but in every tick based on real tick and on live trading , the EA it's
Hello, I'm not sure about this EA being overfit or not. How do you go about evaluating overfitting? Are there any books, articles? Backtest settings (50ms is my actual delay on my pc) 2021-01-01 -> 2022-01-01 2022-01-01 -> 2023-01-01 2023-01-01 -> 2024 -01-01 2024-01-01 -> 2025 -01-06 2021-01-01 ->
Hi all. I could not find documentation about the Push() built-in method available on arrays. I have tested it and the behaviour seems pretty straightforward, it appends an element to the array with automatic resizing, but I have searched for info both in MQL5 reference from the app (v5.00 build
  Copy Set Files  (2)
I have looked and searched the forum and cannot find a proper answer on how to copy set files in the most updated MT5 version. I saw a YouTube video that says the set files are in the Preset folder but it was an old video and my current version of MT5 does not have a Preset Folder. My situation is I
  Open or Closed  (2)
How can an EA know if a market is open or closed ... January 9th 2025 President Biden made it a National Day of Mourning to Honor President James Earl Carter, Jr ... My EA did not get the memo and it does not repeat Thing is although the NYSE closed trading continued around it ... least it did with
Hello, I just download the official Metatrader 5. When I coded, I received the error: 'PositionSelectByIndex' - undeclared identifier In the file Trade.mqh, I don't see any reference to the PositionSelectByIndex. I'm using a pure MQL5 environment, in windows software. And I don't install MT4 in my
Hello , in my ZigZag.mqh file when I compile I'm receive the following errors : 'Create' - unexpected token, probably type is missing? ZigZag.mqh 72 10 'Create' - function already defined and has different type ZigZag.mqh 72 10 'Calculate' - unexpected token, probably type is missing? ZigZag.mqh 89
  EA scams  (73   1 2 3 4 5 ... 7 8)
Does no one check sellers code for scams. For example this guy shows his EAs winning but they only win up until the last upload date and then they lose. He obviously has the data loaded in the EA For example, his program was last updated on 28th february 2023 and you can see the great results before
Hi developers. I am close to finishing my EA which i want to protect from unauthorized users. I have searched over this platform but I've only came across MQL4 3 simple ways of protecting your code. I have searched on the documentation of MQL5 but seems like it does not touch anything to do with
hi guys i have app that write a txt with this syntax in Mql5\Files EURUSD,BUY,0.10 the mt5 read perfect load data but when execute return error but in my accont i have 10k and if i run the same command by hand it works my code // ===== COMANDO DO ORDER: "<SYMBOL>,<BUY/SELL>,<VOLUME>" ===== if
Can anyone help me trace it and remove it? No real answers or real help came from support, either the broker or MetaTrader 5 and MQL. Keep opening trades randomly on all pairs almost every hour, causing losses if not closed manually, and I tried all the troubleshooting, and I don't want to delete
Hello All, I'm new to this forum. I have created 1 strategy using pine on tradingview which produces buy and sell signals, Integrated with PineConnector and MT5. The condition of the script is that it doesn't has SL/TP. It exits on opposite signal. I need to use specific lots eg. XAUUSD lot=0.02