индикатор пишет в коммент фон черный и фон не черный в зависимости от цвета фона
//+------------------------------------------------------------------+
//| ChartColor.mq4 |
//| Copyright 2019, AM2 |
//| http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, AM2"
#property link "http://www.forexsystems.biz"
#property version "1.00"
#property strict
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- indicator buffers mapping
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| 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[])
{
//---
string s1="\n Фон черный";
if(ChartGetInteger(0,CHART_COLOR_BACKGROUND,0)!=0) s1="\n Фон не черный";
Comment(s1);
//--- return value of prev_calculated for next call
return(rates_total);
}
//+------------------------------------------------------------------+







AM2