LevelStyle (Método Get)

Obtém o estilo da linha de nível específico do objeto gráfico.

ENUM_LINE_STYLE  LevelStyle(
   int  level      // Level number
   ) const

Parâmetros

level

[in]  Número de nível.

Valor do Retorno

Estilo da linha de nível específico do objeto gráfico anexado a uma instância de classe. Se não é anexado ao objeto ou o objeto não tem um nível específico, retorna WRONG_VALUE.

LevelStyle (Método Set)

Define estilo da linha de nível específico do objeto gráfico.

int  LevelStyle(
   int              level,     // Level number
   ENUM_LINE_STYLE  style      // Line Style
   )

Parâmetros

level

[in]  Número de nível.

style

[in]  Novo estilo de linha do nível especificado.

Valor do Retorno

verdadeiro - se bem sucedido, falso - não é possível mudar o estilo.

Exemplo

//--- example for CChartObject::LevelStyle 
#include <ChartObjects\ChartObject.mqh> 
//--- 
void OnStart() 
  { 
   CChartObject object; 
   //--- 
   for(int i=0;i<object.LevelsCount();i++) 
     { 
      //--- get level style of chart object  
      ENUM_LINE_STYLE level_style=object.LevelStyle(i); 
      if(level_style!=STYLE_SOLID
        { 
         //--- set level style of chart object 
         object.LevelStyle(i,STYLE_SOLID); 
        } 
     } 
  }