E.g, If I am using minute resolution and want to find the max value in the first 15 minutes of the US market, I only care about the max value between 9:30 and 9:45, However, at say, 9;35, I do not want data from 3:50-4:00 of yesterdays close included in the indicator.
Victoria Butler
Also, I would not want the value for the time window to update once the first 15 minutes of trading have elapsed.
Fred Painchaud
Hi Victoria,
For that, you would need to develop your own indicator, or your own logic if you prefer not to encapsulate it inside an indicator.
The pseudo-code would look like this:
1- If time is 9:31 (first minute bar arrives AFTER the minute), set the max to the bar's high
2- If time is between 9:32 and 9:45 inclusive (9:45 is the bar from 9:44 to 9:45, the last one you want to consider) and if the bar's high is higher than max, assign the bar's high to the max
3- If time is greater than 9:45, your max value is ready for the day, you can use it
Fred
Victoria Butler
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!