Support Board
Date/Time: Thu, 28 Nov 2024 00:51:15 +0000
Post From: Drawing A 1x1 Square
[2023-06-19 14:33:37] |
JohnR - User831573 - Posts: 306 |
Soooo.... As with most things related to SC, if you think about it and learn enough about SC, there is usually a way to accomplish what you want. After digging, and trying various thought processes, I did come up with a way to do something similar to what you want to do. Change the Price levels tool from calculating % to ratios. My goal, was a fan that was based on 3 price/bar points. SC Gann fan tool only uses 2 points. Here is what I did to accomplish my goal. It is a hack, but I get what I want. You would do a similar project starting with the price replacement tool. 1 - Set up a configuration of the tool with the numbers you want for the levels and delete the rest of them. Also set the line values, color, style, etc. 2 - K E Y -- uncheck ALL of the levels -> EXCEPT <- the first one - tool. You always need this to be able to see the original drawing to be able to move change it. I made it a different color and line type to be able to see it easily. 3 - create ACSIL code that eithers starts your script via buttons or menu lines to the chart popup menu. SC provides examples for doing both. In this ACSIL code, you will do a search for a user drawn Price Retracements Tool. Once you find it, you then read the base price / bar points and other pertinent properties, then read each of the levels and get values, lines, colors, etc. still in the same set of code, Now draw a set of lines on your chart your ratio formula. You also will most likely want to write code to be able to delete that set of lines with one command button / menu choice. I chose to do this via a menu selection, while having the pointer on the bar that was the start of my drawing(s), and either deleted or deleted and then redrew, to simulate a move if it needed to match the move of the base object (Price Ret tool). Not smooth, or complete, but I have the tool I want on my charts and I have sufficient control. Also, don't forget to save the tool configuration. So, by doing it this way, I was able to retain all of the ability already built into a SC tool, in my case Pitchfork. It's ability to add, remove lines/levels, colors, etc. Basically I needed a way within SC to select 3 points and retain the ability to have all of the user popup menu, line, level and other property 'stuff' already taken care of instead of having to write all of that. I draw a pitchfork, then select a menu item to draw my fan for that bar, it reads the pitchfork info and then draws my fan, including if I use the cut ability of shortening an object. There are a few known quirks, like I needed a menu item to erase all fans, redraw all fans and change a single fans line properties to increase / decrease visibility. Your milage may vary. Hope this helps, John PS - I'm self taught C++ -- so there are surely more elegant ways to accomplish this task. |
Custom tool.png / V - Attached On 2023-06-19 13:18:59 UTC - Size: 43.4 KB - 103 views custom chart menu.png / V - Attached On 2023-06-19 14:31:47 UTC - Size: 13.05 KB - 98 views |