Announcement

Collapse
No announcement yet.

OHCL.efs modifications

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

  • OHCL.efs modifications

    Hello

    I have used the OHLC study and modified it to suit my needs. I can modify everything about this study except this one item. The O,H, L, C, Net, Net% work fine. I would like to Modify the Net7 to show only 2 decimals places ex. the $indu closed -18.8876 from the 7 ema. How do I control the decimals to show only -18.88.

    I have tried altering the function parameter decimals and the decimals option under edit studies but neither seem to effect the "net7" result. the entire line of this efs shows 2 decimals places to the right of the period except for the Net7 which shows 4 decimal places. Line 30 has no effect on Net7 result.

    therefore, how would I alter this OHLC.efs to show only 2 decimal places to the right of Net7 result and leave everything else as it is?

    Thanks for any assistance

    Pogman
    Attached Files

  • #2
    Here is a screen shot for the OHLC and more specifically for the Net7 4 decial result...If I can upload it properly.

    Pogman
    Attached Files

    Comment


    • #3
      Pogman
      As far as I can see it is already writing the value of Net50 (which is a 9 period MA and not 7 btw) with only two decimals and not 4.
      This is because you have enclosed the result of that equation inside formatPriceNumber() which will adapt the display to whatever is the format of the symbol being charted.
      Anyhow if you want to be able to control through Edit Studies also the number of decimals displayed by Net50 then replace in line 42
      formatPriceNumber(close()-vEMA50.getValue(MAStudy.MA));
      with
      (close()-vEMA50.getValue(MAStudy.MA)).toFixed(Decimals);
      Alex

      Comment


      • #4
        Hi Alex

        Sorry about the 7 ema, it was 9 ema

        And yes your suggestion was excellent, and worked! as usual!!!

        Many thanks. This stuff must be too easy for you...so I guess I will have to find something more challenging for you ;-) ... NOT! I am already in way over my head altering most efs.

        Thanks for the quick assistance, as usual your the best Alex! ))

        Comment


        • #5
          Pogman
          As always my pleasure
          Have a great weekend
          Alex

          Comment


          • #6
            OHLC-2 decimals efs

            For those interested here is the OHLC.efs with the Net9 having 2 decimals

            Pogman
            Attached Files

            Comment

            Working...
            X