Saya mengubah kode berikut untuk mencoba mendapatkan ATR dalam ruangan untuk menampilkan 5 digit di jendela data. Yang saya tambahkan adalah Indoor Digit (Digit) ;. Itu masih menunjukkan 4 digit di jendela data.

Ya, saya mengkompilasi ulang, menutup dan memulai kembali MT4 dll. Dll. Masih tidak jalan.

Berikut kodenya:
Kode yang Dimasukkan/ --------------------------------------------- --------------------- /| ATR.mq4 |/| Hak Cipta © 2005, MetaQuotes Software Corp. |/| # 91; url # 93; http:/www.metaquotes.net/#91;url # 93; |/ ----------------------------------------------- ------------------- hak cipta #property Copyright © 2005, MetaQuotes Software Corp. #property link # 91; url # 93; http:/www.metaquotes.net# 91;url # 93; #property indior_separate_window #property indior_buffers 1 #property indior_color1 DodgerBlue/---- parameter input eksternal int AtrPeriod = 14;/---- buffer ganda AtrBuffer # 91; # 93 ;; TempBuffer ganda # 91; # 93 ;;/ ----------------------------------------------- ------------------- /| Fungsi inisialisasi kustom bawah |/ ----------------------------------------------- ------------------- int init () {string short_name;/---- 1 buffer tambahan yang digunakan untuk menghitung. IndiorBuffers (2); IndiorDigits (Digit);/---- baris indior SetIndexStyle (0, DRAW_LINE); SetIndexBuffer (0, AtrBuffer); SetIndexBuffer (1, TempBuffer);/---- nama untuk DataWindow dan label subwindow indior short_name = ATR ( AtrPeriod ); IndiorShortName (short_name); SetIndexLabel (0, short_name);/---- SetIndexDrawBegin (0, AtrPeriod);/---- return (0); }/ ---------------------------------------------- -------------------- /| Rata-Rata Kisaran Benar |/ ----------------------------------------------- ------------------- int start () {int i, counted_bars = IndiorCounted ();/---- if (Barslt; = AtrPeriod) kembali (0);/---- awal nol jika (counted_barslt; 1) untuk (i = 1; ilt; = AtrPeriod; i ) AtrBuffer # 91; Bars-i # 93; = 0,0;/---- i = Bar-counted_bars-1; while (igt; = 0) {double high = Tinggi # 91; i # 93 ;; double low = Rendah # 91; i # 93 ;; if (i == Bars-1) TempBuffer # 91; i # 93; = tinggi-rendah; else {double prevclose = Tutup # 91; i 1 # 93 ;; TempBuffer # 91; i # 93; = MathMax (tinggi, tutup) -MathMin (rendah, tutup); } saya--; }/---- if (counted_barsgt; 0) counted_bars--; int limit = Bar-counted_bars; untuk (i = 0; ilt; batas; i ) AtrBuffer # 91; i # 93; = iMAOnArray (TempBuffer, Bar, AtrPeriod, 0, MODE_SMA, i);/---- return (0); }/ ---------------------------------------------- --------------------