Konstantin, thank you for the article!
The problem voiced is not far-fetched, and the solution is elegant and (hopefully) reliable.
Question: does the method of calling "spies" directly from the Expert Advisor in the tester work?
Konstantin, thank you for the article!
The problem voiced is not far-fetched, and the solution is elegant and (hopefully) reliable.
Question: does the technique with calling "spies" directly from the Expert Advisor work in the tester?

- www.mql5.com
Great decision! Lots of reasons to "think about it".....
I've been swirling around this for quite some time and you literally put it all into perspective. Thank you!
If the main mass of calculations on the symbol is performed in the indicator body, and the Expert Advisor sends the results for final processing and trading, it will be a very good distribution of the load. After all, each indicator and Expert Advisor will work in its own thread. I will have to try it...
Couldn't resist from flooding.....
I reread the article again. Even those small questions that arose at first have disappeared.
Thank you, Konstantin.
lav888:
Great solution! Lots of reasons to "think"...
I was thinking about it for quite a long time, and you literally put everything in its place. Thank you!
If you make the bulk of calculations on a symbol in the indicator body, and send the results to the Expert Advisor for final processing and trading, you will get a very good distribution of the load. After all, each indicator and Expert Advisor will work in its own thread. I'll have to try it...
I couldn't resist flooding...
I reread the article again. Even those small questions that arose at first have disappeared.
Thank you, Konstantin.
Where is the option to vote for the article?
Yes, and I can't help but express my appreciation to MQ for such a tool!
Tell me how to run this in the Expert Advisor, I get this message. When trying to run the attached Expert Advisor to the article
2011.01.22 23:51:02 Core 1 connect closed
2011.01.22 23:51:02 Core 1 tester stopped because OnInit failed
2011.01.22 23:51:02 Core 1 2010 .01.01.01 00:00:00 Error installing spy on GBPUSD
2011.01.01.22 23:51:02 Core 1 2010 .01.01.01 00:00:00 Expert removed because indicator 43 cannot load [4802]
2011.01.01.22 23:51:02 Core 1 loading of iSpy GBPUSD,M1 failed
2011.01.22 23:51:02 Core 1 GBPUSD ,M1: testing of Experts\My\exSpy.ex5 from 2010.01.01 00:00 to 2011.01.22 00:00 started
2011.01.01.22 23:51:02 Core 1 GBPUSD ,M1 (MetaQuotes-Demo): every tick generating
2011.01.01.22 23:51:02 Core 1 Intel Atom N450 @ 1.66GHz, 2038 MB, PR22
2011.01.01.22 23:51:02 Core 1 4649 bytes of total initialisation data received
2011.01.22 23:51:02 Core 1 successfully initialised
1. How to get this up and running when testing history.
2. How to get not price, but ask and bid through spies ?
Thanks in advance
1. How to get this up and running when testing history.
2. How to get not price, but ask and bid through spies ?
Thanks in advance
2. How to get not price, but ask and bid through spies ?
Thanks in advance
There is a line in the OnCalculate() function in the Spy Control panel MCM:
double price_current=price[rates_total-1];
By default price[rates_total-1] is equal to the close price of the last unfinished bar, which in turn is equal to the last bid price. i.e. we always get bid price from the spy by default.
If you want to forcibly get the ask price, replace this line, for example, with the following one
double price_current=SymbolInfoDouble(_Symbol,SYMBOL_ASK);
Tell me how to run it in the Expert Advisor. I get this message. When trying to run the attached Expert Advisor to the article
OnChartEvent does not work in the tester - that's for now. But the fact that the Expert Advisor in the tester can't load the spy is strange. Is everything working in your demo?
Let me see what I have....

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article The Implementation of a Multi-currency Mode in MetaTrader 5 is published:
For a long time multi-currency analysis and multi-currency trading has been of interest to people. The opportunity to implement a full fledged multi-currency regime became possible only with the public release of MetaTrader 5 and the MQL5 programming language. In this article we propose a way to analyze and process all incoming ticks for several symbols. As an illustration, let's consider a multi-currency RSI indicator of the USDx dollar index.
Author: Константин