Get old values according to the date

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #65031 quote
    Alberto LuccheseAlberto Lucchese
    Participant
    Average

    Hi,

    Is it possible to get values according to an specific date? for example if I want to get the close price of March 13 of 2017, 2016,2015… if there a function for that? the idea is to build a daily-based seasonality index and for that I need to average the latest X-years (at least 10). of  Any thoughs?

    I found there is already one based on months, but i’d like to give it a try to a daily-based version.

    Thanks in advance,

    #65122 quote
    NicolasNicolas
    Keymaster
    Legend

    I found there is already one based on months,

    Where please? Could be adapted for daily timeframe?

    #65126 quote
    Alberto LuccheseAlberto Lucchese
    Participant
    Average

    I found this one: https://www.prorealcode.com/prorealtime-indicators/seasonality-analysis/

    I don’t see how to adapt it because for a daily timeframe there are some important differences:

    1. For the same day there won’t be data every year as for example, maybe that same day in one year can be friday and the next year it will be Saturday. For the monthly approach every year you’ll have the same months
    2. If you use the barindex as reference, Calculation of previous years months in terms of bars is easier to implement as every year will always have 12 months. For daily time frame, not all years has the same amount of days (365 or 366 if is a leap year).

    For these reasons i wanted to know if there is a way to refer to the price value of an specific date. My idea is to take the current day (for example March 12) and request the price of, for example, the last ten years and average them.

    I didn’t find any function to do it in the probuilder manual, is there a way to do it?

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Get old values according to the date


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Alberto LuccheseAlberto Lucchese
8 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/12/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...