Hi
I want to build a simple indicator that will calculate the average daily range (of the ~last 4 months) and plot it in the chart.
I want to write a simple function that will looks something like
Result = (Σ(day's high - Day's low) ) / 88 (around 88 trading days)
However , I can't find how can I retrieve the daily high and low.
AFAIK using Bars.StatusLine.High ,Bars.High or AverageFC won't help because they retrieve the bars (not necessary the daily high or lows).
Is there a simple way to retrieve the day's high and low ?
Thank you
Average Daily Range Calculation question [SOLVED]
- JoshM
- Posts: 2196
- Joined: May 20 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
You can store the daily high/low in a variable that keeps track of these values through out the day. I posted an example for that here.However , I can't find how can I retrieve the daily high and low.
AFAIK using Bars.StatusLine.High ,Bars.High or AverageFC won't help because they retrieve the bars (not necessary the daily high or lows).
Is there a simple way to retrieve the day's high and low ?
- JoshM
- Posts: 2196
- Joined: May 20 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Not that I'm aware of, unless there is some PowerLanguage .NET property that returns that specific value. Even in the simple PowerLanguage (default MultiCharts) you'll need to do the three things from that example.The solution you gave will work but is there a simple way to get a specific day High/low ?
I'm not sure how to make it more simpler than referring to an example.
- Henry MultiСharts
- Posts: 9165
- Joined: Aug 25 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
jorsde, have you tried using the prebuilt HighD, LowD functions?