Etherist![]() Member ![]() Posts: 25 Joined: 6/9/2024 Location: South Australia ![]() | Hey there Craig From an OmniScan perspective, you could use: h > hhv(60)[1] or use an Indicator as below: Try out the attached code for something that might work for you. ================================================================= 1. Parameters: - Length: Specifies the number of days to look back. Default is 60 days, adjustable from 1 to 365 days. 2. Script Explanation: - Initialization: - `HHigh`: Variable to store the highest high observed within the specified period. - `Period`: Variable to hold the value of the parameter "Length" (number of days to look back). - Finding Highest High: - The script initializes `HHigh` to the lowest possible value (`L`). - It loops through each day within the past `Period` days (`1` to `Period`). - During each iteration, it compares the high price (`H`) of that day with `HHigh` and updates `HHigh` if `H` is higher. - Comparison and Plotting: - After determining the highest high (`HHigh`) over the past `Period` days, the script compares the current closing price (`C`) with `HHigh`. - If the current price (`C`) is greater than `HHigh`, it plots the current price as "New 60-Day High" in green. - Otherwise, it plots the current price as "Not a 60-Day High" in red. 3. Return Statement: - The script returns the value of `HHigh`, which represents the highest high observed over the past `Period` days. ==================================================================== Cheers Etherist :-) [Edited by Etherist on 7/10/2024 11:20 PM] ![]() ![]() ![]() |