Hello,
I'm trying to write a simple study that adds a label that decodes/maps symbols to names and I'm having trouble with the syntax/rules of thinkscript.
I just need a nudge in the right direction on why I'm getting the following errors:
I need this because I have a 4x3 grid of all ETFs I'm interested in watching and they become so small the names don't show up. To get around that, I want to simply paint a label onto the chart.
I'm trying to write a simple study that adds a label that decodes/maps symbols to names and I'm having trouble with the syntax/rules of thinkscript.
Code:
def currentSymbol = GetSymbol();
def label;
switch (currentSymbol)
{
case "XLK":
label = "Technology";
}
addLabel(1, label, color.Light_Gray);
I just need a nudge in the right direction on why I'm getting the following errors:
Code:
currentSymbol is not a valid enum input - at 4:9
Expected double at 1:5
Incompatible parameter: "Technology" at 7:9
Expected double at 7:9
I need this because I have a 4x3 grid of all ETFs I'm interested in watching and they become so small the names don't show up. To get around that, I want to simply paint a label onto the chart.