Support Board
Date/Time: Thu, 28 Nov 2024 05:49:29 +0000
[Programming Help] - Custom Study HELP
View Count: 242
[2023-05-24 20:12:34] |
User195924 - Posts: 68 |
Hello, I've the following code that I am looking to convert into sierra chart custom study, could someone please help create this study? Much appreciated. study("Fibonacci Time Zone", shorttitle="FTZ", overlay=true) { // Input parameters period = input(20, "Period", type=integer) colorUp = color.green colorDn = color.red // Calculate the Fibonacci ratios. ratios = [0.236, 0.382, 0.618, 1.0] // Create a new series for the Fibonacci Time Zone Indicator. zones = series(close, "Zones") // Loop over each bar in the chart. for i = 1 to barcount: // Calculate the Fibonacci retracement levels. retracements = [] for ratio in ratios: retracements.append(close - (close - close) * ratio) // Plot the Fibonacci Time Zone Indicator. plot(zones, colorUp, style=style.line, linewidth=1) plot(-zones, colorDn, style=style.line, linewidth=1) } |
To post a message in this thread, you need to log in with your Sierra Chart account: