Login Page - Create Account

Support Board


Date/Time: Wed, 19 Mar 2025 23:28:32 +0000



Post From: ASCIL custom DRAWING_PARALLEL_RAYS

[2022-10-31 14:32:01]
User895355 - Posts: 55
I'm attempting to create a custom parallel_rays drawing with a "midline" in between the two parallel_rays. I just can't seem to nail it. I've posted the minimal code for just getting the parallel rays up and running, which is not working. There is no example in the "studies[x].cpp" files that show how to do this from a "pointer event". Any help would be greatly appreciated. Here's the code I have in place:

if (sc.PointerEventType == SC_POINTER_BUTTON_DOWN && sc.BlockChartDrawingSelection == 0)
{
sc.BlockChartDrawingSelection = 1;
Tool.BeginDateTime.Clear();
Tool.EndDateTime.Clear();
Tool.BeginIndex = sc.ActiveToolIndex;
Tool.BeginValue = sc.ActiveToolYValue;
}
else if (sc.PointerEventType == SC_POINTER_MOVE && sc.BlockChartDrawingSelection == 1)
{
Tool.EndIndex = sc.ActiveToolIndex;
Tool.EndValue = sc.ActiveToolYValue;
}
else if (sc.PointerEventType == SC_POINTER_BUTTON_DOWN && sc.BlockChartDrawingSelection == 1)
{
Tool.ThirdIndex = sc.ActiveToolIndex;
Tool.ThirdValue = sc.ActiveToolYValue;
/* sc.BlockChartDrawingSelection = 0; */
/* Tool.Clear(); */
}