Reply To: 365 day high has occurred in the last 50 days

Optuma Forums Optuma Scripting 365 day high has occurred in the last 50 days Reply To: 365 day high has occurred in the last 50 days

#65915
Darren
  • Topics: 66
  • Replies: 666
  • Posts: 732

Hi Karen,

It’s because the V1 and V2 variables are loading daily data in a weekly chart,  so you can have 5 true results within a weekly bar (and 20+ in a monthly), hence the duplication.

Change V1 and V2 to the following, and it will look back a year no matter the timeframe of the chart, instead of data for 365 calendar days.

V1 = HIGHESTHIGH(BACKTYPE=Weeks, BARS=52);
V2 = HIGH() CrossesAbove V1;

Pin It on Pinterest