Question about indicator design...

Comments

2 comments

  • Tiki Dave

    This is a good question, typically you need to initialize your own array on the class, such as `this.myHistory = []`, and push to that on every iteration.  If there's another way I have not found it, please let me know if you do.  :)

    0
    Comment actions Permalink
  • Oliver Bradley

    Hi Tiki Dave - thanks for the reply.  I'm still a little confused.  I've created an indicator that plots a histogram of the volume for each wave.  The user can set a "wave size" amount which is the number of ticks the instrument has to move for a down wave to become a confirmed up wave or an up wave to become a down wave.

    When the new up or down wave isn't confirmed yet - the volume bar is painted blue.  When it confirms it turns green or red.  When it does confirm, I'd like to fix the color of the intermediate volume bars.  It works for my needs as is but I'd like to clean it up and make it available to others.

    I think you are saying I can just push each member to the this.myHistory array and then go back and modify the members when a new wave confirms.  I'll see if this works.

    Thanks again!

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk