average of given days

Optuma Forums Optuma Scripting average of given days

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #61849
    AvatarSrikanth
    • 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
    MatthewMatthew
    • Topics: 5
    • Replies: 326
    • Posts: 331

    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

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close