Ho modifio il seguente codice per provare a far sì che ATR indoor mostri 5 cifre nella finestra dei dati. Tutto ciò che ho aggiunto era Indoor Digits (Digits) ;. Mostra ancora 4 cifre nella finestra dei dati.
Sì, ho ri-compilato, chiuso e riavviato MT4 ecc. Ecc. Ecc. Ancora no.
Ecco il codice:
Codice inserito/ --------------------------------------------- --------------------- /| ATR.mq4 |/| Copyright © 2005, MetaQuotes Software Corp. |/| # 91; url # 93; http:/www.metaquotes.net/#91;url # 93; |/ ----------------------------------------------- ------------------- #property copyright Copyright © 2005, MetaQuotes Software Corp. # collegamento aziendale n. 91; url # 93; http:/www.metaquotes.net# 91;url # 93; #property indior_separate_window #property indior_buffers 1 #property indior_color1 DodgerBlue/---- parametri di input extern int AtrPeriod = 14;/---- buffer double AtrBuffer # 91; # 93 ;; double TempBuffer # 91; # 93 ;;/ ----------------------------------------------- ------------------- /| Funzione di inizializzazione dell'indiorità personalizzata |/ ----------------------------------------------- ------------------- int init () {string short_name;/---- 1 buffer aggiuntivo utilizzato per il conteggio. IndiorBuffers (2); IndiorDigits (cifre);/---- indior line SetIndexStyle (0, DRAW_LINE); SetIndexBuffer (0, AtrBuffer); SetIndexBuffer (1, TempBuffer);/---- name per DataWindow e indior subwindow label short_name = ATR ( AtrPeriod ); IndiorShortName (SHORT_NAME); SetIndexLabel (0, SHORT_NAME);/---- SetIndexDrawBegin (0, AtrPeriod);/---- return (0); }/ ---------------------------------------------- -------------------- /| Media gamma reale |/ ----------------------------------------------- ------------------- int start () {int i, counted_bars = IndiorCounted ();/---- if (Barslt; = AtrPeriod) return (0);/---- zero iniziale if (counted_barslt; 1) per (i = 1; ilt; = AtrPeriod; i ) AtrBuffer # 91; Bars-i # 93; = 0.0;/---- i = Bars-counted_bars-1; while (igt; = 0) {double high = High # 91; i # 93 ;; double low = Low # 91; i # 93 ;; if (i == Bars-1) TempBuffer # 91; i # 93; = alto-basso; else {double prevclose = Close # 91; i 1 # 93 ;; TempBuffer # 91; i # 93; = MathMax (alto, prevclose) -MathMin (basso, prevclose); } io--; }/---- if (counted_barsgt; 0) counted_bars--; int limit = Bars-counted_bars; for (i = 0; ilt; limit; i ) AtrBuffer # 91; i # 93; = iMAOnArray (TempBuffer, Bars, AtrPeriod, 0, MODE_SMA, i);/---- return (0); }/ ---------------------------------------------- --------------------