Implied volatility oscillator with candles? - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


Implied volatility oscillator with candles?
Updated: Views / Replies:1,074 / 10
Created: by Mibobwa Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Implied volatility oscillator with candles?

  #1 (permalink)
Trading Apprentice
Israel
 
Futures Experience: None
Platform: Metatrader
Favorite Futures: Forex
 
Posts: 8 since Mar 2015
Thanks: 3 given, 2 received

Implied volatility oscillator with candles?

Hello
Iím trying to do this for some time without success.
I need to display the implied volatility oscillator with candles instead of line, is it possible to do such thing?
Thanks

Reply With Quote
The following user says Thank You to Mibobwa for this post:
 
  #2 (permalink)
Trading Apprentice
albuquerque nm/usa
 
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: forex
 
Posts: 29 since Aug 2015
Thanks: 3 given, 8 received


Mibobwa View Post
Hello
I’m trying to do this for some time without success.
I need to display the implied volatility oscillator with candles instead of line, is it possible to do such thing?
Thanks

Mibobwa, not sure how that would be possible, since OHLC values (on a Daily chart) are by definition "intraday" values and since ImpVol by definition excludes intraday values and timeframes shorter than 1 day. Well, maybe somebody else knows how. But would you be satisfied with a histogram? And you could also load this with the canned ImpVol study into one panel and see both. (to merge, click the little up/down triangle that appears when you hover over a loaded study on your Edit Studies panel)
 
Code
declare lower;
plot myimpvol = impvolatility();
myimpvol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
EDIT: There's more insight to the problem here https://futures.io/thinkorswim/34929-heikin-ashi-smoothed-code-help-color.html . So you "might" get away with the Add Chart function if it still works. Alternatively, code might be written for WEEKLY "sort of" candles, where you could REFERENCE impvolatility() as Highest(high,5), Lowest(low,5), Open[5], and Close. Then plot it, and assign specific colors and/or shapes (dots, triangles etc) to each datapoint.


Last edited by tangerine; January 10th, 2016 at 06:03 PM. Reason: more info
Reply With Quote
The following user says Thank You to tangerine for this post:
 
  #3 (permalink)
Trading Apprentice
Israel
 
Futures Experience: None
Platform: Metatrader
Favorite Futures: Forex
 
Posts: 8 since Mar 2015
Thanks: 3 given, 2 received


Thanks tangerine for your suggestions, I think it's difficult to build daily implied volatility candles oscillator as there are no intraday data, but it is possible to build weekly one with the daily data as you suggested, I will try this.

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Israel
 
Futures Experience: None
Platform: Metatrader
Favorite Futures: Forex
 
Posts: 8 since Mar 2015
Thanks: 3 given, 2 received

though I program in other languages, this is the first time with thinkscript, I did write the code below but I think there is something missing, help appreciated.
 
Code
#
# TD Ameritrade IP Company, Inc. (c) 2007-2015
#

declare lower;

def openVL;
def closeVL;
def highVL;
def lowVL;

highVL = IMP_VOLATILITY(getSymbol(),Highest(high,5),priceType = "LAST");
lowVL = IMP_VOLATILITY(getSymbol(),Lowest(low,5),priceType = "LAST");
openVL = IMP_VOLATILITY(getSymbol(),Open[5],priceType = "LAST");
closeVL = IMP_VOLATILITY(getSymbol(),Close[5],priceType = "LAST");

AddChart(high = highVL, low = lowVL, open = openVL, close = closeVL, type = ChartType.CANDLE, growColor = color.green, fallColor = color.red, neutralColor = color.gray);

Reply With Quote
 
  #5 (permalink)
Trading Apprentice
albuquerque nm/usa
 
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: forex
 
Posts: 29 since Aug 2015
Thanks: 3 given, 8 received


Mibobwa View Post
though I program in other languages, this is the first time with thinkscript, I did write the code below but I think there is something missing, help appreciated.
 
Code
#
# TD Ameritrade IP Company, Inc. (c) 2007-2015
declare lower;
def openVL;
def closeVL;
def highVL;
def lowVL;
highVL = IMP_VOLATILITY(getSymbol(),Highest(high,5),priceType = "LAST");
lowVL = IMP_VOLATILITY(getSymbol(),Lowest(low,5),priceType = "LAST");
openVL = IMP_VOLATILITY(getSymbol(),Open[5],priceType = "LAST");
closeVL = IMP_VOLATILITY(getSymbol(),Close[5],priceType = "LAST");
AddChart(high = highVL, low = lowVL, open = openVL, close = closeVL, type = ChartType.CANDLE, growColor = color.green, fallColor = color.red, neutralColor = color.gray);

Mibobwa, the first "error" I see is you didn't code Close as I suggested. Instead, you called for Close[5] (let's call that Monday Close, for example), but what you want is Friday Close, i.e., the Close for the week. Of course, this is a moving calculation so the days are just examples. Other than that, you're calling for what may be an extinct piece of TS code, i.e., "growColor", which I believe is what they were saying at that link- that it doesn't work anymore.
One other thing... I am shocked at how you got away with writing that code that way. I never knew a standalone def could be written without popping up code red (and I write tutorials on TS basics ) . Anyway, I think you're working too hard- the simpler version of your code is this, but it still does not display anything:
 
Code
declare lower;

