Announcement

Collapse
No announcement yet.

Moving Average Code

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

  • Moving Average Code

    Hi - hoping someone can help.

    I once found a code in this forum somewhere but cant locate anymore.

    This is what the code did.

    It took the difference between Price and the Moving Average and plotted the difference.

    For Price the options to select where Open, High, Low or Close
    For moving average the options where Simple or Exp and Period (eg 20)

    So in theory I could plot the difference between the High of a 60min chart and its 50ema.

    Cheers,

  • #2
    Re: Moving Average Code

    Bhavesh81
    You don't necessarily need a formula to do that.
    See this thread on the same topic
    Alex


    Originally posted by Bhavesh81
    Hi - hoping someone can help.

    I once found a code in this forum somewhere but cant locate anymore.

    This is what the code did.

    It took the difference between Price and the Moving Average and plotted the difference.

    For Price the options to select where Open, High, Low or Close
    For moving average the options where Simple or Exp and Period (eg 20)

    So in theory I could plot the difference between the High of a 60min chart and its 50ema.

    Cheers,

    Comment

    Working...
    X