Announcement

Collapse
No announcement yet.

formula wizard and PercentR

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

  • formula wizard and PercentR

    Hello,

    I am trying to use the formala wizard to do what seems to be a very simple task, but i keep getting an error.

    I open up the formula wizard, and create a new formula called
    %R. I add the study "PercentRStudy". I add the line:

    vPctR10.getValue(PercentRStudy.PERECENTR) < -80

    and get these errors:

    Line 38: Parameter Number 1 of Function PercentRStudy.getValue is invalid

    Line 38: can't convert PercentRStudy.PERECENTR to an integer.

    This is line 38:

    vPctR10.getValue(PercentRStudy.PERECENTR) < -80


    What is causing these errors?

    Thanks,

    B

  • #2
    B
    This is a bug in the Formula Wizard which writes
    vPctR10.getValue(PercentRStudy.PERECENTR) < -80
    instead of
    vPctR10.getValue(PercentRStudy.PERCENTR) < -80
    Alex

    Comment


    • #3
      Thanks Alexis,

      I have another question:

      I am trying to use the Alert.AddtoList function in the formula wizard editor; however, alerts do not pop up on the Triggered Alert List, even when I do a simple test like if close > high
      then Alert.AddtoList.


      Cheers,

      B

      Comment


      • #4
        B
        First thing click on Tools->EFS->Alert List in the main menu and when the Triggered Alert List window opens right click it and check that it is set to Popup on Alert
        If that is set correctly then post the code you have and I or someone else will take a look at it. However do consider that Close is never greater than High on the same bar.
        Alex

        Comment


        • #5
          Yes, you are correct, close will never be greater than high...I meant close > open.

          Yes, I have the Triggered Alert List open, and Popup on Alert checked.

          Here are the code pieces from the Wizard:

          if (
          close() > open()
          ) onAction1();

          function onAction1() {
          Alert.addToList(getSymbol(), "UPbar", Color.RGB(0,255,0), Color.RGB(255,255,255));
          vLastAlert = 1;
          }


          B

          Comment


          • #6
            B
            It appears to be working fine at my end (see image below) so there may be something else in the efs. Can you post the whole script or attach the efs to your reply.
            Alex

            Comment


            • #7
              Sure,

              Attached is the efs file given by the formula wizard.


              B
              Attached Files

              Comment


              • #8
                Alexis,

                As soon as I went to Tools-> EFS -> Settings

                then under perfomance, I unchecked

                "Make all formulas compute on close (rather than tick-by-tick)

                It started displaying the alerts.

                Is this a bug?

                Thanks,

                B

                Comment


                • #9
                  B
                  It would appear to be the case. For the time being leave the setting unchecked as there are other ways to set an efs to compute on close only
                  Alex

                  Comment


                  • #10
                    Thanks for the quick and accurate respones!!! :-)

                    B

                    Comment

                    Working...
                    X