Announcement

Collapse
No announcement yet.

Decimal places

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Decimal places

    Hallo

    I was wondering if somebody can tell me how I can get the figures on this EFS to print 4 decimal places. I saw in the EFS the prices are rounded but I can not figure out how to set the decimal places.

    Any help will be appreciated.

    Regards

    Kobus
    Attached Files

  • #2
    I opened the efs and saw this:




    // rnd function - round to two places
    function rnd(value) { // Round the price to two digits
    value *= 100;
    return Math.round(value, 2)/100;
    }



    If you change it to:




    // rnd function - round to two places
    function rnd(value) { // Round the price to 4 digits
    value *= 10000 ;
    return Math.round(value, 4 )/10000 ;
    }


    That should work.

    I uploaded a copy named riskreward4.
    Attached Files

    Comment


    • #3
      Thank you very much, I appreciate your help

      Regards

      Kobus

      Comment


      • #4
        My pleasure.

        That code you posted is pretty cool!!

        I will be using it as a template for some of my studies.

        Thank You!!

        Comment

        Working...
        X