def VIXClose = if IsNaN(close("VIX")) then VIXClose[1] else close("VIX");
AddLabel(yes, "VIX: "+VIXClose, If VIXClose>VIXClose[1] then color.Green
else If VIXClose<VIXClose[1] then color.RED else color.BLACK);
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thanks for the response Svanoy, actually you were correct when you mentioned VX, as futures is the one I'm interested in. Sorry for the confusion (on my part). If I were a younger man I'd give this coding a shot. I find it very interesting. Thanks again.Remove the forward slash.
/VX is futures index, for some reason that is what I read when I saw your post.
You want just VIX so:
is what you want.Code:def VIXClose = close("VIX"); AddLabel(yes,VIXClose,color.white);
can you add a code so it will show ticker symbol as well?This should work.
Code:def VIXClose = if IsNaN(close("VIX")) then VIXClose[1] else close("VIX"); AddLabel(yes, VIXClose, If VIXClose>=VIXClose[1] then color.Green else color.RED);
Something wrong. Vix shown green color. before the adding ticker symbol it was red. Can you take a look please?@longshot834
Code:def VIXClose = if IsNaN(close("VIX")) then VIXClose[1] else close("VIX"); AddLabel(yes, "VIX: "+VIXClose, If VIXClose>=VIXClose[1] then color.Green else color.RED);
def VIXClose = if IsNaN(close("VIX")) then VIXClose[1] else close("VIX");
AddLabel(yes, "VIX: "+VIXClose, If VIXClose>VIXClose[1] then color.Green
else If VIXClose<VIXClose[1] then color.RED else color.BLACK);
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
J | Label ( vix price / 15.87) | Questions | 3 | |
G | VIX MTF label | Questions | 6 | |
H | VIX label for Tick chart | Questions | 2 | |
price label | Questions | 2 | ||
D | Earning label for pre-market/afterhours/during | Questions | 1 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.