Good evening! I am a beginner in MQL5 coding and am experiencing a significant problem when trying to identify my orders and positions, as well as making changes or cancellations to them. I have already studied how OrderSelect , OrderTicket , etc., work, but the problem still persists. I am using
Hi, I have an EA that performs trading tests. It is my desire to save customize results data into a CSV file. I found out the function that is called right after a test is double OnTester() , so I created the following code to write the results into a file: for ( int aaa = 0 ; aaa < 100 &&
Hi, I need to test my EA, but I expect to draw trend lines or a fibonacci on the chart before I start it. How do I draw them on the chart in the test environment, MT5 does not allow me to do anything. Thanks Francesco
Hi every one. I need to close a group of open positions automatically when the the value of equity reaches a certain limit. Is this feature exist in metatrader 5 ? and if not. Is this feature can be generated by a certain code ? Please help. thank you
Hi, I need to test my EA, but I expect to draw trend lines or a fibonacci on the chart before I start it. How do I draw them on the chart in the test environment, MT5 does not allow me to do anything. Thanks Francesco
My ea doenst trade so i looked at journal and see this:trading has been enabled - hedging modehow can i fix this?
Hi Experts, I have trade news filters that I think can be better coded for multiple EAs usage. Currently copy paste for each EAs I am aware it is a bad practice. Tried doing a library for it but this function required global variable so that does not work Below is one of the function. In this case
Hi, I try to create a simple EA with MQL5, when I run my code I get this error:',' - open parenthesis expected. , I don't know what the problem is , would you please help me to solve this error? Here is my code://+------------------------------------------------------------------+ //|
Hi, does any artical talk about MT5 build in EA Sample ExpertMAPSARSizeOptimized?
It is wriiten in pure OO style, but metaeditor is not excellent enough as Eclips or VS studio now. Sometimes i feel reading MQ5 OO program using metaeditor is just like using Notepad. :)
I cant get the point of the...
Hello everyone. I do optimization based on real ticks. When it finishes I try running single tests and compare with results I see in optimization table. They are not the same. What could the problem be
Is it possible to share data between MT4 terminals on the same VPS? Is there a location that both terminals could access? For example, I have Terminal 1 using Broker A, and Terminal 2 using Broker B. Broker B has a market that is not available with Broker A. So I want to send the price data for this...
Hi, Lets say I want to write an EA to trade SMA 21 as a baseline on a daily chart, whenever the price crosses the baseline, I want to open a position. I could easily create a Boolean condition and open a position based on that: bool buyCondition = (PriceInfo[ 1 ].close > BufferMA[ 1 ]) &&
i apologies for my subject topic .Am having trouble with two pivotal logics of my project here is the code i am to enter a trade if there is a squeeze of bollinger bands and a crossing of two moving averages, fastma or rma and slowma as yma if the second crossing happens during a breakout happens
Hi All, need help with transforming a Source File into a running program for MT5. It's my first time. Thanks
Hello guys. I'm very new to coding started a few weeks ago. And I have build the following EA. But the EA only opens buy trades. Can you guys help me out? What is wrong with the else if statement. Please explain in detail because I wan't to learn as much as possible. #include <Trade\Trade.mqh> //
Hi all, I am new to coding and created a simple script for an EMA cross with periods 3 and 26. The EA is not catching all cross events , only some of them. Can somebody see what is wrong? I added print statemts so in the EA journal you can see the events not being captured as the change from
I like the feature of the MQL5 Cloud Network for assisting in optimization runs and I thought I would be able to approximate the run of my script by performing a small sample size run ~500 and then dividing the cost by the number of runs. My initial calculation was $0.00026 per run and I
//+------------------------------------------------------------------+ //| VWRSI.mq4 | //| Пользовательский индикатор для MT4 | //+------------------------------------------------------------------+ #property
see my code //+------------------------------------------------------------------+ //| TrendBias.mq5| //| Copyright 2023 | //| https://www.mql5.com |
I had some random results trying to compare brokers and their spreads... So I wrote a little code to see where my spread values were going wrong - see below. Now I'm not sure at all! - the CopySpread function seems to be making it up!? See the example output (suggesting that the spread is either 6
I am currently developing an Expert Advisor that performs arbitration between two symbols: WINV24 and INDV24 (Brazilian Assets). I run my backtests with WINV24 as main symbol and it works fine for receiving tick data. However, when trying to access INDV24 tick data during the backtest, all values
How to force EA to check for new values only when a bar is completed and new bar is starting
(17 1 2)
I currently have my EA calculate values on the last x amount of bars - this however creates a huge lag during back testing - because of the "for loop" it looks like it executes on every tick. This is how the value check stars: //CHECK ID10T VALUES FOR BUY OR SELL if(BUY_ORDER == 0 && SELL_ORDER...
hi, i am looking for an ea that lets me move the stop loss automatically. This is what i need? open a position and once in a position i want that the stop loss move automatically once a specific price has been reach. and then once another price has been reach move again to another position
Dear Good day Anyone to assist? I have an EA which- uses combination of Palabolic SAR and two MA Crossing to execute trades. It is to buy or sell when Fast MA- crosses Slow MA Up and down respectively in support of Palaboric SAR. I have attached the EA on Forex pairs, Crude oil and Gold and the EA
Hi When I download an expert ,the widget is not in the correct measurements to be useful.It happens with all experts I download,mostly for closing open orders or similar things. is there a way to fix this in the mt4settings or the laptop(Acer Swift)? Thanks for your insights
Hello! I have saved a GlobalVariable() on Friday, and today I had a computer crash, and after I have restarted and checked, global variable is missing . Should that happen
Historical spread during backtesting in the strategy tester is different from the historical spread stored in the Mql rates array. What are they? Why they are different?
(22 1 2 3)
I have found accidently that the historical spread (Ask-bid) used to open and close orders during backtesting in the strategy tseter is different from those stored in the Mql rates.
For example, you can get historical spread using the following code (Lets say your EA is attached on M1 chart)....
I tried searching; this must have been asked before but I couldn't find anything relevant; sorry for asking such a 'stupid' question but; I used ot use mt4, and in back tests it had a tab for 'trades placed' or 'results' or something... that used to show me the breakdown - SL/TP, lot sizes, P/L -
Hi. I can't get rid of these errors at compilation stage. It seems to me that I'm using a correct syntax but if there is an error then I'm definitely doing something wrong. Can you show me where the problem is? Errors: 'SymbolInfoDouble' - no one of the overloads can be applied to the function call

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.