Optuma Forums › Optuma Scripting › Scan for biggest moving hours/days? › Reply To: Scan for biggest moving hours/days?
May 12, 2022 at 7:49 am
#68226
- Topics: 5
- Replies: 609
- Posts: 614
Hi,
You could try something like the following:
1 2 3 4 5 6 7 8 9 10 |
//Set Day of Week to check MONDAY = DAYOFWEEK() == 2; //Find Bar Range RNG = HIGH() - LOW() ; //Find Bar Range for Selected Day of Week MONRNG = IF(MONDAY == 1,RNG,0) ; //Add up all range values for selected day over last year ACC(MONRNG, RANGE=Look Back Period, BACKTYPE=Years, BARS=1) |
This is an example for finding Mondays bar range over the last year. You could do the same thing for all the days you are interested in, then run a check to find which day produces the highest value.
Intraday is a little trickier, there’s no preset function that identifies a specific time of day. If I can work out a way to do it I will let you know.
-
This reply was modified 2 weeks ago by
Matthew.