Support Board
Date/Time: Thu, 28 Nov 2024 23:41:07 +0000
[Programming Help] - sc.ReceivePointerEvents and clicks in chart price scale
View Count: 344
[2023-03-12 23:28:12] |
User275839 - Posts: 61 |
I have a custom study that is set up with: sc.ReceivePointerEvents = ACS_RECEIVE_POINTER_EVENTS_ALWAYS;
if (sc.PointerEventType == SC_POINTER_BUTTON_DOWN){ do something }
The problem is that Sierra feeds it SC_POINTER_BUTTON_DOWN events for clicks in the chart price scale (right margin) as well as in the main chart body (price graph). Is there a way to either 1) suppress events from the price scale, or 2) to identify those events as such, and ignore them? Thanks for any suggestions! :) |
[2023-03-16 23:32:30] |
User275839 - Posts: 61 |
One more bit of information on this issue. If the chart is scrolled such that there are chart bars under the price column on the chart, SC_POINTER_BUTTON_DOWN events are fed to the study. If the chart is scrolled to the left far enough that there are no chart bars hidden under the price column, Sierra does not generate SC_POINTER_BUTTON_DOWN events. So, I'll ask again... is there some way ignore mouse down events in the price scale margin? Perhaps some kind of event mask bitfield would be helpful developers working on custom studies that use the Sierra drawing tools? |
[2023-03-17 08:42:23] |
User431178 - Posts: 544 |
is there some way ignore mouse down events in the price scale margin?
Did you try comparing pointer coordinate against values scale coordinate? ACSIL Interface Members - Variables and Arrays: sc.PointerHorzWindowCoord ACSIL Interface Members - Variables and Arrays: sc.RightValuesScaleLeftCoordinate |
[2023-03-17 17:23:33] |
User275839 - Posts: 61 |
That worked great! Thank you very much! :)
|
To post a message in this thread, you need to log in with your Sierra Chart account: