Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам - страница 2074

 

Коллеги, есть вопрос.

На пользовательском символе не могу "достучаться" до текущего бара Таймфрейма MN1. Но при переключении Таймфрейма графика данные появляются на одном-двух тиках. Вот такой код работает в OnCalculate()

   double RRR=iOpen(_Symbol, PERIOD_MN1, 0);
   if(RRR<=0.0) {
      printf("The opening bar of the month %s was not found (RRR: %.6f)", _Symbol, RRR);
      return 0;
   }
   printf("RRR: %.6f", RRR);

Выходят такие логи

CS      0       13:41:22.267    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:23.029    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:23.516    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:24.912    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:25.910    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:27.049    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:30.693    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:31.302    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:31.790    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:33.501    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:34.010    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:35.247    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:38.507    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M1)      RRR: 0.40530
CS      0       13:41:39.905    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M1)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:40.502    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M1)      RRR: 0.40530
CS      0       13:41:41.412    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M1)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:42.180    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M1)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:43.040    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M1)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:43.776    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M1)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:47.380    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M1)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:49.464    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      RRR: 0.40530
CS      0       13:41:50.638    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      RRR: 0.40530
CS      0       13:41:53.292    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:56.624    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:57.315    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:41:58.136    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:42:01.314    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:42:02.011    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:42:02.898    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
.....
CS      0       13:45:15.242    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:15.855    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:17.893    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:18.748    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:19.273    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:19.828    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:20.670    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:22.086    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:22.465    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:22.967    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     RRR: 0.40530
CS      0       13:45:24.302    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:25.166    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:25.722    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:30.242    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:32.561    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:33.973    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:34.703    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:35.571    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:45:36.399    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
.....
CS      0       13:47:33.484    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:34.714    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:37.030    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:39.272    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:39.816    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:40.533    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:44.418    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:46.959    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:47.551    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M15)     The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:48.645    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      RRR: 0.40530
CS      0       13:47:50.287    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:50.862    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      RRR: 0.40530
CS      0       13:47:51.665    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:52.170    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:53.764    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:54.263    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:54.832    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:55.330    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,M5)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:47:57.548    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      RRR: 0.40530
CS      0       13:47:58.707    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      RRR: 0.40530
CS      0       13:47:59.524    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:48:02.536    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:48:02.904    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:48:03.769    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:48:04.139    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:48:04.504    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:48:05.095    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:48:06.064    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:48:06.449    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:48:07.166    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)
CS      0       13:48:07.710    VIVA_139_Potencial_Coin_Persent (3) (f_ADAUSDT,H4)      The opening bar of the month f_ADAUSDT was not found (RRR: 0.000000)

Данные (когда они есть) правильные. Что такое может быть? На стандартных символах показывает всё правильно:

CS      0       19:48:30.396    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,MN1)       RRR: 0.988260
CS      0       19:48:30.573    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,MN1)       RRR: 0.988260
CS      0       19:48:30.573    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,MN1)       RRR: 0.988260
CS      0       19:48:32.015    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,MN1)       RRR: 0.988260
CS      0       19:48:32.015    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,MN1)       RRR: 0.988260
CS      0       19:48:33.128    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,MN1)       RRR: 0.988260
CS      0       19:48:33.128    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,MN1)       RRR: 0.988260
CS      0       19:48:33.482    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,MN1)       RRR: 0.988260
CS      0       19:48:33.483    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,MN1)       RRR: 0.988260
CS      0       19:48:34.270    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:34.278    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:34.282    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:34.524    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:34.524    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:35.407    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:35.407    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:36.260    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
.....
CS      0       19:48:37.265    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:37.640    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:37.641    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:39.047    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:39.047    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:39.204    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:39.205    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:39.364    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:39.364    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:40.615    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:40.615    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:40.778    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:40.779    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M5)        RRR: 0.988260
CS      0       19:48:41.404    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M15)       RRR: 0.988260
CS      0       19:48:41.405    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M15)       RRR: 0.988260
CS      0       19:48:41.564    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M15)       RRR: 0.988260
CS      0       19:48:41.913    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M15)       RRR: 0.988260
CS      0       19:48:42.392    VIVA_139_Potencial_Coin_Persent (3) (EURUSD,M15)       RRR: 0.988260
 

Попробовал по другому запросить данные, с помощью CopyOpen(). Результат то же

   double value_open[1];
   int rates_size=CopyOpen(_Symbol, PERIOD_MN1, 0, 1, value_open);
   if(rates_size!=1) {
      printf("The opening bar of the month %s was not found (value_open[0]: %.6f)", _Symbol, value_open[0]);
      return 0;
   }
   printf("value_open[0]: %.6f", value_open[0]);

Прилагаю код тестового индикатора


P.S. Символ создаёт советник. Он же закачивает данные котировок с биржи Binance. Спецификация символа ниже в архиве. На графике бар, по которому запрашиваются данные, есть. Данные его показываются в окне данных.

Это на M5

Это на MN1


Файлы:
 
Andrey Kaunov #:

