Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 15:38:50 +0000



Post From: ACSIL: How draw an inclined line with text label and bar calculation

[2023-08-05 21:58:36]
JohnR - User831573 - Posts: 306
There are multiple ways to accomplish what you want.
- I think a workable method would be to create a study and tie it to either a button or chart popup menu to activate it.

Once you press the button or select menu item, then turn on the ability to receive pointer events
This study once activated would do something based on the first mouse click - like save the bar and price value you want for the beginning of the line.
then on the 2nd mouse click it would assemble the desired properties of the line you want to draw and draw / create it using sc.UseTools.
Also you would use the UseTools to create a text box with your desired info and selected draw location.
Then you could turn off receiving pointer events.

Just a thought.
What Others provided was the parts of ACSIL interface you needed to accomplish what you are trying to do.
What I first provided was a study that uses some of that capability.

Look in Studies.cpp for this as another example --->

SCSFExport scsf_ButtonAndMenuAndPointerExample(SCStudyInterfaceRef sc)
I see it starting on line 3677 in NP++
Hope this helps,
JohnR