Support Board
Date/Time: Mon, 25 Nov 2024 10:35:23 +0000
[Programming Help] - Coding Question: How to draw 5 parallel lines 1% apart?
View Count: 249
[2024-03-10 18:15:04] |
User656492 - Posts: 143 |
I understand SC support provides little programming support but maybe someone can take a moment. I know I can create 5 DRAWING_HORIZONTALLINEs and do the math for each, but it seems that there should be a cleaner way to use the DRAWING_PARALLEL_LINES drawing type to do this more cleanly. I'm unable to find an example of code using DRAWING_PARALLEL_LINES. Anyone got one in their pocket? Thanks! |
[2024-03-10 21:36:57] |
User656492 - Posts: 143 |
Update for those who are climbing this mountain. I found some insight in a related support request. All levels are specified as a floating point percentage (Example: 0.618) of Tool.BeginValue. So in this example, 50.0 = Begin Value * .5. Tool.RetracementLevels[0] = 100.0f; Tool.RetracementLevels[1] = 61.8f; Tool.RetracementLevels[2] = 50.0f; Tool.RetracementLevels[3] = 38.2f; Tool.RetracementLevels[4] = 23.6f; Tool.RetracementLevels[5] = 0.0f; The answer is to go negative. Tool.RetracementLevels[0] = -1.0f; <== BeginValue + 1% |
To post a message in this thread, you need to log in with your Sierra Chart account: