Support Board
Date/Time: Tue, 17 Nov 2026 18:16:51 +0000
Post From: ACSIL: letting a custom study use a left-button drag without scrolling (Pointer/Hand tool)
| [2026-10-05 15:49:18] |
| Fabio - Posts: 155 |
|
Dear SC support, I hope this message finds you well. I read the 2962 release notes: sc.SetChartDrawingTool() was removed and sc.SetActiveDrawingTool() is now the recommended function. This is exactly what I need for my order-entry study: switch the chart to Tools >> Chart Values while the study is armed (so a left-button drag does not scroll the chart), then back to Tools >> Pointer after the order is sent. I am currently on 2957 (stable) and would like to know before updating: 1. In 2962, can a custom study call sc.SetActiveDrawingTool(sc.ChartNumber, DRAWING_TOOL_CHART_VALUES, 0) to make Chart Values the active tool, and later sc.SetActiveDrawingTool(sc.ChartNumber, DRAWING_TOOL_POINTER, 0) to return to Pointer? Are there any conditions, for example it cannot be called while a Custom Study Control Bar button is enabled, or only from a normal study update and not from a pointer/button event? 2. Which values does it expect? The DrawingTypeEnum constants are DRAWING_TOOL_POINTER = 10, DRAWING_TOOL_CHART_VALUES = 22, DRAWING_TOOL_HAND = 23, but sc.CurrentlySelectedDrawingTool reports Pointer = 0, Hand = 52, Chart Values = 2. 3. In 2957 this call returns 0 and the tool does not change. What does a return value of 0 mean? Thank you in advance for your reply. Fabio |
