Announcement

Collapse
No announcement yet.

Wizard study doesn't work on bonds

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

  • Wizard study doesn't work on bonds

    The attached study was created in the wizard and it works fine in the YM, BP, etc., BUT its doesn't work in Bonds or Notes (it plots but its yellow all the time) its supposed to be blue when its up and red when its down.

    Any help would be appreciated.

    Bruce
    Attached Files

  • #2
    Bruce
    At my end the study appears to be working fine also with Bonds and Notes (see enclosed screenshot)
    Alex

    Comment


    • #3
      Alex:

      I rebooted eSignal, reloaded the study, and rebooted my computer and it still shows a yellow SMA.

      Any additional suggestions?

      Bruce
      Attached Files

      Comment


      • #4
        Bruce
        In looking at your chart I see what is happening.
        In File->Preferences you have disabled the Compact Price Display option. At the same time you are using the formatPriceNumber() function [in lines 47 and 48] which converts a value to a string hence the variables a and b become strings with a fractional separator eg 104'16. In the same lines 47 and 48 you then divide those strings by 1 which returns NaN ie Not A Number. When you run your condition it returns false as it is not comparing any values hence it does not color the average in blue/red.
        To resolve this either enable the Compact Price Display option or comment out [or delete] lines 47 and 48 which are unnecessary anyhow
        Alex

        Comment


        • #5
          Alex:

          I // out the suggested lines and it works great.

          I'm very appreciative, as usual.

          Bruce

          Comment


          • #6
            Bruce
            You are most welcome and thank you for the feedback
            Alex

            Comment

            Working...
            X