Custom column won’t update on watchlist formula


Category:
0
0

I have a custom column I added to a watchlist in TOS. It doesn’t seem to update on its own like the formula does on the chart. If I right click on column and edit formula then push save it updates info correctly.

Marked as spam
Posted by (Questions: 2, Answers: 1)
Asked on November 7, 2018 8:14 am
270 views
0
Private answer

It would have been best for you to include your code in plain text form. I am not going to take the time to try typing out all that code from your screenshot so I can test and troubleshoot it. So the only thing I can offer is that you have a ticker symbol listed in the code that no longer exists.

Symbol /TF stopped being traded earlier this year. It is replaced by /RTY. Try updating your code and see if that corrects the issue.

Update 11/8/18:
Since we now have some source code to work with I have some additional details to add to my answer

Whenever something is not working as expected the first step is to reduce the code down to the most basic elements. Reduce complexity, eliminate unnecessary pieces and test the output. Here is what I end up with:

def df = if (GetSymbol() == “/CL”) then close(“OIV”)
else imp_volatility();
plot data = df;

And we find that the problem occurs write here. Apply this to a watchlist that contains the /CL symbol and check the value. Not only is the value static, but the value is not correct. Why does this work on a chart and not on a watchlist? I have no idea. I feel that it should work in a watchlist, but it does not. There is nothing to do here except to report it to TDA support and see what they say. I will leave that to members of the audience to report.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on November 7, 2018 9:16 am
0

input days_back = 252;
# implied volatility
# using proxies for futures
def df = if (GetSymbol() == “/ES”) then close(“VIX”) / 100
else if (GetSymbol() == “/CL”) then close(“OIV”) / 100
else if (GetSymbol() == “/GC”) then close(“GVX”) / 100
else if (GetSymbol() == “/SI”) then close(“VXSLV”) / 100
else if (GetSymbol() == “/NQ”) then close(“VXN”) / 100
else if (GetSymbol() == “/RTY”) then close(“RVX”) / 100
else if (GetSymbol() == “/YM”) then close(“VXD”) / 100
else if (GetSymbol() == “/6E”) then close(“EVZ”) / 100
else if (GetSymbol() == “/ZN”) then close(“VXTYN”) / 100
else imp_volatility();
def df1 = if !IsNaN(df) then df else df[-1];
# display regular implied volatility
# calculate the IV rank
# calculate the IV rank
def low_over_timespan = Lowest(df1, days_back);
def high_over_timespan = Highest(df1, days_back);
def iv_rank = Round( (df1 – low_over_timespan) / (high_over_timespan – low_over_timespan) * 100.0,
0);
plot IVRank = iv_rank;
IVRank.SetDefaultColor(Color.GREEN);

( at November 8, 2018 5:07 am)
0

I have updated my answer to include troubleshooting results from your code.

( at November 8, 2018 11:04 am)