def openVL = IMP_VOLATILITY(getSymbol(),Open[5],priceType = "LAST");
def closeVL = IMP_VOLATILITY(getSymbol(),Close,priceType = "LAST");
def highVL = IMP_VOLATILITY(getSymbol(),Highest(high,5),priceType = "LAST");
def lowVL = IMP_VOLATILITY(getSymbol(),Lowest(low,5),priceType = "LAST");

AddChart(high = highVL, low = lowVL, open = openVL, close = closeVL, type = ChartType.CANDLE, growColor = color.green, fallColor = color.red, neutralColor = color.gray);
Alright, I'm gonna try and build what I mentioned earlier with dots and triangles, etc. Be back later.

Reply With Quote
 
  #6 (permalink)
Trading Apprentice
albuquerque nm/usa
 
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: forex
 
Posts: 29 since Aug 2015
Thanks: 3 given, 8 received

Okay, Mibobwa, here's the best I can come up with. I also added a Cloud line which you can delete. You can change dots to triangles or whatever with right-click on the study, then Edit Study. Also, I found that it makes viewing easier if on the Edit Study panel I clcik Draw As and choose the third one in the dropdown (looks like a battleship to me). If you do that you get this nice overlap of color that seems to signal start or end of a trend. As we discussed, this code works for Daily or higher. If you run for Daily, it's showing ImpVol for the past week; if you run on a Weekly chart, it's showing you ImpVol for the past 5 weeks (so we could code an Input to change the period from the charting screen if you want).
Dot colors: Blue is Open, Dark_Green is High, Red is Low, Black is close.
 
Code
declare lower;

def myimpVol = reference impvolatility();
plot myopenVL = myimpVol[5];
plot mycloseVL = myimpVol;
plot myhighVL = Highest(myimpVol, 5);
plot mylowVL = Lowest(myimpVol, 5);
myopenVL.SetDefaultColor(Color.BLUE);
myopenVL.SetStyle(Curve.POINTS);
myopenVL.SetLineWeight(5);
mycloseVL.SetDefaultColor(Color.BLACK);
mycloseVL.SetStyle(Curve.POINTS);
mycloseVL.SetLineWeight(5);
myhighVL.SetDefaultColor(Color.DARK_GREEN);
myhighVL.SetStyle(Curve.POINTS);
myhighVL.SetLineWeight(5);
mylowVL.SetDefaultColor(Color.RED);
mylowVL.SetStyle(Curve.POINTS);
mylowVL.SetLineWeight(5);
AddCloud(myhighVL,mylowVL, Color.dark_red, Color.blue);
EDIT~~ Hm, I don't understand this but once in awhile the Open plots lower than the Low. No biggie, it's usually correct.


Last edited by tangerine; January 11th, 2016 at 07:08 PM.
Reply With Quote
 
  #7 (permalink)
Trading Apprentice
albuquerque nm/usa
 
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: forex
 
Posts: 29 since Aug 2015
Thanks: 3 given, 8 received

Here's a screenshot
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
Edit~~ This image crams the points together but they're clearly visible if you zoom in a little.


Last edited by tangerine; January 11th, 2016 at 07:09 PM.
Reply With Quote
 
  #8 (permalink)
Trading Apprentice
albuquerque nm/usa
 
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: forex
 
Posts: 29 since Aug 2015
Thanks: 3 given, 8 received

Mibobwa, instead of adding the battleship thing, just add an extra line of cloud code:
AddCloud(myopenVL,mycloseVL, Color.lime, Color.yellow);
The effect is stunning and informative- thanks for the idea of this code!
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Last edited by tangerine; January 12th, 2016 at 02:05 AM. Reason: ADDED CHART
Reply With Quote
The following user says Thank You to tangerine for this post:
 
  #9 (permalink)
Trading Apprentice
Israel
 
Futures Experience: None
Platform: Metatrader
Favorite Futures: Forex
 
Posts: 8 since Mar 2015
Thanks: 3 given, 2 received

Thanks tangerine, you did a great work
and my last question, is it possible to display the same info in this oscillator as Japanese candles?

Reply With Quote
 
  #10 (permalink)
Trading Apprentice
albuquerque nm/usa
 
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: forex
 
Posts: 29 since Aug 2015
Thanks: 3 given, 8 received



Mibobwa View Post
Thanks tangerine, you did a great work
and my last question, is it possible to display the same info in this oscillator as Japanese candles?

As far as I know, Mibobwa, at present there's no way to plot candles on a lower study. But I did just try something interesting- I removed "declare lower;" to make this into an overlay on price (then right-click on the study and Use Left Axis, and then from the chart screen I went in and unchecked all 4 plots to get rid of the confusing dots. Makes it easier to compare the clouds to price.

Reply With Quote
The following user says Thank You to tangerine for this post:

Reply



futures io > > > > > Implied volatility oscillator with candles?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
How is historical implied volatility calculated? DarkPoolTrading Options on Futures 23 September 30th, 2017 06:58 PM
Implied Volatility dynoweb Stocks and ETFs Trading 1 November 22nd, 2014 08:40 PM
Implied Volatility Settings Adjustment AlexanderKors ThinkOrSwim Programming 2 October 25th, 2013 05:47 AM
How to add MA to Implied Volatility Indicator? TonyB ThinkOrSwim Programming 1 May 5th, 2013 05:44 PM
Options Implied volatility historical data dimkdimk Traders Hideout 7 October 13th, 2010 08:38 AM


All times are GMT -4. The time now is 09:29 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-14 in 0.15 seconds with 19 queries on phoenix via your IP 54.82.56.95