Plot Session Open Of Specific Symbol


Category:
0
0

Hello, I have the following TOS code: def O = open(period=”DAY”);

How can I specify the symbol rather than referencing the symbol in the chart? For example, if the chart is /ES, how can I similarly define VIX daily session open?

Marked as spam
Posted by (Questions: 1, Answers: 1)
Asked on November 15, 2018 12:57 pm
46 views
0

The email address you provided with your profile is invalid. I see that you tried to post a follow-up comment by entering a new Answer to the question. I tried to notify you via that email address and it failed. Do not use the “Post your answer” form at the bottom of the thread unless you are providing a new solution to a question.

( at November 16, 2018 9:52 am)
0
Private answer

Everything you need to know about this is explained here: http://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Fundamentals/close.html

So we simply take your code and add another parameter for the ticker symbol:

plot priceO = open(symbol = "VIX", period = AggregationPeriod.DAY);

You can make that a plot statement and the value will be plotted for each day on the intraday chart. Or you can make that a def statement and use the value somewhere else in your code.

 

Marked as spam
Posted by (Questions: 37, Answers: 4079)
Answered on November 16, 2018 9:17 am