Lumberjack88
New member
Futures contracts are denoted by the regular futures name like /GC and followed by the month letter, for example M for June, and then followed by the year, for example 22.
input symobl1 = "/GC"
will give me just the regular gold futures contract. If the letters and numbers after /GC constantly change, what can I do to account for that?
I'd like to have something like this: input symbol1 = "/GC" + monthvariable + yearvariable and this should be the same as "/GCM22"
if I define the year as: def yearvariable = GetYear() - 2000 + 1;
and def monthvariable = M;
how can I concat these yearvariable and monthvariable expressions into the symbol1 input so that I don't have to change it manually each time i want to use that plot?
input symobl1 = "/GC"
will give me just the regular gold futures contract. If the letters and numbers after /GC constantly change, what can I do to account for that?
I'd like to have something like this: input symbol1 = "/GC" + monthvariable + yearvariable and this should be the same as "/GCM22"
if I define the year as: def yearvariable = GetYear() - 2000 + 1;
and def monthvariable = M;
how can I concat these yearvariable and monthvariable expressions into the symbol1 input so that I don't have to change it manually each time i want to use that plot?