#property indicator_chart_window #property indicator_buffers 1 #property indicator_plots 1 //---- Label1 をプロットする #property indicator_label1 "Label1" #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[] is timeseries"); else Print("open[] is not timeseries!!!"); //--- 次の呼び出しのために prev_calculated の値を返す return(rates_total); } |