double n = 2.1; double n1 = 0.01; double r = n - n1; Normally r should return 2.09 but it return 2.0900000000000003. That 3 at the end is messing up calculation. Please help
Hi, im not sure why but two different values are being printed. Can't seem to figure out why, thanks in advance input bool MAEntryRequirement = true ; input int MAMinimumDistance = 0 ; input int
Hello, Currently i am coding a news filter EA and having some errors. #import "urlmon.dll" int URLDownloadToFileW( int pCaller, string szURL, string szFileName, int dwReserved, int Callback); #import #define INAME "FFCPing" + _Symbol #define TITLE 0 #define COUNTRY 1 #define DATE 2 #define TIME
The tester ran without a problem for the last few months, but for previous years I get the error MqlRates lon[]; MqlDateTime structTime; MqlDateTime endTime; void OnTick () { //--- int start = 0 ; int end = 8 ; TimeCurrent (structTime); TimeCurrent (endTime); structTime.hour = start;
Hi I am using a AMD RYZEN 9 7950X DS of 32 vCores with 3 Mt4 running and 29 Mt5s. I am doing HFT trading. Should i set the first 3 Mt4 as per Mt4 1, core 1, Mt4 2, core 2 and Mt4 3 Core 3 and then all the 29 Mt5 core 4-32 (multicore selection, ie Mt5 1 core 4-32, Mt5 2 core 4-32,...) ? I ended up
Hello, here's my file, it does work if i remove the position total and position get interger funtions but when i try to input them, it doesn't, can someone help me? #property copyright "Copyright 2024, MetaQuotes Ltd." #property link "https://www.mql5.com" #property version "1.00"
I am not sure if this is the correct section of forum, so please move it to correct section if it needs to be moved. Issue: I was trading LIVE on my laptop, but now I want to move move the trading stuff to the desktop. I tried copying and pasting every folder from the terminal data folder to the
For mt5 I want to create an EA which continue to repeat a pending order if the previous one has hit stop loss. Say I put a buy or sell order in us30 at a certain price with stop loss and take profit specified. Market executes the order and the stop loss is hit. I want to have an EA that creates the
Hello guys does anyone know any website slove errors and warning in coding programming languages for meta editor 5
Hi I have been going through some strategies . So I come to this triangular hedge arbitrage strategy . What everyone is saying is that if we take 3 pairs like EU ,GU , EG buysellsell or sellbuybuy the pairs . So concept is simple . But the thing is that Lot calculation place a kind of important
I am new to MQL5 and I am using Fractal and SAR signal, and my expectation is: close previous sell order when new buy order opening close previous buy order when new sell order opening only have one order opening on the same time The unexpected buy doesn't print expected stuff like before printing
Hi Everyone If somebody would please be so kind to help a new guy out here: I started learning to code about 4 months ago and the more I try and practice, the more I learn but I'm stuck at the moment and maybe I'm interpreting it wrong but I want to get the total profit separately for Buy and Sell
Hello everyone, I've been trying for a year now to develop an automatic trading algo using a neural network as a model and level 1 data (open, close, high, low candlestick prices) and several technical indicators (14). I retrieved this data in a 1-minute timeframe using mql5 scripts that I devised
any one who have sample coding for put stop loss under 2 candlestick before entry price and TP ratio (1:2)
How can I get an output from the test history? Considering the importance of the tests and their results, there must be a way
Hello all, I have tried everything, I cannot get CCanvas' underlying OBJ_BITMAP to obey its OBJPROP_ANCHOR. I tried the obvious : m_canvas = new CCanvas(); m_canvas.CreateBitmap(m_objName, m_endTime, price, 150 , 50 , COLOR_FORMAT_ARGB_RAW ); m_canvas.FontSet( "Consolas" , -
Hello, i would really appreciate if i could get some help with my coding. I getting this message from my journal. I know where it is coming from in my code, but im not should what to change to have it resolve to get the coding pass along. Below is my full code, along with the exact section where the
hello guy I hope every one is great and making profit ♥ I use : Intel(R) Core(TM) i5-4670k CPU @ 3.40GHz 3.40 GHz and when I start ST my CPU start make loud sound ! so I don't know in future if CPU is going to crashes
Hello, this probably has been asked before, but I cannot find it. My apologies. I want my EA to run between 9 and 10am on new york trading times. But I live in Europe. So how can I make sure? I have the current time on my computer, I have a different time on my VPS, and I have a different time in my
I am designing an EA that requires storing the lowest price ad time of the candlesticks in an array which would later be called and used in other logic. The problem is that these price and time are not being saved to the array and apear haphazard and incorrect when i print the array. How do I solve
Welcome! What could be the reason for the following program code to load the specified chart but not load the specified template? The template is located in the template folder. void OnTick () { // Create Object ObjectCreate ( _Symbol , "BuyButton" , OBJ_BUTTON , 0 , 0 , 0 ); ObjectSetInteger (
Calculating a Risk Percentage before opening a new trade is popular in the public domain, but getting a percentage of balance used after the trade has been opened seems difficult for me to calculate. Here's what I came up with, but got something around 3.7k(3,700+)
Hi all, I'd like to get feedbacks from advanced traders/EA developers regarding the max number of inputs steps (total number displayed in the bottom right part of the Inputs sheet when optimizing) allowing to have robust setfiles, i.e. without overfitting (aside out of sample data testing) . E.g
Does anyone know how to get a trading robot to trade automatically? I have enabled Algo Trading and the bot is visible on the chart, but it's not trading. Sorry for the dumb question, but I'm new to the whole trading scene and I have to start somewhere. Thanks in advance
Can you help? that returns a value. & time The last two peaks in the RSI indicator
Hi everybody. I have a concern that I cannot find an answer to in the documentation. probably from incompetence and stupidity. Here, I have systematically filled arrays in a struct, so that it would theoretically be easier to deal with the data in the future. The only problem is that I can't pass
I backtested on a strategy ’ s performance in trading different symbols. If these symbols are combined as a portfolio, or start to trade these symbols at the same time, then I wish to know its maximum daily drawdown. I bought this strategy from the Market, thus I don ’ t know its mql5 file. I
//+------------------------------------------------------------------+ //| CCI.mq5 | //| Copyright 2024, MetaQuotes Ltd. | //| https://www.mql5.com |
I would like to ask everyone how you would choose backtesting performance metrics? Among the following backtesting results conducted in the same time period with slightly adjusted strategies, which one would you choose and why
// Define input parameters input int fastEMA = 12 ; input int slowEMA = 26 ; input int signalEMA = 9 ; input double lotSize = 0.1 ; input double riskPercentage = 2.0 ; // Percentage of capital risk per trade input int slippage = 3 ; // Define variables double macdCurrent, signalCurrent

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.