#property indicator_chart_window #property indicator_buffers 1 #property indicator_plots 1 //---- 플롯 라벨1 #property indicator_label1 "라벨1" #property indicator_type1 DRAW_LINE #property indicator_color1 clrRed #property indicator_style1 STYLE_SOLID #property indicator_width1 1 //--- 지표 버퍼 double Label1Buffer[]; //+------------------------------------------------------------------+ //| 사용자 지정 지표 초기화 함수 | //+------------------------------------------------------------------+ void OnInit() { //--- 지표 버퍼 맵핑 SetIndexBuffer(0,Label1Buffer,INDICATOR_DATA); //--- } //+------------------------------------------------------------------+ //| 사용자 지정 지표 반복 함수 | //+------------------------------------------------------------------+ 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(ArrayIsSeries(open)) Print("open[]이 시계열입니다"); else Print("open[]이 시계열이 아닙니다!!!"); //--- 다음 호출을 위한 prev_calculated의 반환 값 return(rates_total); } |