Decimal values

All questions regarding forum support go into this section.

Moderator: admin

Forum rules
No general discussions. ONLY questions regarding forum functionality, user registration, problems with forum use, etc..

Decimal values

Postby mistertrade » Sun Nov 18, 2018 12:14 pm

The value of some indicators appears with no decimal in the "Legend" section. I don't understand why.
For example, it's the case for 'MVA' indicator : The legend displays "MVA(Ger30.Close,20) : 11369" instead of ""MVA(Ger30.Close,20) : 11369,45" .

What can I do to solve this problem ?

Thank you,
Posts: 7
Joined: Mon Nov 07, 2016 10:43 pm
Location: Paris

Re: Decimal values

Postby Apprentice » Wed Nov 21, 2018 9:29 am

You can add this to somting like this in your indicator.
local precision = math.max(2, source:getPrecision());


For 10 decimal places.


Simple simply request fix via the forum.
User avatar
FXCodeBase: Confirmed User
Posts: 21108
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Return to Forum Support

Who is online

Users browsing this forum: No registered users and 1 guest