Support Board
Date/Time: Sun, 24 Nov 2024 03:11:08 +0000
Post From: making an open and close for a time period
[2024-02-27 19:25:01] |
4LifeNeo - Posts: 40 |
I know it has been a few years since the question was asked, but hopefully, it would still be helpful - either to you or someone else looking to do the same thing. I was also looking for a Study for the Open/Close at a certain period, which led me to this post. Since I couldn't find one already built, I thought the combination of "Color Bar Based On Alert Condition", BARTIME, and plotting the extension might work. And it does - at least for my purpose. Here's what you can do to try. 1 - Add the "Color Bar Based On Alert Condition" study. 2 - Under its "Settings and Inputs" tab, set the "Output When Condition True" to "Use Input Data". 3 - Set the "Input Data" to "Open". 4 - Set "Draw Extension Lines at Color Bar Value" to the one you prefer (Extend to End of Day for example). 5 - Under its "Subgraphs" tab, you can set the Color Bar (SG1) to Ignore if you want. 6 - Set the type of "Drawing Style" that you want for the "Extension Lines". For some reason, the "Name Label" and "Value Label" only work when set to "Right" for Extensions. I want it Right Edge and Right side Values Scale, but they wouldn't show when using those options. 7 - Under the "Alerts" tab, use this format and change it to the time that you want (mine is set to the open of 8:30 AM): =ABS(BARTIME - TIME(8, 30, 0)) < TIME(0, 0, 1) I would assume yours would be =ABS(BARTIME - TIME( 15, 59, 0)) < TIME(0, 0, 1) on your 10 secs chart. 8 - For the Close, duplicate the study above once it's created and change the "Input Data" to Close. Change the Extension Lines Color and change the time to: =ABS(BARTIME - TIME( 15, 59, 40)) < TIME(0, 0, 1) |
ColorBarBasedOnAlertConditionExample.png / V - Attached On 2024-02-27 19:24:17 UTC - Size: 94.03 KB - 87 views |