Saya membayangkan Anda memiliki array di luar jangkauan pesan kesalahan pada log Experts Anda (jika perubahan saat ini adalah bar tertua dalam grafik, Anda tidak dapat menambahkannya) Inserted Code #property ketat #property indior_chart_window #property indior_buffers 7 double dayHighNumber 91; # 93 ;, dayLowNumber 91; # 93 ;, upper3 # 91; # 93 ;, lower3 # 91; # 93 ;, dayOpen # 91; # 93 ;, prevPose # 91; # 93 ;, closeopen2 # 91; # 93; ; int OnInit () SetIndexBuffer (0, dayHigh); SetIndexBuffer (1, dayLow); SetIndexBuffer (2, upper3); SetIndexBuffer (3, lower3); SetIndexBuffer (4, dayOpen); SetIndexBuffer (5, prevClose); SetIndexBuffer (6, closeopen2); SetIndexStyle (0, DRAW_LINE, STYLE_SOLID); SetIndexStyle (1, DRAW_LINE, STYLE_SOLID); SetIndexStyle (dua, DRAW_LINE, STYLE_DASH); SetIndexStyle (3, DRAW_LINE, STYLE_DASH); SetIndexStyle (4, DRAW_LINE, STYLE_SOLID); SetIndexStyle (5, DRAW_LINE, STYLE_SOLID); SetIndexStyle (6, DRAW_LINE, STYLE_DOT); hasil (INIT_SUCCEEDED); int OnCalculate (const int rates_total, const int prev_calculated, const datetime time # 91; # 93 ;, const double open # 91; # 93 ;, const double high # 91; # 93 ;, const double non # 91; # 93; , const double close # 91; # 93 ;, const panjang tick_volume # 91; # 93 ;, const volume panjang # 91; # 93 ;, const int disperse # 91; # 93; -RRB- untuk (int I = rates_total- fmax (prev_calculated, 1); igt; = 0; I--) datetime midnight = Waktu # 91; I # 93 ;-( Waktu # 91; I # 93;% 86400); int change = iBarShift (NULL, 0, tengah malam), cnt = shift-i 1, indexHigh = iHighest (NULL, 0, MODE_HIGH, cnt, I), indexLow = iLowest (NULL, 0, MODE_LOW, cnt, I); dayHighNumber 91; I # 93; = Tinggi # 91; indexHigh # 93 ;; dayLow # 91; I # 93; = Rendah # 91; indexLow # 93 ;, rentang ganda = (siangHigh # 91; I # 93; -dayLow # 91; I # 93; -RRB-Originally Posted by ;