Without a copy of your spreadsheet I can't do much for you. If you have a column of values and you want to convert those to basic plot statements, you can create a formula in the next column to concatenate the values from the first column into plot statements.
concatenate | kənˈkatnˌāt |
verb [with object] formal or technical
link (things) together in a chain or series: some words may be concatenated, such that certain sounds are omitted.
So let's say you have a value of 1200 in column A. In column B you would create a formula like this:
= "plot a1 = " & A1 & ";"
This will create a text value in column B that you can copy/paste into a new chart study in Thinkorswim. The plot statement for the example above would look like this:
plot a1 = 1200;
You can add another column to contain the plot name and include that in your formula. I have attached a sample spreadsheet, generated via Google Sheets and exported as a .xlsx compatible file.
Let's see if you can implement this.
plot valueForCL = if !IsNaN(close(symbol = "/CL")) then 57 else Double.NaN;
That is the basic structure. Now see if you can implement this in your spreadsheet.