Expert Advisors and Automated Trading - page 12

HistorySelect ( 0 , TimeCurrent ()); for ( int i = 0 ;i< HistoryDealsTotal ();i++) { ulong ticket = HistoryDealGetTicket (i); Print ( " i = " +i + " ticket = " + ticket+ " total = " + HistoryDealsTotal ()); int err = GetLastError (); Print (err); } this is my EA's little
Hi, I need some help to resolve the error I'm getting from from function HistoryDealGetInteger. With the following code I'm trying to determine two things when a new position opened and when one closed. HistoryDealGetInteger keeps returning 0 no matter the entry type. Also when I add an if not
Hello. I uploaded my EA for verification but even though I coded it properly and incorporated the necessary checks it still failed the verification with "no trading operations " error. Any guidance is much appreciated
  VPS Question  (2)
I've been running an MT5 at home and at work using the same account I thought that getting a VPS and loading the charts and EAs on there would be a central spot - so i could update settings on say USDCAD EA - change the lot size or take or entry point or what ever and life would be grand i could
Hi guys like tittle i find a pluguin or similar to have a market replay for test my startegy i want know if exist somthing i try fx blue replay but i cant change my time frame anyone have somthing to suggest? thanks
Hi everyone, I'm on my first EA (with mql5) and I have some trouble. My goal: Get new datas from Calendar event after maximum 5sec. Unforthunetly I get new data sometimes after 1 minutes, sometimes 4 minutes.. It's too long ! I don't understand why, I use EventTimer() to launch the trigger who check
Hello Community, when you attach a dialog to the chart, for instance, the Contorls Dialog located in folder Expert Advisor / Examples and Chart on foreground is s witched off, the dialog is in z order "on surface", so that the trade lines (of order history) are behind the dialog. So the dialog is in
I've written code that captures the signals of an indicator for different inputs and at various timeframes. In version 4, this was straightforward, and obtaining the indicator's output was possible with a single command. in MQL4 I also draw a table for 10 symbols and 8 TF and 5 indicator for each of
Hi There, Can anyone please advise why i have this message when i start my MT5 software? Tester: "cloud servers switched off". I cannot use the strategy tester because of this issue. Thanks
Hello guys, I'm using CopyTicksRange function in my EA to get MqlTick data for some calculations, but CopyTicksRange doesn't work when back-testing. Any solutions
I had it working a moment ago but then it stopped working there isnt even the buttons to stop or play the algo trade its just a fast forward button and I tried the expert advisors that are downloaded and nothing. also, why is metatrader so horribly optimized for anything? I added a picture of what
Hi, I'm trying to copy an indicator from Trading View and part of the indicator has the follow line of code rr = ta.rma(ta.tr, 35 ) ta.tr = True range. It is max(high - low, abs(high - close[1]), abs(low - close[1])) ta.rma = Moving average used in RSI. It is the exponentially weighted moving
Hi, i am really new to MQL coding. Can anyone help me on my problem? Just an example: I open multiple positions on the same entryprice. Lets say 5 positions. Every position has its own TP. All the positions have the same SL. When the first TP hits the SL of all the positions should change to BE
Hi, How are you? I am now coding with my own logic and have faced some problems. I tried several times, but I am new to this language. So if someone can help me, I would be really thank you. // Moving Average Crossover EA for MT5 (MQL5) // Executes trades based on crossover of 10-period and
hello mql5 team, why so high temperature when running only one MT5, GPU reaching above 80 degree always, I already disabled Opencl. if run two instances of mt5, it reaches 90. no indicator added, only one chart with EA running
test on EURUSD,H1 (netting) JI 0 11:13:40.378 Core 1 2021.02.01 00:00:00 🔄 Initializing EA... strategy tester report 108 total trades Hello, I have never encountered such error before kindly guide . My Ea on MT 5 is working perfectly but when I validate this comes up. I will appreciate the help
I created a Multi-frame EA and I'm backtesting it. But the profit I get if I try it on M1 is different from the the profit on M2, M3, M4 etc.. So the question is: should I add all these profits to make an only profit or should I do something else? 'Cause I want to define only one profit for every
Hey all! im trying to build some nice EA for news trading. i did some test and i works fine but it turns out the data of the mql5 calendar is very delayed. i use the ID of the event to let the EA look at the prev , forecast and actual data. With the delayed my trade start to late and the biggest
Keeps getting exactly ZERO tasks to process, after the upgrade of the server to 2025. Of course I checked the logs, everything is fine, only that it does NOT get anything to work on. It only autoupdates as soon as new client versions come out, and nothing else. After each server reboot, all of my
Hello everyone, I'm having trouble retrieving the magic number and the comment when the order is closed. It places the sell or buy limit order containing the magic number and the comment. If the order is pending, I can check it, and if the order was executed and is in progress, I can retrieve it
Hello, I have a trading system which I want to automate. If it's possible, I want to automate my trading system while it's "working together" with other forex pairs. The system is the same for all pairs. Only I want them to watch each other. What do I mean with this? For Example: I have 3 pairs
  Lot Size In Copy Trading  (15   1 2)
Hello to every one I have a problem in copy trading. I bought a signal but every time MT5 open 0,01 lot for me. How can I fix that? My account: Broker: Fibo Group - Demo - Leverage: 1:400 - Balance: 3000$ Signal account: Broker: FBS - Real - Leverage: 1:500 - Balance: 16000$ would you please help me
Hello coders, I recently worked on an Expert Advisor that trades on multiple charts. When I attach the Expert Advisor for the first time to a chart, it works without any issues. However, when I modify the EA inputs or change the timeframe on the chart, the EA stops working. I did some debugging and
I started backtesting an EA using MQL5 Cloud and after about 70% passes, my balance finished, so I enabled my local CPU cores then but the passes are still running after 1 day. I want to know if I add balance to my MQL5 Cloud account and Enable Cloud Agents in strategy tester, will it resume from
  MetaTrader5 calendar updates  (12   1 2)
I would like to ask about MT5 platform calendar updates: is platform's calendar updated about actual values in real time? Or updated later manually? Is it possible updating time is not the same broker-by-broker
Hi, I'm currently testing and debugging a MQL5 US30 strategy. The tester is set to work on a US30 chart and historical tests work fine. However, if I click the debugging on real data button, the terminal opens a EURUSD chart rather than US30. I assumed that it would automatically use the symbol set
hi guys i have creted a diagonal line but this line must pass in iterception of ass X and Ass y like fugure now i trace it with tool but i want the daw line directly by my code i sue this code //+------------------------------------------------------------------+ //| Expert initialization function
Hi everyone, am currently facing an issue that I can't seem to overcome. I am running multiple bots on a single VPS. The problem is that, in my trading system, the expert advisor can only have one open position at a time. At first, I used PositionsTotal , but I noticed that it counts the number of
I open a trade using the below code: MqlTradeRequest request = {}; request.action = TRADE_ACTION_DEAL ; // Specify a market order request.symbol = _Symbol ; request.volume = lot; request.type = ORDER_TYPE_BUY ; request.price = SymbolInfoDouble ( _Symbol , SYMBOL_ASK ); request.deviation =
Sir, I backtested into 10,000 steps optimisation and it took 50 minutes and cost $9.45 in MQL5 Cloud !!! Please see attached this Photo Anyone have good solution low cost in MQL5 Cloud