Plotting Daily Range on Intraday Chart

mattmar10

Active member
Joined
Jan 21, 2023
Posts
26
Likes
12
I'm just getting started with MotiveWave and am looking to build a simple overlay indicator that plots an average daily range based on the past X days (user input) while I'm looking at an intraday chart (e.g., 5 minutes). I'm looking through the SDK Documentation, and it's unclear to me exactly how I would do that. Would I accomplish this in the calculate method?

Is there a way to get a DataSeries of daily data?

Any tips would be appreciated.
 

Per

Active member
Joined
Jun 12, 2021
Posts
28
Likes
7
Did you look at the ATR (actual trading range) indicators?
 

mattmar10

Active member
Joined
Jan 21, 2023
Posts
26
Likes
12
I have been able to get this working by referencing other studies by using code like this:

Java:
Java:
@Override
public void initialize(Defaults defaults)
{
    sd.addInvisibleSetting(new BarSizeDescriptor(Inputs.BARSIZE, get("LBL_TIMEFRAME"), BarSize.getBarSize(Enums.BarSizeType.LINEAR, 60)));
    ...
    desc.setValueSeries(Values.HV, Inputs.BARSIZE);
}

However, when I switch to a tick based chart, it stops working and the linear based dataseries is empty. Debug logging confirms the secondary dataseries has a size of 0. Any ideas?

@MotiveWave_Joe any thoughts?
 
Top