Optuma Forums › Optuma Scripting › VHF Script › Reply To: VHF Script
November 1, 2021 at 9:20 am
#66431
- Topics: 5
- Replies: 616
- Posts: 621
Hi,
Try the following script:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
// Set Close V1 = CLOSE(); // Find Highest Close HCP = HIGHESTHIGH(V1, BARS=28, INCBAR=True) ; // Find Lowest Close LCP = LOWESTLOW(V1, BARS=28, INCBAR=True) ; // Calc Range in Closing Prices V2 = HCP - LCP ; // Calc Absolute Movement in Closing Prices V3 = ABS(CLOSE() - CLOSE(1)) ; // Sum V3 for selected period V4 = ACC(V3, BARS=28, RANGE=Look Back Period, BACKTYPE=Bars); //Final Calc VHF = (HCP - LCP) / V4 ; VHF |