Announcement

Collapse
No announcement yet.

Why are the return values from main() shown only with 2 decimals ?????

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why are the return values from main() shown only with 2 decimals ?????

    Hi guys,


    After more or less completing my programming orgy I recognized that all my return values from main() are shown only with 2 decimals on the charts respectively the cursor window (i hope thats the correct name).

    Is there a way to force esignal to show more precision than only 2 decimals - especially in the cursor window, but if possible even in the chartwindow ?

    BTW, using DebugPrintln() shows the correct values (all decimals)!!!!!

    What am I doing wrong ???

    Regards,
    EZ-T

  • #2
    Hello EZ-T,

    You can force decimals to appear in the cursor window by applying .toFixed(4)*1 to any number you are returning to the chart. The .toFixed() method converts the result to a string. Just multiply by 1 to convert it back to a number so it will display on the chart.

    This won't affect the decimals that appear on the y-axis of the chart however. We currently do not have control over that through EFS. You could try the "Show Full Price Precision" option under File-->Preferences on the General tab.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Jason

      Another method users may commonly see in use for converting a number to a string for display in the CursorWindow and not as a plot id to add two " to the number

      return(number+"")

      Returns the value of the variable number to the CW and does not plot the variable on the chart.

      Comment


      • #4
        thanx, will have a look at it now!!!

        best regards to both of you dloomis+jasonk

        EZ-T

        Comment

        Working...
        X