Прорисовка индикатора

 
Написал моментум
//+------------------------------------------------------------------+
//|                                                  My_Momentum.mq4 |
//|                                                        komposter |
//|                                             komposterius@mail.ru |
//+------------------------------------------------------------------+
#property copyright "komposter"
#property link      "komposterius@mail.ru"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 DodgerBlue

extern string _Symbol = "0";
extern int TimeFrame = 0;
extern int MomentumPeriod = 7;
extern int Applied_Price = PRICE_MEDIAN;

double buf1[];

int init()
  {
	if ( _Symbol == "0" ) { _Symbol = Symbol(); }
	if ( TimeFrame == 0 ) { TimeFrame = Period(); }
	string TimeFrame_str;
	switch ( TimeFrame )
	{
		case 1: TimeFrame_str = "M1"; break;
		case 5: TimeFrame_str = "M5"; break;
		case 15: TimeFrame_str = "M15"; break;
		case 30: TimeFrame_str = "M30"; break;
		case 60: TimeFrame_str = "H1"; break;
		case 240: TimeFrame_str = "H4"; break;
		case 1440: TimeFrame_str = "Daily"; break;
		case 10080: TimeFrame_str = "Weekly"; break;
	}
	IndicatorShortName( "My_Momentum (" + MomentumPeriod + ") - " + _Symbol + ", " + TimeFrame_str + "   -   " );
	IndicatorDigits ( MarketInfo( _Symbol, MODE_DIGITS ) );

	SetIndexBuffer( 0 , buf1 );
	SetIndexStyle ( 0 , DRAW_LINE , STYLE_SOLID , 1 );
                SetIndexDrawBegin( 0 , MomentumPeriod );
	SetIndexEmptyValue( 0 , 1.0 );
	SetIndexLabel( 0 , "Momentum");

	return(0);
  }

int start()
{
   if ( Bars <= MomentumPeriod ) { return(0); }
	int counted_bars = IndicatorCounted();
	if ( counted_bars < 0 ) return(-1);
	if ( counted_bars > 0 ) counted_bars -- ;

   int limit = Bars - MomentumPeriod - 1;
   if ( counted_bars >= MomentumPeriod ) { limit = Bars - counted_bars - 1; }

	for ( int i = limit; i >= 0; i -- )
	{
		double high[], low[], close[], open[];
		ArrayCopySeries ( high, MODE_HIGH, _Symbol, TimeFrame );
		ArrayCopySeries ( low, MODE_LOW, _Symbol, TimeFrame );
		ArrayCopySeries ( close, MODE_CLOSE, _Symbol, TimeFrame );
		ArrayCopySeries ( open, MODE_OPEN, _Symbol, TimeFrame );
		double _Price1, _Price2;
		switch ( Applied_Price )
		{
			case 0: _Price1 = close[i]; _Price2 = close[i + MomentumPeriod]; break;
			case 1: _Price1 = open[i]; _Price2 = open[i + MomentumPeriod]; break; 
			case 2: _Price1 = high[i]; _Price2 = high[i + MomentumPeriod]; break;
			case 3: _Price1 = low[i]; _Price2 = low[i + MomentumPeriod]; break;
			case 4: _Price1 = ( high[i] + low[i] )/2; _Price2 = ( high[i + MomentumPeriod] + low[i + MomentumPeriod] )/2; break;
			case 5: _Price1 = ( high[i] + low[i] + close[i] )/3; _Price2 = ( high[i + MomentumPeriod] + low[i + MomentumPeriod] + close[i + MomentumPeriod] )/3; break;
			case 6: _Price1 = ( high[i] + low[i] + close[i] + close[i] )/4; _Price2 = ( high[i + MomentumPeriod] + low[i + MomentumPeriod] + close[i + MomentumPeriod] + close[i + MomentumPeriod] )/4; break;
		}
		buf1[i] = _Price1 - _Price2;
	}
	
return(0);
}

Всё рисуется нормально
Меняю последнюю строку

buf1[i] = _Price1 - _Price2;


на

buf1[i] = _Price1 - _Price2 + 1;


и там, где раньше был "0" (а сейчас должна быть "1") пустота. Ничего не рисует.
Чья ошибка - моя или MQL?

принтскрины послал на stringo@metaquotes.ru

 
значение 1 не должно отрисовываться по определению
SetIndexEmptyValue( 0 , 1.0 );
 
да, это я сглупил :)
вообще, я по другому понимал смысл SetIndexEmptyValue. будем знать...
 
PS: перестали приходить уведомления на почту :(
как сдёлали редактирование сообщений - повалилась куча (наверное, за каждое редактирование - по уведомлению =),
а сейчас вообще не приходят..... места в ящике полно.....