Get date/time value from TradingView

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
CARPARK
Posts: 3
Joined: 11 Apr 2022, 06:24

Get date/time value from TradingView

01 May 2024, 15:04

No idea where to start with this one - I am a trader and would love to copy the date/time to clipboard when the mouse is in a specific position on a chart (eg https://www.tradingview.com/chart/jkEl3KsC/?symbol=SP%3ASPX).

You can see the date/time I want, it's shown by red arrow here:
image.png
image.png (353.76 KiB) Viewed 413 times
The thing is, I can't use dev tools in chrome to figure out what div or whatever to capture as the box disappears as soon as you move the crosshair/mouse off the chart.

Also - I can't code something in pinescript (tradingview charting script/code) as there's no function for locating the position of the cursor - it's not supported.

So I use AHK for other stuff and was wondering whether anyone could point me in the correct direction of how I could do this?

Any ideas? Anyone? Fry? Fry? Fry?
User avatar
andymbody
Posts: 927
Joined: 02 Jul 2017, 23:47

Re: Get date/time value from TradingView

01 May 2024, 15:46

My first thought is ctrl+A to select all, then ctrl+c to copy, then parse the results looking for text in that date/time format.

Does ctrl+a include that date in the selection? Are there other date/times that can conflict with extracting that one with the method suggested?

I think I've done sometime like this on tradingview a few years ago, but I'm not at a computer where I can test this now.
CARPARK
Posts: 3
Joined: 11 Apr 2022, 06:24

Re: Get date/time value from TradingView

02 May 2024, 00:47

Unfortunately CTRL+A CTRL+C yields nothing to the clipboard

After a bit more thinking I think I'll have to create a chrome extension that fires on a hotkey rather than use AHK. Unless anyone has any other ideas?
CARPARK
Posts: 3
Joined: 11 Apr 2022, 06:24

Re: Get date/time value from TradingView

09 May 2024, 05:08

Thanks for the helpful replies.

Apparently what I'm trying to capture is a canvas element and they're super hard to interrogate.

So at the moment I am looking at Windows Power Automate: screencap/isolate area then OCR using Powershell then go from there, so AHK/UIA can't help me unfortunately.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: AudioBabble, Google [Bot], kunkel321, Milincho and 39 guests