Heiken Ashi drawing with 4 digits

 

Hello,

I am looking for how to draw Heiken Ashi with 4 digits instead of 5 digits. I have to cut the 5th digit. I couldn*t find anything until now.

Thanks a lot.

Steffen

 

Hiermit:

//--- set the indicators accuracy
   IndicatorSetInteger(INDICATOR_DIGITS, 4);
Im Quellcode in OnInit() platzieren.
 
Carl Schreiber #:
IndicatorSetInteger(INDICATOR_DIGITS, 4);

Vielen Dank für die schnelle Antwort. Das habe ich bereits gemacht und er zeigt im Datenfeld bei den Heiken Ashi Angaben auch nur noch 4 Stellen an. Allerdings werden die Kerzen noch nach der 5. Stelle gezeichnet. Beim Zeichnen werden die Standarddaten herangezogen.


Die Lösung muss woanders liegen.

Danke

 

Dann musst Du bei der Berechnung der Kerzen des Heiken runden: NormalizeDouble().

Vergleich aber beide Versionen, eventuell kommt es durch das Runden zu Folgefehler?

Documentation on MQL5: Conversion Functions / NormalizeDouble
Documentation on MQL5: Conversion Functions / NormalizeDouble
  • www.mql5.com
Rounding floating point number to a specified accuracy. Parameters value [in] Value with a floating point. digits [in]  Accuracy format...