Announcement

Collapse
No announcement yet.

This should be easy - but it does not want to work

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

  • This should be easy - but it does not want to work

    I am trying to program bill Williams profitunity awesome oscillator. This should be really easy - it is basically the difference between two SMAs.

    I have used the wizard to set up the basics and all i get is a blank box with a title. i have done this before no problem - but i am trying to get things sorted out after a computer crash and this one has got me beat.

    Can someone take a look at my code - as generated by the wizard and make some useful suggestions? Have i missed somesort of security setting somewhere that is interfering?

    Thanks in advance

    Ian

  • #2
    Ian
    FYI there is no efs attached. You may want to try posting again
    Alex

    Comment


    • #3
      Attachment Ok this time hopefully

      Finger trouble - I really thought that I had done all the things necessary to do the attachment - hopefully it is there this time.
      Attached Files

      Comment


      • #4
        Ian
        The error is in the syntax of the variables used in the expression in the Returned Data Points which should be
        (vSMA5_of_HL2.getValue(MAStudy.MA) - vSMA34_of_HL2.getValue(MAStudy.MA))
        Once you replace it with the above the efs will work correctly
        Alex

        Comment


        • #5
          Ian
          You could also write the same indicator in a slightly simpler way by using the MACD study. See the image enclosed below for the setup in the Formula Wizard.
          The result will be the same as with the efs that uses the two moving averages to calculate the Awesome Oscillator
          Alex

          Comment


          • #6
            This is great and very elegant - now for some finess - I want the bars green in a rising trend and red in falling trend.

            So I set the bars to red by default, but I want to turn a bar green if the previous bar was lower - I cannot for the life of me figure out how to do this - having sorted out how to get values and creating a variable to store them in - I though that this variable would automatically be an array and that I would access previous values in this way - sadly back to a blank window.

            Ideas?

            Thanks in advance

            Ian

            Comment


            • #7
              Ian
              Assuming that you are using the MACD (which is the simpler solution) you would then set your conditions as shown in the image enclosed below
              In the example I check for the current value of the MACD to be greater than the value of the MACD at the prior bar. To define the MACD at the prior bar I set the Offset to -1. Then every time the condition is true I paint the histogram in green
              If you have not already done so you may want to read through the Help Guides and Tutorials available in the EFS KnowledgeBase and specifically the Formula Wizard Guide which will help you better understand how to program using the Formula Wizard.
              Alex


              Comment

              Working...
              X