Announcement

Collapse
No announcement yet.

TypeError: xxxx has no properties

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

  • TypeError: xxxx has no properties

    I am getting an error message when the attached efs loads at startup on two tick charts (ES 89T and AB 250V). Then, if I reload it, the error goes away and the efs executes properly. Then every time thereafter I reload the efs, everything works fine. I only get the message at initial start up.

    The error message references line 47 with the message:

    TypeError: vRSI has no properties

    I suppose there are some initial conditions that cause this line to report an error, but I cannot figure out how to fix it. Since the problem only happens when the chart initially opens, it is hard to test it.

    I haven't had much experience catching errors internally in my efs scripts, so if there is a thread or something that discusses and gives examples how to debug and trap these, I am willing to learn.

    Thanks for your assistance. Joe.
    Attached Files

  • #2
    Joe
    First of all there is an error in the intialization of the study (this however is not the cause of the error you are getting)
    xRSI = rsi(19,"hl2"); should be xRSI = rsi(19,hl2());
    As to the error you are referring to try adding a null check for vRSI after you have declared it ie
    if(vRSI==null) return;
    Null checks are a good programming practice regardless of the error you are getting
    Alex

    Comment


    • #3
      Thank you for the prompts reply, and the advice on both issues.

      Very best regards, Joe.

      Comment


      • #4
        Joe
        You are most welcome
        Alex

        Comment

        Working...
        X