Announcement

Collapse
No announcement yet.

Problem with Alert

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

  • Problem with Alert

    I have the following code which works when used as indicator (return XA2)

    but have tried modifying to get colors on chart when indicator crosses zero line, but to no avail.


    thanks again in advance for you help



    Jamie
    Attached Files

  • #2
    Jamie
    The first problem is that you are missing a closing bracket in line 15 (see following image)



    Once you add the missing bracket you should get another error which is caused by an extra closing bracket that was incorrectly added in line 48 and which should be removed.
    The second problem is that the variable XA2 is not a series object hence you cannot use the getValue() method to retrieve the values of that variable (see the conditions in lines 24-25 and 29-30)
    In those conditions you need to replace XA2.getValue(0) with XA2 which is the value of XA2 at the current bar and XA2.getValue(-1) with XA2_1 which is the value of XA2 at the prior bar. The value of XA2_1 is assigned at every new bar in the conditional statement in lines 13-15
    At this point I would suggest that you perhaps read through some of the Help Guides available in the EFS KnowledgeBase and specifically the Guide to Developing eSignal Indicators
    Alex

    Comment


    • #3
      Thanks for this Alex I have new code attached but still does not seem to work.

      I am going to have to read linkd you suggested.


      Thanks for help again.



      Jamie
      Attached Files

      Comment


      • #4
        Jamie
        The efs you posted appears to be working here
        Alex

        Comment


        • #5
          thanks Alexis


          Jamie



          PS Have a wonderful Christmas

          Comment


          • #6
            Jamie
            You are most welcome.
            A Merry Christmas to you too
            Alex

            Comment

            Working...
            X