Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 22:13:05 +0000



[Programming Help] - Custom Drawing Tool not Chart Study

View Count: 4123

[2016-07-01 15:39:43]
JABO75 - Posts: 3
I am looking to implement both custom studies and drawing tools. I have successfully added some of my custom studies. I want to establish if it is possible with ACSIL/C++ to create a custom drawing tool that is accessible in the same way as a drawing tool i.e. it does not need to be added to a chart as a custom study before the features are available. It is selected either from the menu or with a keyboard shortcut.

The drawing tools would have multiple instances on a single chart just like trend lines, fib expansions etc. are currently implemented.

I have been reading the ACSIL documentation and function lists over the last week but not found anything directly related to what I want to achieve.

Many thanks
Jason
[2016-07-01 16:35:31]
JohnR - User831573 - Posts: 306
Hey Jason,

I am just a little ahead of you in the beginning process, so take what I say with a grain of salt. You can create custom drawing tools using the existing drawing tools, lines, circles, pitchforks, etc. You can create an study/indicator and have it not update on every bar, but only be called by associating it with a button, which there are, I think, 50 or you can add a line to the popup chart menu, but not the main menu. Also, you can have combine multiple things (lines, dots, tools) into one, so when it is referenced or moved, it acts as one.

I have not completed my tool, which is a dynamic gann fan, which Don Fisher started many years ago, but hope to make a lot of progress over this long weekend. There is a lot of great sample code, and all answers are in the docs, but to me, I had to look around to piece the parts together. What I did is create a word file and cut/pasted into it every time I found either an API or snippet of a function I needed to complete the process. Ex. Your tool needs to have a function to catch when it is being unloaded, to release resources.

Is that what you are looking for?

John
[2016-07-01 16:41:33]
JABO75 - Posts: 3
Thanks John

I think that isn't quite what I'm after. I have already created a custom study that is linked to ACS button 1 but this relies on having added the study to the chart and then activating. For me the studies are one thing and the drawing tools are something else. Without the step of adding the study to the chart the custom tool is not accessible which to me is not a tool it is a study if that makes sense! Sierra and pretty much every chart package I have used treat drawing tools differently to studies but everything in the documentation points to fettling a study into being a tool rather than creating your own tool that is handled by the software as a tool.

I hope that makes sense!

Jason
[2016-07-01 17:33:59]
JohnR - User831573 - Posts: 306
I hear you. It would be a nice capability to be able to create a tool that was not tied to a chart via it's study. Maybe, Sierra could enhance it's tool abilities in the following way. Add an API which one could call to make a tool 'global'. You could provide tool ID and state-> set to true / false, then it would be associated to that ACS button and/or popup menu item for all charts, assuming there was not a conflict. Also they would need to add a setting in Global Setting, similar to Files to open on startup, for 'Tools to load on startup'. Or enhance the current 'open on startup' to include .dlls (tools) as well as chartbooks. I would think a separate Tools at startup would be easier for them to contain errors / issues.

For now as a workaround, you might want to put your tool(s) in a study collection, and use the Global Setting-> General Settings and check box for 'Use Default Study Collection for new Charts' and include it's study collection name.

John
[2016-07-03 00:19:31]
Sierra Chart Engineering - Posts: 104368
I want to establish if it is possible with ACSIL/C++ to create a custom drawing tool that is accessible in the same way as a drawing tool i.e. it does not need to be added to a chart as a custom study before the features are available. It is selected either from the menu or with a keyboard shortcut.

No, not at this time but this is part of our longer-term plans for ACSIL.

The closest support available for drawing tools is documented here:
https://www.sierrachart.com/index.php?page=doc/doc_MouseAndMenuInteractionFromACStudy.html
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2016-07-06 21:15:19]
JABO75 - Posts: 3
John,

Your suggestion about default study collection was helpful thank you.

I think I've taken this as far as I can go without the true custom drawing tool integration. I am up to 300 lines of code and requiring a storage block of arrays to keep all the price and bar data so the resultant drawings can be maintained between program/chartbook loads. And even then I am limited to only one instance of the tool per chart.

Kudos to Sierra Chart though - I have gotten significantly further with ACSIL and C++ than I have managed with any other charting packages!

But I think without the full drawing tool integration I may have to put this on hold.
[2019-05-30 09:34:08]
grantx - Posts: 244
@JohnR @User831573

You can create custom drawing tools using the existing drawing tools, lines, circles, pitchforks, etc. You can create an study/indicator and have it not update on every bar, but only be called by associating it with a button, which there are, I think, 50 or you can add a line to the popup chart menu, but not the main menu. Also, you can have combine multiple things (lines, dots, tools) into one, so when it is referenced or moved, it acts as one.

I am working my way through the help file and have also been compiling the bits and pieces into my own document. It has been slow going though :)

Would you be kind enough to share how you achieved the above? ie. if I draw 3 horizontal lines on the chart, have them combined so that when referenced (I click and drag one of the lines) then the others move as well. Functionally, the 'Price retracement tool' works perfectly for what I am after except for one thing, namely: I want to be able to specify points instead of percentages.

I hope you are still around.
[2019-12-15 14:26:58]
User365411 - Posts: 189
No, not at this time but this is part of our longer-term plans for ACSIL.

The closest support available for drawing tools is documented here:
https://www.sierrachart.com/index.php?page=doc/doc_MouseAndMenuInteractionFromACStudy.html

Hi staff, this is your answer 3.5 years ago.
In the meantime something is changed?
Or it's planned in a near future?
TY
Date Time Of Last Edit: 2019-12-15 14:27:24
[2020-10-06 11:09:08]
User316362 - Posts: 210
good question
[2020-11-16 15:55:22]
UnixManiac - Posts: 46
No, not at this time but this is part of our longer-term plans for ACSIL.

The closest support available for drawing tools is documented here:
https://www.sierrachart.com/index.php?page=doc/doc_MouseAndMenuInteractionFromACStudy.html

Any estimate about this? Is this still on your list?
[2023-10-10 16:35:07]
franklinian - Posts: 4
I am also interested in knowing about any further developments to ACSIL or to SierraChart in general since the last post 3 years ago that would allow this kind of custom tool development. Thank you in advance.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account