Announcement

Collapse
No announcement yet.

Formula help

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

  • Formula help

    I am looking for a formula (or function) to help identify that a series is making a top reversal, e.g. an EMA has reached a top and is now dropping, the same for ADX, etc.

  • #2
    Hi,

    You can find an example efs that detects peaks in high() at this forum topic.

    Basically you would replace all occurrences of high with the series you want to detect peaks on. You would of course have to define your series as a global variable and initialize it.

    Something like:
    var mySeries=null;
    Then in main
    if(mySeries === null) mySeries = ema(9);

    Then replace all instances of high(some index) with mySeries.getValue(some index);

    You will probably want to do something other than draw lines when your condition is hit, so you would have to change the line drawing section of code. You may also want to change the BARSLOWER parameter to 1 or 2.

    That should give you a starting point at least.

    Steve

    Comment

    Working...
    X