Announcement

Collapse
No announcement yet.

High/Low on Friday

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

  • #16
    akiri
    You are most welcome and thank you for confirming that it is working
    Alex

    Comment


    • #17
      Script Stopped working

      The script stopped working when I changed the day of week to 1 & 2. I am now trying to get the highest high and lowest low of the first 2 days of the week, plot that from last Wed thru this weeks Tues and change on Wed to this weeks first 2 days.

      I have attached the efs file
      Attached Files

      Comment


      • #18
        akiri
        One of the reasons the script is not working was explained by Jason in an earlier post (see quoted excerpt from that post)

        Originally posted by JasonK
        Hello akiri,
        <SNIP>
        However, prior to the return statement at the end of main() you are executing some drawing functions that do not have valid parameters. You're making a function call out of a global variable, nTFHigh_1(0). With the (0) added to the end of the variable, EFS is trying execute a function with that name while passing 0 as a parameter. This is valid syntax but because the function does not exist in your formula EFS exits the formula. Change these parameters to remove the (0).



        At this point your code should generate an error that nTFHigh_1 has no properties. This occurs at initialization or the beginning of processing because on the first bar that gets processed, nTFHigh_1 is still null. To correct this error you can add a conditional check for a non-null value of this variable in the associated if() statement that also validates nTime.


        <SNIP>
        The other reason is that in line 19 of the script you set the condition to check if dayOfWeek is equal to 3 instead of 1
        Once you make these changes the script should work as intended
        Alex


        Originally posted by akiri
        The script stopped working when I changed the day of week to 1 & 2. I am now trying to get the highest high and lowest low of the first 2 days of the week, plot that from last Wed thru this weeks Tues and change on Wed to this weeks first 2 days.

        I have attached the efs file

        Comment


        • #19
          I uploaded the incorrect version of the script.

          The version I use is not showing the present weeks highest hi and lowest lo of Monday and Tue. It shows previous weeks highest hi and lowest lo.
          Attached Files

          Comment


          • #20
            And here is the correct version of the script
            Attached Files

            Comment


            • #21
              I figured it out

              I figured it out. Its working fine now

              Comment

              Working...
              X