Проблема при печати графика на принтере. Не видно индикатор.

 

Проблема при печати графика на принтере. Не видно совсем индикатор.

На графике - это точки. Как ее решить в программном коде?

//+------------------------------------------------------------------+
//|                                                      itddots.mq4 |
//|                                                          Frostow |
//|                            https://www.mql5.com/en/users/frostow |
//+------------------------------------------------------------------+
#property copyright "Frostow"
#property link      "https://www.mql5.com/en/users/frostow"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_plots   2
#property indicator_color1 clrGreen
#property indicator_type1   DRAW_ARROW
#property indicator_width1 2
#property indicator_color2 clrBlue
#property indicator_type2   DRAW_ARROW
#property indicator_width2 2

input int Level=1; //Dot's level

bool new_candle=true;
double pdH,pdL,pricesH[],pricesL[];
bool DOTH,DOTL;

double UpDot[],DownDot[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
   ChartRedraw(1);
   SetIndexBuffer(0,UpDot);
   SetIndexBuffer(1,DownDot);
   SetIndexEmptyValue(0,0.0);
   SetIndexEmptyValue(1,0.0);
   SetIndexArrow(0,159);
   SetIndexArrow(1,159);
   SetIndexLabel(0,"TD "+IntegerToString(Level)+" High");
   SetIndexLabel(1,"TD "+IntegerToString(Level)+" Low");
  
   if(Level <= 0 || Level >= 200){
      Print("Here is an error. Use another level value.");
      ChartIndicatorDelete(0, 0, "itddots");
      }
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int i=Bars-IndicatorCounted();

   for(; i>=0; i--)
     {
      DOTH = true;
      DOTL = true;
      GetVariables(i,Level);

      for(int ii=0; ii<ArraySize(pricesH); ii++)
        {
         if(pdH < pricesH[ii]) DOTH = false;
         if(pdL > pricesL[ii]) DOTL = false;
        }

      if(DOTH) UpDot[i+Level+1]=pdH;//high
      if(DOTL) DownDot[i+Level+1]=pdL; //low

      if(UpDot[i+Level+1]==UpDot[i+Level+2]) UpDot[i+Level+2]=0;
      if(DownDot[i+Level+1]==DownDot[i+Level+2]) DownDot[i+Level+2]=0;
     }
   return(0);
  }
//+------------------------------------------------------------------+

void GetVariables(int start_candle,int level)
  {
   pdH = iHigh(NULL,0, start_candle + 1 + level);
   pdL = iLow(NULL, 0, start_candle + 1 + level);

   ArrayResize(pricesH,level*2+1);
   ArrayResize(pricesL,level*2+1);

   for(int i=level*2; i>=0; i--)
     {
      pricesH[i] = iHigh(NULL, 0, start_candle + i + 1);
      pricesL[i] = iLow(NULL, 0, start_candle + i + 1);
     }
  }

//+------------------------------------------------------------------+


Что надо изменить, чтобы при печати были видны точки на бумаге?

Ivan Morozov
Ivan Morozov
  • www.mql5.com
Trader's profile
 
Решил сам - увеличил #property indicator_width2 с 2 до 10и стало видно!
Причина обращения: