Announcement

Collapse
No announcement yet.

TSFofCCI question

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

  • TSFofCCI question

    I'm trying to draw some price alerts in the price pane when TSFofCCI crosses certain parameters (in this case 120 and -120) but I can't seem to get it to do anything. Any help would be much appreciated.
    Attached Files

  • #2
    opstock
    The syntax required to retrieve the the value of the indicator is xTSFofCCI.getValue(barIndex) where barIndex is the index of the bar you want ie 0 for current bar, -1 for the prior bar, -2 for two bars ago, etc. As an example your first condition should be
    if(xTSFofCCI.getValue(-2) > -120 && xTSFofCCI.getValue(-1) < -120){
    Hope this helps
    Alex

    Comment


    • #3
      Works great. Thanks so much Alex!

      Comment

      Working...
      X