Announcement

Collapse
No announcement yet.

overbought/oversold indicator

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

  • overbought/oversold indicator

    I need help writing the code for an overbought/oversold indicator.

    Name: ob/os

    I would like to plot it under the chart mush like an RSI.

    The upper band would be at .70 and above the lower at .40 and below.

    The calculation is [(high - open) + (close - low)] / (range * 2)

  • #2
    Hello czumwalt,

    There is an existing formula in our EFS Library that uses your calculation for the OB/OS indicator.

    MAOverBoughtOverSold

    It also draws a moving average of the OB/OS line. The only change you will need to make is to change lines 5 and 6 to the example below, which will give you your bands at 70 and 40.

    PHP Code:
    addBand(70PS_SOLID2Color.black"upper")
    addBand(40PS_SOLID2Color.black"lower"
    After downloading the formula, open the formula in the editor, which can be found under the "Tools" menu. Edit lines 5 and 6, save the changes and then reapply the formula to your chart.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Thanks. That is great.

      Can you help me with the code for taking that ob/os value and entering trades on the next bar. What I want to do is go long on the next bar if the ob/os is less than 40. Enter the trade at the open of the next bar and exit the trade at the close of the same bar. The same applies for ob/os greater than 70 which would enter short on the open of the next bar. Any help would be greatly appreciated.

      Comment


      • #4
        czumwalt
        I think the attached efs does what you ask.
        FYI I just added the Buy/Sell conditions and logic to Jason's formula.
        Alex
        Attached Files

        Comment

        Working...
        X