And I don't need to get a price stack, but to have such simple features:
1. clear the contents of Market Watch.
2. Add the desired characters there (this is available)
3. Use function or event to receive all ticks that are displayed in Market Watch from each symbol, or make OptiScope together with Multi-tick function.
GetSymbolByName(string symbol)
{
string symbol_name=""; // Имя символа на сервере//--- Если передали пустую строку, вернем пустую строкуif(symbol=="")
return("");
//--- Пройтись по списку всех символов на сервереfor(int s=0; s<SymbolsTotal(false); s++)
{
//--- Получим имя символа
symbol_name=SymbolName(s,false);
//--- Если искомый символ есть на сервереif(symbol==symbol_name)
{
//--- Выберем его в окне "Обзор рынка"SymbolSelect(symbol,true);
//--- Вернем имя символаreturn(symbol);
}
}
//--- Если искомого символа нет, вернем пустую строкуPrint("Символ "+symbol+" не найден на сервере!");
return("");
}
int OnInit()
{
//---
GetSymbolByName("EURUSD"+SymbolSuffix);
GetSymbolByName("GBPUSD"+SymbolSuffix);
GetSymbolByName("EURGBP"+SymbolSuffix);
}
void OnTimer() // или OnTick
{
if(!SymbolInfoTick("EURUSD"+SymbolSuffix,tickEUR)) {Print("EURUSD price has not been received"); return;}
if(!SymbolInfoTick("GBPUSD"+SymbolSuffix,tickGBP)) {Print("GBPUSD price has not been received"); return;}
if(!SymbolInfoTick("EURGBP"+SymbolSuffix,tickEURGBP)) {Print("EURGBP price has not been received"); return;}
if(tickEUR.ask!=0 && tickEUR.bid!=0) {} // ну и все в этом духе
}
How can you be so ungodly obtuse for so many posts?
You can recognise people who offer something useful by the arrows sticking out of their backs. Anything new is always met with a hostile response. Especially those who make money selling arbitrage advisors copied from hrenfx since their direct use in the market is impossible because of the opposition of this brokerage company.
You will still have to do this via a timer. The timer simply needs an algorithm so that it doesn't make a request if the last tick is the same as the previous tick.
You will still have to do this via a timer. The timer simply needs an algorithm so that it doesn't make a request if the last tick is the same as the previous tick.
BookEvent will not help you here.
Yes, but you should also take into account that there's only one timer here, not so, so VC++, and if you have a lot of timer checks, you just might lose many ticks and everything will turn to mush.
Interestingly, yesterday I wanted to use the features of MarketBookAdd and OnBookEvent to make a multi-currency EA.
But for some reason MarketBookAdd on the tester doesn't work. It gives an error 4901-Theprice stackcannot be added.
It only works in real time.
And I don't need to get a price stack, but to have such simple features:
1. clear the contents of Market Watch.
2. Add the desired characters there (this is available)
3. Use function or event to receive all ticks that are displayed in Market Watch from each symbol, or make OptiScope together with Multi-tick function.
And I don't need to get the stack of prices, but to have such simple possibilities:
1. clear the contents of Market Watch.
2. Add the desired characters there (this is available)
3. Use function or event to receive all ticks that are displayed in Market Watch from each symbol, or make Optiсk together with MultiTick function.
It is not quite clear why you decided to go through the price stack if you want to work with market overview and ticks?
And where are you going to get the data from all the quotes that are visible or added to the market overview.
And where are you going to get the data from all the quotes that are visible or added to the market overview.
And where are you going to get the data from all the quotes that are visible or added to the market overview.
How can you be so ungodly obtuse for so many posts?
It would be inefficient if EA handles every tick, even if milliseconds are used in timer.
Need an easier way to get all ticks directly from the market overview.
A through OpTisk is not possible, because it only works when the next tick comes where the EA is standing.
You will still have to do this via a timer. The timer simply needs an algorithm so that it doesn't make a request if the last tick is the same as the previous tick.
BookEvent will not help you here.
You will still have to do this via a timer. The timer simply needs an algorithm so that it doesn't make a request if the last tick is the same as the previous tick.
BookEvent will not help you here.
Yes, but you should also take into account that there's only one timer here, not so, so VC++, and if you have a lot of timer checks, you just might lose many ticks and everything will turn to mush.