Errors, bugs, questions - page 862

 
Yedelkin:
I see. You could, of course, make a suggestion to Service Desk to get an official response. But I'm afraid that it (the answer) will be something like this: "The programmer is able to calculate the boundary date and limit the depth of the requested history"...

Is it OK that this doesn't makeSeriesInfoInteger(Symbol(),Period(),SERIES_FIRSTDATE) and other similar things work?

and how can you calculate boundary date? by eye xD

because i see all functions work as if everything is ok

 

Please advise how to deal with indicators.

The Expert Advisor's code calls the custom indicator, but it is also built on the custom one and cannot find the latter during testing.

How do I attach it and where?

PS. The indicator loads normally in real time.

 

Why did the spread increase at closing time?


spread

 
Zeleniy:

Why did the spread increase at closing time?

because traders have removed orders from the stack
 
It has nothing to do with the glass if the spread is a commission. Where did you see that on mamba, there's just a gap on Monday
 

Who has encountered the following problem: when using several coloured buffers, there are problems with the drawing of the indicator. And it's the one which is declared first.

Here is a simple code of the indicator:

#property indicator_chart_window
#property indicator_buffers 4
#property indicator_plots   2
//--- plot ColorLine
#property indicator_label1  "ColorLine"
#property indicator_type1   DRAW_COLOR_LINE
#property indicator_color1  clrRed,clrBlue
#property indicator_style1  STYLE_SOLID
#property indicator_width1  2

#property indicator_label2  "ColorLine"
#property indicator_type2   DRAW_COLOR_LINE
#property indicator_color2  clrRed,clrBlue
#property indicator_style2  STYLE_SOLID
#property indicator_width2  2

double         LineBuffer_1[];
double         LineBuffer_2[];

double         Color_1[];
double         Color_2[];
 

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
   SetIndexBuffer(0,LineBuffer_1,INDICATOR_DATA);
   SetIndexBuffer(1,Color_1,INDICATOR_COLOR_INDEX);
   PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,0.0);  
   
   SetIndexBuffer(2,LineBuffer_2,INDICATOR_DATA);
   SetIndexBuffer(3,Color_2,INDICATOR_COLOR_INDEX);
   PlotIndexSetDouble(2,PLOT_EMPTY_VALUE,0.0);  
   
//---
   return(0);
  }
//+------------------------------------------------------------------+
//| 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(prev_calculated==0)
     {
      ArrayInitialize(LineBuffer_1,0.0);
      ArrayInitialize(LineBuffer_2,0.0);
     } 
   for(int i=0;i<rates_total;i++)
     {
      if(close[i]>open[i])
      {    LineBuffer_1[i]=high[i];    
           Color_1[i]=1;
      }     
      else
      {
          LineBuffer_2[i]=low[i];    
          Color_2[i]=0;
      }
      
     }
  return(rates_total);
  }

And here is the indicator:

 

As ifPlotIndexSetDouble(0,PLOT_EMPTY_VALUE,0.0) does not work;

 
Zeleniy:
It has nothing to do with the glass if the spread is a commission. Where did you see that on mamba? It's just a gap on Monday.
It's like you asked and you answered.
;)
 
Zeleniy:
причем тут стакан если спред это комисия. Где вы видели такое на мамбе там просто гэп на на понедельник
as if you asked and answered it yourself
;)

Spread is not a commission. That's whatsergeev said - because traders have removed bids from the stack.
 
tyup:

As if PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,0.0) does not work;

Instead of

PlotIndexSetDouble(2,PLOT_EMPTY_VALUE,0.0);

try

PlotIndexSetDouble(1,PLOT_EMPTY_VALUE,0.0); 
Reason: