Think or Swim's 10 and 30 Day Historical Volatility Comparison

Forums ProRealTime English forum ProBuilder support Think or Swim's 10 and 30 Day Historical Volatility Comparison

  • This topic has 8 replies, 3 voices, and was last updated 4 years ago by avatarBard.
Viewing 9 posts - 1 through 9 (of 9 total)
  • #112083

    Hi, I’m in the process of converting a couple of Ameritrade’s “Think or Swim” options platform volatility indicators here for PRC users and just wondered what I’m missing code wise to get this particular indicator to also produce negative results instead of just positive results only. Thanks.

    “This indicator is similar to HVIV and plots the difference between two time periods of Historical Volatility.  For example, we can plot the difference between 10 day and 30 day HV.  When the value is positive, it means the market has been more volatile over the past 10 days than the past 30.  When the value is negative, the market has been calmer than the previous 30 days.  The slope of the indicator also helps you understand how quickly the relationship is changing. Note the significant divergence between the August 2015 and January 2016 sell-off’s.” http://www.thetatrend.com/4-volatility-indicators-for-options-trading-with-thinkorswim-thinkscript-code/

    Here’s the PRC code and chart image:

    Here’s the original code and image:

     

    #112114

    Bard – You double posted topics. I deleted the other one. Please try to be more careful when posting.

    #112141

    I haven’t double posted. If you read the post/look at the images you can see that.

    It was my first post for a different Think or Swim indicator. It just had a similar intro but it’s for a 20 and 60 day Historic Volatility with a 20 Implied Vol line too. Can you please put it back up, thanks.

    #112157

    Can you please put it back up, thanks.

    Not possible I’m afraid. Deleted is deleted.

    Can I suggest that in the future to avoid confusion you do not post two topics at the same time with similar titles (if not identical titles if I recall) and very similar content about virtually identical subjects and with identical introductions!

    If I hadn’t deleted one of them then it would just end up in complete confusion for those trying to answer one or both of the posts anyway. Why not ask one question at a time and then move on to the alternative indicator version as the the topic progresses?

    #112163

    The syntax for the STD instruction is not right. Period is before applied price:

    There is also difference in what should be square rooted, I fixed it. (not tested!)

     

    1 user thanked author for this post.
    #112181

    Phew, good job I didn’t have time to post the other ones! I would have described them all with the same intro because they are all from Ameritrade’s Think or Swim platform but I understand the possible confusion to someone who doesn’t read the title or description of what these distinct indicators do — they have diferent titles and functions giving you different insights and ways to monitor (future) option premium pricing.

    Btw, why put two, (three or four) indicators all into one thread, that sounds more confusing to me and would make them harder to find? I really would prefer to share them as separate posts if it’s ok with you because I think possible different technical questions about the different indicators would result in a confusing and disjointed thread, no?

    #112184

    Cheers, the correct way is actually how I had written it.. until the moment right before I posted it and re-read the original code! Why does the short length period code come before the price code in the PRT version? I mean are we not taking the std of price movements?

    Also it should also give negative values and look like the Think or Swim (white) image’s indicator scale? (Note my unused green zero line – in my PRT black image).

    #112192

    Why does the short length period code come before the price code in the PRT version? I mean are we not taking the std of price movements?

    ?! Why are you asking this question. This is just how the syntax of any instruction is made: keyword[period](appliedprice)

    Because you changed the variables names, the code is all scrambled, anyway I took the time to recoded it from scratch: (now give negative values)

     

     

    #112259

    Because the PRT syntax is illogical in it’s order!
    Right, using “price” and not another expression to describe the log of closing prices…  Thanks Nicolas.

Viewing 9 posts - 1 through 9 (of 9 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login