Announcement

Collapse
No announcement yet.

Mov Ave based on Open

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

  • Mov Ave based on Open

    Hi,

    I'm trying to make an indicator that shows the difference between the moving average of the candle opens and the moving average of the candle closes.
    I can't seem to figure out how to get the average based on the open price. I know I can do it in the chart but I don't know how to code it.
    I've tried this :
    var vMAO = sma(nMA, "Open");
    but it gives me the same output as
    var vMAO = sma(nMA, "Close");

    Any help would be greatly appreciated.

    Also is there anyway to use the moving average of a product that is not in the chart as part of the indicator.

    Cheers
    Shane

  • #2
    Re: Mov Ave based on Open

    Shane
    For the syntax required by the moving average functions see this article in the EFS KnowledgeBase. Also see the examples shown in this thread
    With regards to creating studies on custom variables see my first reply to you in this thread in which you asked a similar question
    Alex


    Originally posted by shanebrannick
    Hi,

    I'm trying to make an indicator that shows the difference between the moving average of the candle opens and the moving average of the candle closes.
    I can't seem to figure out how to get the average based on the open price. I know I can do it in the chart but I don't know how to code it.
    I've tried this :
    var vMAO = sma(nMA, "Open");
    but it gives me the same output as
    var vMAO = sma(nMA, "Close");

    Any help would be greatly appreciated.

    Also is there anyway to use the moving average of a product that is not in the chart as part of the indicator.

    Cheers
    Shane

    Comment


    • #3
      That's great.

      Thanks Alex

      Comment


      • #4
        Shane
        You are welcome
        Alex


        Originally posted by shanebrannick
        That's great.

        Thanks Alex

        Comment

        Working...
        X