Announcement

Collapse
No announcement yet.

ATR Study

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

  • ATR Study

    Hi:
    I am wondering if Alex can help me with creating a study.
    Attached is a chart of the built in ATR Study. I am looking to create an alert or non-price study when the ATR goes below or above a certain level. It would be nice to the ATR length adjustable along with the parameters for the levels.
    I did a search for the ATR and attempted to use the Formula wizard but am confused on how to have a formula reference a certain level in a non price study.
    Attached is the ATR chart and if you could build this study I would appreciate it.
    Harndog
    Attached Files

  • #2
    Harndog
    The attached efs should do what you asked and provide you enough of a working base for you to add your own conditions/actions.
    Alex
    Attached Files

    Comment


    • #3
      thank you, Alex

      Thank you, I will try it out.
      Harndog

      Comment


      • #4
        Harndog
        I omitted to add the bands in the efs. To include them insert the following two lines in main()
        addBand(Upper,PS_SOLID,1,Color.black,"upper");
        addBand(Lower,PS_SOLID,1,Color.black,"lower");
        The default values for Upper and Lower are set at 1 and 0.65 and can be modified through Edit Studies.
        Alex

        Note: I have also updated the efs at the original link to include the bands

        Comment


        • #5
          Alex - Syntax error

          Alex:
          Thank you and can you post the you post the updated efs. I am getting a syntax error. I have posted my attempt below.
          Harndog
          Attached Files

          Comment


          • #6
            Harndog
            The original link contains the updated efs.
            As to your revision the problem is caused by having added those commands in the brackets of main().
            By saying insert the lines in main() I meant anywhere in between function main(){ and the very last } that closes the main function
            Not sure I explained this in the best of ways, perhaps someone else may want to chime in.
            Alex

            Comment

            Working...
            X