OHLC For Prior Period



New member
Looking for thinkscript code that can return/plot the OHLC for a user-configurable group of days on an hourly chart (the period) for a user-configurable max number of days (the lookback).

Example: assume the user sets lookback equal to 12; this means that only today plus the 11 prior days are to be considered in the output. Assume the user sets the period to 3; this means that all days in the lookback period should be broken into groups of 3 days, starting the count at the oldest/first day. Each period will have plots of the OHLC from the prior period. See this example:

Higher time-frame aggregations cannot be used as the script will be used in hourly scans and other time frames are not allowed in TOS. Willing to pay via paypal. Thanks!

Similar threads