♥ 0 |
Hello, Trying to figure out how to force studies to aggregate data only using real trading hours. I cannot find a clear answer on this site or in the Google-verse. Everytime I try the below script, which looks like it should work it only plots the value BEFORE market open. See script below… What am I doing wrong? I am about to rip my hair out. Would like for the VolumeSum variable to start plotting at 9:30 EST with only data for that day. Thanks in advance.
input Market_Open_Time = 0930; def volumesum = if !marketOpen then 0 else volumesum[1] + volume;
Marked as spam
|
Private answer
What you are requesting is to compute the total value for the regular session only, yes? Your question title seems to indicate something about aggregation periods. But this is nothing more than the time frame assigned to the chart. I believe we have already addressed this question here: https://www.hahn-tech.com/ans/volume-for-specific-time-frame/ Simply adjust the start and end time to fit the time span you are targeting. HINT: in the above solution the default start time is 4:00 and the end time is 9:29. So you will just change those times to 9:30 (930) and 15:59 (1559). Marked as spam
|
Please log in to post questions.