Announcement

Collapse
No announcement yet.

Indicator significant digits displayed in X axis versus cursor window

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

  • Indicator significant digits displayed in X axis versus cursor window

    On a 50 tick chart I’d like to display both an imported global value and how many seconds into a minute the bar is. The seconds values is an ad hoc timer. To avoid the imported value which can have up to 6 digits overwriting the timer, I thought I’d try multiplying the seconds value by .00001 so that the last two digits will always jut out beyond the global value. To do this I’ve defined the following three variables:

    VolGR = getGlobalValue("VolG");

    today = new Date();

    Timer = today.getSeconds(0) * .00001;

    And I use the following return statement:

    Return new Array(Timer, VolGR);

    But after the first nine seconds of the minute the returned Timer value does not show the last significant digit in the X Axis. It works fine for the first nine seconds of the minute displaying the correct values but consistently displays only .00001 between the 10th and 19th seconds and .00002 between the 20th and 29th seconds, truncating the final digit. This is curious because the correct values, .000011, .000012, etc are being displayed in the cursor window. I’ve tried adding the statements:

    Timer = Timer.toFixed(6)

    and when that didn’t work tried

    Timer = Timer.toFixed(6) *1

    but to no avail. Can anyone suggest a method for forcing the display of the last digit on the X axis? Thanks for any feedback.

    Mike

  • #2
    Re: Indicator significant digits displayed in X axis versus cursor window

    Mike
    If your concern is that the label of the imported value could obscure that of the timer reverse the order of the elements of the returned array ie return new Array(VolGR, Timer); and the timer will display on top.
    Alex


    Originally posted by mikejhelms
    On a 50 tick chart I’d like to display both an imported global value and how many seconds into a minute the bar is. The seconds values is an ad hoc timer. To avoid the imported value which can have up to 6 digits overwriting the timer, I thought I’d try multiplying the seconds value by .00001 so that the last two digits will always jut out beyond the global value. To do this I’ve defined the following three variables:

    VolGR = getGlobalValue("VolG");

    today = new Date();

    Timer = today.getSeconds(0) * .00001;

    And I use the following return statement:

    Return new Array(Timer, VolGR);

    But after the first nine seconds of the minute the returned Timer value does not show the last significant digit in the X Axis. It works fine for the first nine seconds of the minute displaying the correct values but consistently displays only .00001 between the 10th and 19th seconds and .00002 between the 20th and 29th seconds, truncating the final digit. This is curious because the correct values, .000011, .000012, etc are being displayed in the cursor window. I’ve tried adding the statements:

    Timer = Timer.toFixed(6)

    and when that didn’t work tried

    Timer = Timer.toFixed(6) *1

    but to no avail. Can anyone suggest a method for forcing the display of the last digit on the X axis? Thanks for any feedback.

    Mike

    Comment


    • #3
      No that’s not my concern. At 11 seconds into the hour I’d like my Timer’s value to be displayed on the x-axis as .000011 and not as .00001 as it is now. If I reverse the return order then the timer will obscure the imported global for the first fifteen seconds or so, so no can do.

      Mike

      Comment


      • #4
        Mike
        I understand what you are trying to do however I don't think there is a way to increase the number of displayed decimals beyond what is determined by the efs engine [hence my prior suggestion].
        The only other alternative I can think of is to draw the timer on the chart
        Alex


        Originally posted by mikejhelms
        No that’s not my concern. At 11 seconds into the hour I’d like my Timer’s value to be displayed on the x-axis as .000011 and not as .00001 as it is now. If I reverse the return order then the timer will obscure the imported global for the first fifteen seconds or so, so no can do.

        Mike

        Comment


        • #5
          And sap my precious bodily fluids!!?? (paraphrasing General Jack D. Ripper from Dr. Strangelove). No, drawing is too CPU expensive for an improvised timer. I’ll go back to using my old one. It was just a thought. Thanks for the suggestion though, Alex.

          Mike

          Comment

          Working...
          X