Попробовал по другому запросить данные, с помощью CopyOpen(). Результат то же

Прилагаю код тестового индикатора


P.S. Символ создаёт советник. Он же закачивает данные котировок с биржи Binance. Спецификация символа ниже в архиве. На графике бар, по которому запрашиваются данные, есть. Данные его показываются в окне данных.

Это на M5

Это на MN1


Писал о подобном недавно:

https://www.mql5.com/ru/forum/430763

Сбой в работе функции iTime() - Проверьте готовность данных на ТФ загодя, вызвав до начала расчетов функцию ArrayCopyRates.
Сбой в работе функции iTime() - Проверьте готовность данных на ТФ загодя, вызвав до начала расчетов функцию ArrayCopyRates.
  • 2022.08.15
  • www.mql5.com
Следующий раз использовал скрипт в 11 часов 28 минут. прикрепите код скрипта или его кусок с вызовом iTime Очевидно же. продолжат ли они обновляться если этот таймфрейм длительное время не будет использоваться не открыто окно с этим таймфреймом
 
Как выход, открыть несколько окон нужных таймфреймов, и держать их открытыми.
 
FxPro7009 #:
Как выход, открыть несколько окон нужных таймфреймов, и держать их открытыми.
Неважно, какой ТФ открыт. Даже если MN1, данные всё равно не видит. 

Я уж не пишу, что индикатору нужны будут данные с других инструментов. Он своего то не видит. 
 

Приветствую!

Просветите, почему кнопки на buy/sell (на графике) не работают в тестере?

часть кода на кнопку sell:

  int OnInit()
  {

//--- SELL NOW
   ObjectCreate(0,"Button_10",OBJ_BUTTON,0,0,0);
   ObjectSetInteger(0,"Button_10",OBJPROP_XDISTANCE,130);
   ObjectSetInteger(0,"Button_10",OBJPROP_YDISTANCE,80);
   ObjectSetInteger(0,"Button_10",OBJPROP_XSIZE,100);
   ObjectSetInteger(0,"Button_10",OBJPROP_YSIZE,30);
   ObjectSetString(0,"Button_10",OBJPROP_TEXT,"SELL now");
   ObjectSetInteger(0,"Button_10",OBJPROP_FONTSIZE,TEXTSIZE);
   ObjectSetInteger(0,"Button_10",OBJPROP_BGCOLOR,Crimson);
   ObjectSetInteger(0,"Button_10",OBJPROP_COLOR,White);
   ObjectCreate(0,"Label_10",OBJ_LABEL,0,0,0);
   ObjectSetInteger(0,"Label_10",OBJPROP_XDISTANCE,20);
   ObjectSetInteger(0,"Label_10",OBJPROP_YDISTANCE,40);
   ObjectSetInteger(0,"Label_10",OBJPROP_CORNER,CORNER_LEFT_UPPER);
   ObjectSetInteger(0,"Label_10",OBJPROP_COLOR,clrBlack);
//---
}


void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {

 if(sparam=="Button_10")
     {
      if(CountOrders()<Maxorders)
        {
         ticket = OrderSend(_Symbol,OP_SELL,LOT,Bid,0,0,0,NULL,0,0,clrRed);
         ObjectSetString(0,"Label_10",OBJPROP_TEXT,DoubleToString(DBL_MAX,Digits));
         ObjectSetInteger(0,"Button_10",OBJPROP_STATE,false);
         ObjectSetText("MSG","открыли ордер по SELL",TEXTSIZE,0, White);
         ObjectSetText("MSG2","зашли по цене Bid: "+ DoubleToString(Bid,Digits),TEXTSIZE,0, White);
        }
      if(CountOrders()>=Maxorders)
        {
         ObjectSetText("MSG","превышено максимальное число",TEXTSIZE,0, White);
         ObjectSetText("MSG2","допустимых ордеров!",TEXTSIZE,0, White);
        }
     }
}
 
Порт-моне тв #:

Приветствую!

Просветите, почему кнопки на buy/sell (на графике) не работают в тестере?

часть кода на кнопку sell:

Не работает в тестере обработчик событий.
Контролируйте в онтик состояние кнопок.
 
приветствую всех! нужна ваша помощь . как прикрепить буфера к индикатору  CurrencyPowerMeterWithNotes? 
Файлы:
 
khasan kayumov #:
приветствую всех! нужна ваша помощь . как прикрепить буфера к индикатору  CurrencyPowerMeterWithNotes? 
#property indicator_chart_window
#property indicator_buffers 1
//#property indicator_color1 Black
double MyBufer[]; //Обязательно double

int init() 
{
IndicatorBuffers(indicator_buffers);
SetIndexBuffer(0,MyBufer); //Условный номер ноль
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,3,clrRed);
SetIndexDrawBegin(0,0); //Начало прорисовки
...
}

int start()
{
MyBufer[номер бара]=значение;

Подробнее в справке. ;)))

 
Artyom Trishkin #:
Не работает в тестере обработчик событий.
Контролируйте в онтик состояние кнопок.
И как это «взять под контроль»? 
Причина обращения: