average of given days

Optuma Forums Optuma Scripting average of given days

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #61849
    Srikanth
    • Topics: 5
    • Replies: 5
    • Posts: 10

    Hi Team,

    is it possible to plot first 15 days average till Jun and first 15days of July  for rest of the year on chart.
    below is the formula i am looking for

    value = (1stday open(first bar open in year) + last day close(last bar close in 15days) + high in 15 days + low in 15 days) /4

    thanks.

    #61858
    Matthew
    • Topics: 5
    • Replies: 488
    • Posts: 493

    Hi,

    I believe you can achieve what you are after with the following script:

    Here is how it looks on a chart:

    Ex1

    The plot shows the average of the first 15 days of Jan and July each year.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest