Amibroker formulas to get the highest and lowest value in a period in the past/please helps

#1
Dear,
I’m want to code get the highest and lowest value in a period in the past. For example, I want to know the highest and lower value of S&P500 in period of Jan 01,2018 to Dec 31,2018 ( I can calculate the number of bars from beginning of period to now is 270 bars and the number of bars from ending period to now is 19 bars)
Please kindly help me the formulas in Amibroker to get the highest and lowest value (I am thinking of HHV and LLV but I failed)
Thanks you so much
 

ajeetsingh

Well-Known Member
#2
May be custom function like this works

deTimeRangeHHV( array, starttime, endtime)
Where: starttime >= 10000 and starttime <= 235959, endtime >= 10000 and
endtime <= 235959, and starttime < endtime
- Returns the Highest High Value for the specified array during the time period you
specified.

deTimeRangeLLV( array, starttime, endtime)
Where: starttime >= 10000 and starttime <= 235959, endtime >= 10000 and
endtime <= 235959, and starttime < endtime
- Returns the Lowest Low Value for the specified array during the time period you
specified.
 

Similar threads

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?