You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If your script contains a plotline method, a color attribute is added to the sidebar.
If you pass a given color as an argument to the method, the color attribute is still visible but is useless. Nonetheless, it will temporarily preview the color in the chart if changed but the result won't be saved.
If you pass a variable as an argument, this variable will be added as a new attribute to the sidebar next to color which would still be useless.
If you have several plotline methods without color arguments, only one attribute is added to the right sidebar.
Steps to reproduce
(Preferably from a clean environment / incognito mode)
CASE 1: 1 plotline method with static argument
Click on Add Indicator
Copy-paste the following line in the script editor
plotline(avg_close(bar),color=blue)
You should see this:
Change the color attribute
Close the indicatorDialog
In this case, since we have a valid color passed as an argument, I am not expecting to see a color attribute added to the sidebar
CASE 2a: 1 plotline method with a dynamic argument of name 'color'
Click on Add Indicator
Copy-paste the following line into the script editor
plotline(avg_close(bar),color=options.color)
Change the color attribute
Close the dialog.
It should work as expected, the color is saved and visible onto the chart.
CASE 2b: 1 plotline method with a dynamic argument of a name different than 'color'
All the same steps as CASE 2a to the exception that the variable name passed as an argument.
plotline(avg_close(bar),color=options.color2)
Now we have two color pickers in the sidebar. color attribute is useless as explained earlier but the line will eventually be as defined in color2.
CASE 3: multiple plotline methods with dynamic arguments
In the next screenshot, the color attribute is green here, as seen in the next screenshot.
The problem is that it does absolutely nothing. If you change the color or focus outside the indicatorDialog, it will override all other colors passed as arguments in plotline methods and then revert the color to the user-defined once I close the dialog.
Color shouldn't be visible if a color argument is passed explicitly to all `plotline methods found in the script.
Import the following indicator which defines 3 plotline methods.
It overrides dynamically defined colors temporarily.
Exit the dialog.
Lines' colors revert back to user-defined colors in indicatorDialog.
In this 3rd case, we observe there's a single automatically populated color attribute for 3 plotline methods in the script.
A color attribute should be added to the sidebar for every plotline that has no color attribute defined. The order should follow the order of appearance of the methods in the scrip.
Summary
[ ] I added my browser's console output in the issue (open the console first, try to reproduce the issue then see if there is anything)
I provided a clear and concise description of what the bug is (see both sections below)
The text was updated successfully, but these errors were encountered:
adeacetis
added
bug
Something isn't working
ux
UX enhancements/proposals to make users' life better
scripts
Custom scripts / indicators related
labels
Jun 12, 2023
Describe the issue
If your script contains a plotline method, a color attribute is added to the sidebar.
If you pass a given color as an argument to the method, the color attribute is still visible but is useless. Nonetheless, it will temporarily preview the color in the chart if changed but the result won't be saved.
If you pass a variable as an argument, this variable will be added as a new attribute to the sidebar next to color which would still be useless.
If you have several plotline methods without color arguments, only one attribute is added to the right sidebar.
Steps to reproduce
(Preferably from a clean environment / incognito mode)
CASE 1: 1
plotline
method with static argumentYou should see this:
indicatorDialog
In this case, since we have a valid color passed as an argument, I am not expecting to see a color attribute added to the sidebar
CASE 2a: 1
plotline
method with a dynamic argument of name 'color'color
attributeIt should work as expected, the color is saved and visible onto the chart.
CASE 2b: 1
plotline
method with a dynamic argument of a name different than 'color'All the same steps as CASE 2a to the exception that the variable name passed as an argument.
Now we have two color pickers in the sidebar.
color
attribute is useless as explained earlier but the line will eventually be as defined incolor2
.CASE 3: multiple
plotline
methods with dynamic argumentsIn the next screenshot, the
color
attribute is green here, as seen in the next screenshot.The problem is that it does absolutely nothing. If you change the color or focus outside the indicatorDialog, it will override all other colors passed as arguments in
plotline
methods and then revert the color to the user-defined once I close the dialog.Color shouldn't be visible if a color argument is passed explicitly to all `plotline methods found in the script.
indicator_ichimoku.txt
color
attribute.It overrides dynamically defined colors temporarily.
Lines' colors revert back to user-defined colors in
indicatorDialog
.In this 3rd case, we observe there's a single automatically populated
color
attribute for 3plotline
methods in the script.A
color
attribute should be added to the sidebar for every plotline that has no color attribute defined. The order should follow the order of appearance of the methods in the scrip.Summary
[ ] I added my browser's console output in the issue (open the console first, try to reproduce the issue then see if there is anything)
The text was updated successfully, but these errors were encountered: