Page 1 of 1

Accessing drawing components via QScript

Posted: Tue Nov 28, 2023 2:33 pm
by sbank
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.

Re: Accessing drawing components via QScript

Posted: Wed Nov 29, 2023 1:58 pm
by kjociii
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

Re: Accessing drawing components via QScript

Posted: Wed Nov 29, 2023 2:45 pm
by sbank
Thanks Kenn! Yeah, I was thinking of going this approach. So you kinda confirmed my thoughts. :)