TrendLineVisible (Get method)

추세선 가시성 플래그 가져오기.

bool  TrendLineVisible()

값 반환

추세선에 표시되는지 여부를 지정하는 플래그 값.

TrendLineVisible (Set 메서드)

추세선 가시성 플래그를 설정.

void  TrendLineVisible(
   const bool  visible      // 플래그 값 
  \)

매개변수

visible

[in]  추세선 가시성 플래그 값.

예시:

graphics_trend

아래는 차트에 언급된 추세선과 추세선의 코드입니다:

//+------------------------------------------------------------------+
//|                                             TrendLineGraphic.mq5 |
//|                         Copyright 2000-2024, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#include <Graphics\Graphic.mqh>
//+------------------------------------------------------------------+
//| 스크립트 프로그램 시작 함수                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   double x[]={12.0,11.5,11.0,12.0,10.5,10.0,9.0,8.5,10.0,8.5,10.0,8.0,9.5,10.0,15.0};
   double y[]={130.0,165.0,150.0,150.0,140.0,198.0,220.0,215.0,225.0,190.0,170.0,160.0,150.0,225.0,95.00};
//--- 그래픽 생성
   CGraphic graphic;
   if(!graphic.Create(0,"TrendLineGraphic",0,30,30,780,380))
     {
      graphic.Attach(0,"TrendLineGraphic");
     }
//--- 곡선 생성
   CCurve *curve=graphic.CurveAdd(x,y,CURVE_POINTS);
//--- 곡선 속성 설정 
   curve.TrendLineVisible(true);
   curve.TrendLineColor(ColorToARGB(clrRed));
//--- 플롯 
   graphic.CurvePlotAll();
   graphic.Update();
  }