Accessing drawing components via QScript

Have a QScript to share, or need help with programming? Post your comment here.
Post Reply
sbank
Posts: 174
Joined: Tue Jul 21, 2015 9:35 pm
Contact:

Accessing drawing components via QScript

Post by sbank » Tue Nov 28, 2023 2:33 pm

Is there a way for QScript together the value of manually drawn components on the screen?

A simple example, if I manually create a trendline connecting two highpoint, then extend said line by a couple of bars, how can QScript get the values at these bars?

Since I am not drawing the lines in QScript, I am not sure how I would approach this.

kjociii
Posts: 15
Joined: Tue Jul 21, 2015 9:15 pm
Contact:

Re: Accessing drawing components via QScript

Post by kjociii » Wed Nov 29, 2023 1:58 pm

Hi Sbank,

As far as I know, there is no way to get information from the trendline tool or other built-in drawing tools into QScript. The way around this for your example is to create a trendline QScript indicator with two hotspots. You would click the two hotspots, draw the line and then all the information would be available to you in QScript. You can link this script to the user-defined toolbar for easy access and it would behave pretty much like the built-in trendline tool.

Kenn
Wave59 Solution Provider
Custom QScript Programming
kenn@scriptbuilder.net

sbank
Posts: 174
Joined: Tue Jul 21, 2015 9:35 pm
Contact:

Re: Accessing drawing components via QScript

Post by sbank » Wed Nov 29, 2023 2:45 pm

Thanks Kenn! Yeah, I was thinking of going this approach. So you kinda confirmed my thoughts. :)

Post Reply

Who is online

Users browsing this forum: No registered users and 95 guests