Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1181

 
Is it possible to create a sales-only advisor?
 
Quannt:
Is it possible to create an EA for selling only?

Create and sell.

But first, study the articleWhat tests must a trading robot pass before it can be published in the Marketplace?

Какие проверки должен пройти торговый робот перед публикацией в Маркете
Какие проверки должен пройти торговый робот перед публикацией в Маркете
  • www.mql5.com
Все продукты Маркета перед публикацией проходят обязательную предварительную проверку, так как небольшая ошибка в логике советника или индикатора может привести к убыткам на торговом счете. Именно поэтому нами разработана серия базовых проверок, призванных обеспечить необходимый уровень качества продуктов Маркета. Если в процессе проверки...
 
mql5. How can I programmatically find out the limits of the interval in which the test is running?
 

From time to time I see this kind of problem with the standard bollinger on a VPS:

And these are really crooked values:

From another machine logged in, the same standard BB is shown correctly. Maybe the reason is in the build. On VPS 2280 and on the other machine 2286.

 

Can I create dynamic classes with a name?

Class * bomba[];

for (int g = 0; g < sym_total; g++)

{
bomba[SymbolName(g, true)];
}
 
Sunriser:
mql5. How can I programmatically find out the limits of the interval in which the test is run?

You can't. Or try this.

Библиотеки: MultiTester
Библиотеки: MultiTester
  • 2019.12.07
  • www.mql5.com
Статьи и техническая библиотека по автоматическому трейдингу: Библиотеки: MultiTester
 
Comments not related to this topic have been moved to "Questions from MQL4 MT4 MetaTrader 4 beginners".
 
What is the analogue of
Time[0]
in MQL5?
 
secret:
What is the analogue in MQL5?

If you don't want to bother, write it like this:

#define  Time(n)   iTime(NULL,0,n)
#define  Open(n)   iOpen(NULL,0,n)
#define  High(n)   iHigh(NULL,0,n)
#define  Low(n)    iLow(NULL,0,n)
#define  Close(n)  iClose(NULL,0,n)

it will work, but it is better to check for errors - in MT5 sometimes TFs are not available when called

https://www.mql5.com/ru/forum/318901#comment_12623471

 
secret:
What is the analogue in MQL5?

In an indicator or in an EA?

If in an indicator, it broadcasts all the necessary data at once:

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---


If in the Expert Advisor, then there is more choice:

CopyRates,CopyTime

Документация по MQL5: Доступ к таймсериям и индикаторам / CopyRates
Документация по MQL5: Доступ к таймсериям и индикаторам / CopyRates
  • www.mql5.com
Получает в массив rates_array исторические данные структуры MqlRates указанного символа-периода в указанном количестве. Отсчет элементов от стартовой позиции ведется от настоящего к прошлому, то есть стартовая позиция, равная 0, означает текущий бар. При копировании заранее неизвестного количества данных рекомендуется в качестве приемного...
Reason: