Library "DailyLevels"
Functions for acquiring daily timeframe data by number of prior days.
openD(daysPrior, spec, res) Gets the open for the number of days prior.
Parameters:
daysPrior: Number of days back to get the open from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The open for the number of days prior.
highD(daysPrior, extraForward, spec, res) Gets the highest value for the number of days prior.
Parameters:
daysPrior: Number of days back to get the high from.
extraForward: Number of extra days forward to include.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The high for the number of days prior.
lowD(daysPrior, extraForward, spec, res) Gets the lowest value for the number of days prior.
Parameters:
daysPrior: Number of days back to get the low from.
extraForward: Number of extra days forward to include.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The low for the number of days prior.
closeD(daysPrior, spec, res) Gets the close for the number of days prior.
Parameters:
daysPrior: Number of days back to get the open from. 0 produces the current close
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The close for the number of days prior.
hlc3D(daysPrior, extraForward, spec, res) Gets the HLC3 value for the number of days prior.
Parameters:
daysPrior: Number of days back to get the HLC3 from.
extraForward: Number of extra days forward to include. Determines the closing value.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The HLC3 for the number of days prior.
Functions for acquiring daily timeframe data by number of prior days.
openD(daysPrior, spec, res) Gets the open for the number of days prior.
Parameters:
daysPrior: Number of days back to get the open from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The open for the number of days prior.
highD(daysPrior, extraForward, spec, res) Gets the highest value for the number of days prior.
Parameters:
daysPrior: Number of days back to get the high from.
extraForward: Number of extra days forward to include.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The high for the number of days prior.
lowD(daysPrior, extraForward, spec, res) Gets the lowest value for the number of days prior.
Parameters:
daysPrior: Number of days back to get the low from.
extraForward: Number of extra days forward to include.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The low for the number of days prior.
closeD(daysPrior, spec, res) Gets the close for the number of days prior.
Parameters:
daysPrior: Number of days back to get the open from. 0 produces the current close
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The close for the number of days prior.
hlc3D(daysPrior, extraForward, spec, res) Gets the HLC3 value for the number of days prior.
Parameters:
daysPrior: Number of days back to get the HLC3 from.
extraForward: Number of extra days forward to include. Determines the closing value.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The HLC3 for the number of days prior.
Note di rilascio:
v2: Ability to get daily high or daily low of any series.
Added:
highOfD(src, daysPrior, extraForward, spec, res) Gets the highest value for the number of days prior.
Parameters:
src: The series to use for values.
daysPrior: Number of days back to get the high from.
extraForward: Number of extra days forward to include.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The high for the number of days prior.
lowOfD(src, daysPrior, extraForward, spec, res) Gets the lowest value for the number of days prior.
Parameters:
src: The series to use for values.
daysPrior: Number of days back to get the low from.
extraForward: Number of extra days forward to include.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The low for the number of days prior.
Added:
highOfD(src, daysPrior, extraForward, spec, res) Gets the highest value for the number of days prior.
Parameters:
src: The series to use for values.
daysPrior: Number of days back to get the high from.
extraForward: Number of extra days forward to include.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The high for the number of days prior.
lowOfD(src, daysPrior, extraForward, spec, res) Gets the lowest value for the number of days prior.
Parameters:
src: The series to use for values.
daysPrior: Number of days back to get the low from.
extraForward: Number of extra days forward to include.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The low for the number of days prior.
Note di rilascio:
v3 Fixed issues with calculation.
Note di rilascio:
v4 Added 'array' functions for getting daily values and caching them in your own scripts for reuse.
Added:
openDValues(daysPrior, spec, res) Gets all the open values for the number of days prior.
Parameters:
daysPrior: Number of days back to get the open from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the previous open values.
closeDValues(daysPrior, spec, res) Gets all the close values for the number of days prior.
Parameters:
daysPrior: Number of days back to get the close from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the previous close values.
highOfDValues(src, daysPrior, spec, res) Gets the highest value for the number of days prior for each day as an array.
Parameters:
src: The series to use for values.
daysPrior: Number of days back to get the high from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the values.
highDValues(daysPrior, spec, res) Gets the highest value for the number of days prior for each day as an array.
Parameters:
daysPrior: Number of days back to get the high from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the values.
lowOfDValues(src, daysPrior, spec, res) Gets the lowest value for the number of days prior for each day as an array.
Parameters:
src: The series to use for values.
daysPrior: Number of days back to get the high from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the values.
lowDValues(daysPrior, spec, res) Gets the lowest value for the number of days prior for each day as an array.
Parameters:
daysPrior: Number of days back to get the high from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the values.
hlc3DValues(daysPrior, spec, res) Gets the hlc3 value for the number of days prior for each day as an array.
Parameters:
daysPrior: Number of days back to get the high from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the values.
Added:
openDValues(daysPrior, spec, res) Gets all the open values for the number of days prior.
Parameters:
daysPrior: Number of days back to get the open from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the previous open values.
closeDValues(daysPrior, spec, res) Gets all the close values for the number of days prior.
Parameters:
daysPrior: Number of days back to get the close from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the previous close values.
highOfDValues(src, daysPrior, spec, res) Gets the highest value for the number of days prior for each day as an array.
Parameters:
src: The series to use for values.
daysPrior: Number of days back to get the high from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the values.
highDValues(daysPrior, spec, res) Gets the highest value for the number of days prior for each day as an array.
Parameters:
daysPrior: Number of days back to get the high from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the values.
lowOfDValues(src, daysPrior, spec, res) Gets the lowest value for the number of days prior for each day as an array.
Parameters:
src: The series to use for values.
daysPrior: Number of days back to get the high from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the values.
lowDValues(daysPrior, spec, res) Gets the lowest value for the number of days prior for each day as an array.
Parameters:
daysPrior: Number of days back to get the high from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the values.
hlc3DValues(daysPrior, spec, res) Gets the hlc3 value for the number of days prior for each day as an array.
Parameters:
daysPrior: Number of days back to get the high from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: An array of the values.
Note di rilascio:
v5 eliminated while loop for improved performance
Note di rilascio:
v6 Now works with 1 second time-frame.
Note di rilascio:
v7 Updated demo to show flexible use.
Note di rilascio:
v8 API change (simplification)
Note di rilascio:
v9 Improved accuracy and added input levels to allow for indicator use.
Note di rilascio:
v10
Added:
HL(daysPrior, spec, res)
Gets the high and low values for the number of days prior.
Parameters:
daysPrior: Number of days back to get the high and low from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The high and low for the number of days prior.
OHLC(daysPrior, spec, res)
Gets the OHLC values for the number of days prior.
Parameters:
daysPrior: Number of days back to get the OHLC from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The OHLC for the number of days prior.
HighLow
Simple type for holding high and low values.
Fields:
high
low
OpenHighLowClose
Simple type for holding OHLC values.
Fields:
open
high
low
close
Added:
HL(daysPrior, spec, res)
Gets the high and low values for the number of days prior.
Parameters:
daysPrior: Number of days back to get the high and low from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The high and low for the number of days prior.
OHLC(daysPrior, spec, res)
Gets the OHLC values for the number of days prior.
Parameters:
daysPrior: Number of days back to get the OHLC from.
spec: session.regular (default), session.extended or other time spec.
res: The resolution (default = '1440').
Returns: The OHLC for the number of days prior.
HighLow
Simple type for holding high and low values.
Fields:
high
low
OpenHighLowClose
Simple type for holding OHLC values.
Fields:
open
high
low
close
Note di rilascio:
Fix max_bars_back limit.
Note di rilascio:
v12 Fixed early morning high/low capture.