All time weekly closing high script in watchlist

Optuma Forums Optuma Scripting All time weekly closing high script in watchlist

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #67185
    Louis
    • Topics: 23
    • Replies: 39
    • Posts: 62

    Hi,

    I have a watchlist with 2 columns. I am asking 2 things. Did the week make an all time high? Did the week make an all time closing high? My script for the weekly all time high works properly, but my script for the weekly all time closing high does not. I have made sure the watchlist date range is set to everything. I have the timeframe set to week in all the parts of the script, so changing the timeframe to week in the watchlist properties does not help, and with the HighestHigh function I have tried the include current bar checkbox as well. Please let me know where I have gone wrong with the 2nd script looking for a weekly all time closing high. Here are the scripts:

    I have attached the work book if that makes it easier. You can open it and look at the XLP tab to see price has made a weekly all time closing high this last candle, but it shows false in the watchlist, on last tab, in the column ATCH? which has the 2nd script from above.

    thank you
    Louis

    #67191
    Darren
    • Topics: 69
    • Replies: 737
    • Posts: 806

    Hi Louis,

    As all the columns in your watchlist are using weekly data it would be best to not use the timeframe in the formulas (leave them as default) and just change the watchlist timeframe to weekly.

    However, the issue in your formula is that the Week component needs to be nested in the CLOSE() function, otherwise the daily close will be used when the watchlist timeframe is set to daily (it will work if set to weekly).

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest