Support Board
Date/Time: Tue, 17 Nov 2026 18:16:53 +0000
Post From: ACSIL: letting a custom study use a left-button drag without scrolling (Pointer/Hand tool)
| [2026-09-30 06:30:45] |
| Fabio - Posts: 155 |
|
Good morning and thank you for your answer. The Reward/Risk approach is a good idea, and I may add it later as a secondary, fall-back entry method. However, I would prefer not to use it as my main method, and here is why. My study works like this: after arming it with a Control Bar button (or its keyboard shortcut), - a single click places the stop, and a market order is sent immediately, sized from the stop distance; - a click and drag sets the stop where I press and the entry where I release, and a limit or stop order is sent automatically depending on where the entry is relative to the market. While the mouse moves, the study shows a live preview of the entry, stop and target lines together with the position size and dollar risk, so I see exactly what will be sent before I release. That is two actions per trade: arm, then click or drag. The Reward/Risk approach needs at least four (draw the tool, select it, right-click, choose the menu item). When trading a fast market at the right edge of the chart, those extra seconds matter. The only piece still missing is the drag: with Tools >> Pointer (or Hand) selected, Sierra Chart scrolls the chart while the left button is held down, so the price under the pointer does not change. At the moment I work around this by temporarily replacing the chart window procedure while the study is armed, but I would much prefer a supported method. My questions are: (1) Is there, or could you consider adding, a supported way for a study to stop the chart from scrolling during a left-button drag while the study is armed (for example while its Custom Study Control Bar button is enabled, or through a variable such as sc.BlockChartDrawingSelection)? This would let a study handle a drag the same way the built-in drawing tools do. (2) What is the intended use of sc.SetChartDrawingTool / sc.SetActiveDrawingTool, and why would they not change the active tool when called from a study? The first returns 1 and the second returns 0, and sc.CurrentlySelectedDrawingTool never changes. Switching to Tools >> Chart Values while armed, and back to Pointer afterwards, would also solve the problem. (3) Is temporarily replacing the chart window procedure (only while the study is armed, and restored on disarm, on full recalculation and on sc.LastCallToFunction) known to cause any problems, or is it acceptable at the user's own risk? Thank you again for your help. Best regards, Fabio |
