Benefits of Ready-Made Experts vs. Programming / Freelance.
Push.Mail. Working with email and notifications in MetaTrader
Description
Scalping is one of the most challenging, risky, and simultaneously rapid methods to earn money. However, it is not guaranteed that you will receive your profits after making trades.
Strategies based on the tick data rate are perhaps among the most discussed profitable systems. However, there are some nuances to consider.
Quotes entering the terminal contain varying amounts of data.
Even if you install two identical terminals from the same company and launch them simultaneously (which is unrealistic), you will not achieve 100% accurate results.
Additionally, starting your scalpers at the same time will not yield perfectly synchronized outcomes.
Trades on two terminals may differ.
This variation depends solely on the data transmission flow from the server to your terminal.
Discussion of my systems TickSniper for MT4 and TickSniper for MT5 occurs in other forums with one question: Why are there different open positions and profits on MT4 and MT5?
The answer is simple: the difference in quotes. The MT4 terminal has a slower quote flow, likely due to traffic congestion.
In the MetaTrader 5 terminal, the quote stream is ten times faster, resulting in significant differences between open trades.
For this article, two Expert Advisors were specially developed: TEST TICK for MT5 and TEST TICK for MT4. They are completely identical in code (of course, programming languages are different, so function names vary).
Code for MT4:
#property copyright "Copyright 2024, expforex" #property link "" int timestart = 0; int ticknumber = 0; // Tick number double PriceBID = 0; // BID tick price double PriceASK = 0; // ASK tick price int TimemsTick = 0; // Tick time in ms int init() { timestart = Time[0]; // Start counting from a new bar so that all EAs on all terminals start the same way. return(0); } // The advisor starts with each tick int start() { if(timestart != Time[0]) { if(TimemsTick == 0) TimemsTick = GetTickCount(); ticknumber++; PriceBID = Bid; PriceASK = Ask; Comment("\n\n\n\n Tick Number = " + ticknumber + "\nPriceBID = " + PriceBID + "\nPriceASK = " + PriceASK + "\nTimeTickinms = " + (GetTickCount() - TimemsTick)); Print("Tick Number = " + ticknumber + " PriceBID = " + PriceBID + " PriceASK = " + PriceASK + " TimeTickinms = " + (GetTickCount() - TimemsTick)); } return(0); }
Code for MT5:
#property copyright "Copyright 2024, expforex." #property link "" #property version "1.00" int timestart = 0; int ticknumber = 0; // Tick number double PriceBID = 0; // BID tick price double PriceASK = 0; // ASK tick price int TimemsTick = 0; // Tick time in ms int OnInit() { datetime Time[]; ArraySetAsSeries(Time, true); CopyTime(_Symbol, _Period, 0, 1, Time); timestart = (int)Time[0]; // Start counting from a new bar so that all EAs on all terminals start the same way. return(INIT_SUCCEEDED); } // The advisor starts with each tick void OnTick() { datetime Time[]; ArraySetAsSeries(Time, true); CopyTime(_Symbol, _Period, 0, 1, Time); if(timestart != (int)Time[0]) { if(TimemsTick == 0) TimemsTick = (int)GetTickCount(); ticknumber++; MqlTick last_tick; SymbolInfoTick(_Symbol, last_tick); double Bid = last_tick.bid; SymbolInfoTick(_Symbol, last_tick); double Ask = last_tick.ask; PriceBID = Bid; PriceASK = Ask; Comment("\n\n\n\n Tick Number = " + ticknumber + "\nPriceBID = " + PriceBID + "\nPriceASK = " + PriceASK + "\nTimeTickinms = " + (GetTickCount() - TimemsTick)); Print("Tick Number = " + ticknumber + " PriceBID = " + PriceBID + " PriceASK = " + PriceASK + " TimeTickinms = " + (GetTickCount() - TimemsTick)); } return; }
These Experts Do the Following:
Upon initialization, the advisor records the bar on which it started to ensure that all experts across all four terminals begin simultaneously on the next bar (in our case, M30).
Subsequently, with each tick, the advisor logs data on the screen and in the log: tick number, BID/ASK prices, and tick time in milliseconds since the start of the calculation.
I downloaded two MT4 terminals and two MT5 terminals from the same broker to make our test more credible.
Have you installed MetaTrader?
MetaTrader is required for installing from www.expforex.com
I launched the terminals, applied the EURUSD M30 charts to all four terminals, and used one Expert Advisor to verify our observations.
The initial entries in our logs indicate that we started simultaneously:
mt4_1:
18:29:58 TEST TICK EURUSD, M30: Tick number = 1 PriceBID = 1.32281000 PriceASK = 1.32289000 TimeTickinms = 0
mt4_2:
18:29:58 TEST TICK EURUSD, M30: Tick number = 1 PriceBID = 1.32281000 PriceASK = 1.32289000 TimeTickinms = 0
mt5_1:
GR 0 18:29:58 TEST TICK (EURUSD, M30) Tick number = 1 PriceBID = 1.32336000 PriceASK = 1.32344000 TimeTickinms = 1065503
mt5_2:
GR 0 18:29:58 TEST TICK (EURUSD, M30) Tick number = 1 PriceBID = 1.32335000 PriceASK = 1.32345000 TimeTickinms = 1065674
As seen in the next screenshots, the quotes started identically, yet we observed 1-2 tick discrepancies. This clearly indicates:
The scalper cannot achieve 100% identical results on two different MT4 platforms and MT5.
It also cannot open trades simultaneously on two terminals of the same MT4/MT5 platform.
This is unrealistic and not the broker’s fault.
The transport protocol traverses the network from the server to your computer, leading to packet loss—a normal occurrence.
Difference in Calculations and Analysis
The following screenshots illustrate the discrepancies:
This is only 3 minutes after the start of the advisors.
Let’s refer to our logs for tick number 1433 on MT4 terminals:
18:47:44 TEST TICK EURUSD, M30: Tick number = 1433 PriceBID = 1.32336000 PriceASK = 1.32344000 TimeTickinms = 1065503
18:47:44 TEST TICK EURUSD, M30: Tick number = 1433 PriceBID = 1.32335000 PriceASK = 1.32345000 TimeTickinms = 1065674
We have the same server time, but the time in ms differs, as well as the quotes.
Tick number 1684
18:52:05 TEST TICK EURUSD, M30: Tick number = 1684 PriceBID = 1.32377000 PriceASK = 1.32385000 TimeTickinms = 1326586
18:52:03 TEST TICK EURUSD, M30: Tick number = 1684 PriceBID = 1.32374000 PriceASK = 1.32382000 TimeTickinms = 1324496
Not only does the time differ, but so do the BID/ASK prices.
Now let’s compare the same on MT5 terminals:
ES 0 18:48:42 TEST TICK (EURUSD, M30) Tick number = 4316 PriceBID = 1.3231 PriceASK = 1.32318 TimeTickinms = 1124050
DS 0 18:48:43 TEST TICK (EURUSD, M30) Tick number = 4316 PriceBID = 1.32311 PriceASK = 1.3232 TimeTickinms = 1124502
Same tick number, but why different prices?
Or here’s another example:
RJ 0 18:52:21 TEST TICK (EURUSD, M30) Tick number = 4984 PriceBID = 1.32363 PriceASK = 1.32371 TimeTickinms = 1342701
H 0 18:52:22 TEST TICK (EURUSD, M30) Tick number = 4984 PriceBID = 1.32364 PriceASK = 1.3237 TimeTickinms = 1344355
Different Tick Arrival Time in ms, Different ASK/BID Price
The archive contains all the materials related to this article, including the Expert Advisors themselves, videos, images, and terminal log files.
The question arises:
Can the same Expert Advisor on two real/live accounts, one broker, one platform execute identical trades with 100% accuracy?
The obvious answer is No.
This does not occur!
I hope this article will address all your questions in detail in the future. With this knowledge, you will be able to operate your scalper more accurately across your terminals.
Increase your profits.
How to Find Out the Ping (Access Time to Your Broker’s Server)
The speed from the VPS to the broker’s server is easy to determine. This function is standard in Windows and is called PING.
To determine the access time, you need to find your server’s address.
First, open your terminal folder and navigate to the CONFIG subfolder.
Find the file with your server’s name.
Next, open the file in Notepad and locate the path to your broker. Copy it to the clipboard.
Then, open the Start menu and enter the cmd command.
Then, enter the ping command followed by your server’s address.
ping mt4-demo.roboforex.com
The result displays the time from your computer to your broker’s server in milliseconds (ms).
The lower the value, the better it is for any Expert Advisor, especially for a scalper.
You can also check your ping to the server or change the Data Center in the lower right corner of your terminal:
If your ping is too high, you can install the Expert Advisor on a VPS server.
Questions?
If you have any questions, please feel free to ask. We do not sell you a pig in a poke.
Each of our products can be tested before purchase.
We appreciate your feedback and requests for our products and strive to maintain high-quality standards.
Thank you for being with us!
Do you have a question?
This post is also available in: English Українська Portuguese Español Deutsch Chinese Русский Français Italiano Türkçe 日本語 한국어
Leave a Reply