Range Bar Approximation Indicator for Think or Swim

A donor asked if I had some code for Range bars for Think Desktop. Range bars are bars that complete after a certain range has been traveled, and then a new bar starts at the next tick. Unfortunately, ToS doesn’t let us create custom bar types. But that doesn’t stop us from trying to hack together a workaround!

The “solution” I came up with is not a true range bar according to the traditional definition. The simple indicator I made starts with the first bar open. The indicator then checks for if we have moved X points from the open in either the high or low direction. Once we have moved the required amount one way or the other, we plot a new open level. I also keep track of the value of the open of the prior “Range bar”, and if the new “Range bar” open is a downtick, we get a red cloud. Opposite for upticks. This indicator is designed to use the fastest data available, which for now is a 133 tick chart. Here’s what the indicator looked like on ES today with a +/- 1 point range setting:


On my first examination, it seems more useful as a trend direction indicator than a true proxy for range bars. You could sell a pullback into a red zone, or buy a pullback into a green zone, for example. But it’s the best I can do with what we have available in thinkscript right now (as well as with my time schedule X_X).

This one is available to blog donors on my Google site (look for “Range_Bar_IndicatorSTUDY.zip” in the “Donors Only” folder). For the do-it-yourself types, leave a comment if you have questions and want to build your own, or have any other thoughts.

Tags: , ,

34 Responses to “Range Bar Approximation Indicator for Think or Swim”

  1. Subramanik Says:

    a big thank you for getting this ready.

    Could you please let me know why we have parameter 2.0, Does it indicate for last two bar or more if we change the parameter.

  2. Prospectus Says:

    The parameter is the number of points you want to define as beginning a new range level. If you put in 2.0, then the range level will only move up if we get a tick 2 points above the starting level. If that happens, then that level becomes the new range level. Vice-versa for if we dropped 2 points; the original range – 2 points becomes the new range level.

    Hope that helps!

  3. jenks Says:

    hi, i am a donor but did not receive a password

  4. Prospectus Says:

    Did you check the email that is on your paypal account? I sent it again to your address from this comment. Let me know if you don’t get it!

  5. James T. Says:

    i was wondering what range did u have on yours cuz i m not getting the same

  6. Prospectus Says:

    That chart used a 1 point range. You’ll get a slightly different answer depending on if you plot extended hours or not. The indicator starts off with the open of the first bar on the chart, so that can cause diferences, too.

  7. James T. Says:

    thats what i thought too… and then i realized something…
    when i removed all the studies i actually get your result O.O
    wonder if its some kind of bug lol

  8. my2cents Says:

    prospectus, you have a great site here and great readers who enjoy your hard work.

    i am sorry to say that being that this is not a true range bar chart..one shouldn’t have to become a donor in order to use this format that is not even complete.


  9. Prospectus Says:


    I agree. I wouldn’t give myself a nickel for this indicator.

  10. my2cents Says:

    since we are in agreement, then why don’t you just share it with the public!

  11. Prospectus Says:

    My first answer was a smart-ass answer. Do you really want it that bad?

  12. my2cents Says:

    i wouldn’t say it was a smart ass answer, it much confirmed that you did a half ass job but still want to get paid for it!…pretty pathetic i might say! i feel bad for the donor who requested this, cuz they paid you only to received a code for 133 tick chart….a free indicator on TOS!

  13. Prospectus Says:


    Ah, I see. Well, for your information:

    1. This was not a commissioned work. Nobody paid me to specifically do this indicator. No donors were abused in the creation of this half-assery.

    2. A past donor emailed me and asked if I had anything for range bars. I didn’t (as far as I know it is not possible in Think Desktop to develop custom bar types at this time due to the way that data is streamed/stored server side). But I created this indicator for the donor for free, i.e. no additional charge. Half an ass for the price of none. Not a bad value, I’d say! Further, I don’t nickel and dime my past donors. If you donated once, you get it all, past, present and future. I only charge more if it involves a significant amount of my time and the donor wants to hold it proprietary, meaning I can’t share it here.

    3. While it is not a true range bar (and I said so in the original blog post), it is a crude approximation that may be of use to some. One man’s half ass is another man’s full assed glory. I do something many other bloggers don’t seem to: I post some works in progress or random ideas that aren’t fully fleshed out. Half-assed or not matured? In the eyes of the beholder, I guess.

    4. If this was my best work, I wouldn’t donate specifically for it either. I think I have other tools that are better that are worth the donation. However, I always have the invitation open that I will help anyone develop a free version of any of my indicators if they want to. They have only to ask questions and put in their own effort. In my experience, only 2 readers have ever taken me up on it. I am left to conclude one of the following: everyone is lazy, everyone sees value there and doesn’t mind throwing me a couple bucks, it’s completely self-evident and nobody needs any help, or all of my stuff is complete garbage. I admit that any or all of these may be the case.

    5. My time is at an absolute premium. I have a full time professional career (see blog tag line). I have a wife and kids. I have church activities. I spend my very small amount of free time doing trading programming of interest to me and as applicable to my own trading efforts. I also do consulting and commissioned work for others if they want to pay me for my time. It’s not cheap, but my time is valuable to me. Take it or leave it.

    Now, if you are insulted that I would put this offering for donors only because it is so simple, you are free to post your own version of it in the comments, and I’ll leave it up for anyone to access for free. If you just really want my code badly but don’t want to give me any money, you could just ask questions about how you could create your own and I’d happily answer and walk you through any problems you ran into. If you are mad that you can’t have range bars in Think or Swim, email them and tell them you want it and it might make it into a future release. Or if you really don’t care one way or the other about any of it and just wanted to throw some rocks at it, then I guess you have accomplished your purpose. Or maybe I’m a big mouth know-it-all internetz tough guy who doesn’t know what you’re really thinking and presumes a hell of a lot. Again, any or all may be true.

    In my system of morality, if something is of value to you, you pay for it as much as you can–you trade value for value. And if you can’t, you pay it forward. I have gotten a lot of help from others in the past on my trading, and have relied mostly on free tools and the kindness of other traders. And I stand ready to teach anyone that asks for help with Thinkscript (and soon to be Ninjascript). But I refuse to do someone’s work for them. So toss a few bucks in the pot and be honorable and use my work–or follow my tutorials and commentary and do it yourself, and I’ll answer questions and teach and mentor–or you can hit your favorite warez site and get a .zip archive password cracker and grab all my donor stuff from my Google site; it’s all there. Whatever floats your boat.

  14. my2cents Says:

    wow, someone is pissed!…all i wanted to say was the you do have great work…but the last one was not one…and no i need the indicator, and am not going to go thru the trouble to find a crack for the zip file to download the 133 tick chart, TOS provides it to me already!!!!

  15. Prospectus Says:

    I’m not pissed, I’ve just thought a lot about the free-vs-paid content question and had a lot to say. I am starting to feel bad for putting you out to search for a .zip crack though. It’s a neverending dilemma-fest around here for me!

  16. Richard Says:

    Ok, so someone “needs” the indicator, but is unwilling to pay, unwilling to crack it, and at the same time says it’s a half-assed effort that doesn’t give him anything he doesn’t already have. I guess he was also unwilling to pay for whatever medication his “half-assed” doctor prescribed. I hate the internet.

  17. Prospectus Says:

    I thought it was funny. I also had all that “Paid vs. Free” stuff rolling around in my head, so it was the perfect excuse to pontificate.

  18. Randy McDonald Says:

    Made a donation but no password received in my email receipt from paypal?

    Thank You-

  19. Prospectus Says:

    I just sent it to you. I don’t have a fully automated response in place yet. Sorry for the delay!

  20. Ira Says:

    The “Richard” who comment here, is the same Richard from EOT PRO?

  21. Prospectus Says:

    Ira: Yes, the very same!

  22. Ira Says:

    Well, let me tell you that I have also visited their trading room!
    Bill makes good money, for himself. I used to get free invites from them to thursdays trading. (I do not get them any more 🙂 heh)

    The problem i had with their trading room, is that usually (every single time actually) Bill gets into position at a price unknown. and he usually doesnt tell until he is alrady in a position, so its hard to trade exactly with Bill…and therfor its hard making money like Bill.
    so that was my big problem. otherwise, they are great, very recommanded as you already know 🙂
    how you doing there? trading with Bill? etc’ love to hear you opinion.

  23. Prospectus Says:

    If you want to trade exactly like Bill, you have to have the indicators set up and running in your own trading platform, and pretty much make your own decision according to the same rules Bill uses. Even then, there is some discretion involved, as Bill is not entirely systematic, but sometimes passes on a trade based on things he sees. It’s almost impossible to trade “just like” another person, even when sitting right next to them, whether it’s Bill or anyone else. Further, you have to find a trading style that matches your personality, technology, availability and ability. It may be Bill’s style, and it may not. I match Bill’s style in technology and ability, so-so on personality (I hate sitting through retraces, even small ones), and absolutely do not match in availability with my day job.

    All that said, I do personally find the EoT indicators to be very good, especially the volume-based big trader indicators. Further, I’m working on automation for Ninja Trader that will be as close to a “Bill-bot” as you can get, which could help on getting entry prices close to what Bill gets.

    Furthermore, in the trading room, Bill exhibits all the good characteristics of a winning trader–discipline, patience, wisdom, presses winners, cuts losses, etc. Definitely worthwhile for the free room days, and if it matches with your attributes, worthwhile to subscribe and trade vs. the indicators.

  24. Bryan A Rivera Says:

    My Range bars are the real deal, they require no separate data feed, run off of any MT4 Broker, Demo or Live, and interpolate the M1 data so you don’t need to save ticks!!

    My current version is Range Bars V3, if your interested in trading ranges at all this is definitely worth the look, It will pay for itself within the month!

    Check out ebay.com and search for “range bars forex” leave me a note you read this and I will give you a nice discount!

    Happy Trading,
    -Bryan A Rivera

  25. Prospectus Says:


    Do your range bars work inside the Think or Swim platform?

  26. Scott Says:

    Sent in a donation and did not receive a password. Can you please assist? Thanks.

  27. Prospectus Says:

    I sent it to the email on your paypal account. Make sure to check your spam folder.

  28. KumoBob Says:

    I like your range bar indicator, and while I’ve not donated I feel for you.

    I mean you write a study, make it available on your terms, and then get grief about it. Keep up the good work, and don’t let the few unappreciative readers bring you down and waste your time.

    I hope a few words of appreciation can make up for the damage done.


  29. Anton Cesare Says:

    Hello Prospectus!
    Can i use this indicator like usual tick chart? (1tick)
    Can i see volume studies for this chart?

  30. Prospectus Says:

    You can set the bar size to one tick if you want. I haven’t found a way to get volume for anything smaller than the base chart bar though.

  31. jay Says:

    May 24, 2011 is range bar study still available? any updates ? Nothing on ebay for sale under range bars forex ?


  32. Prospectus Says:

    The range bar approximation study is available. Not true range bars, just plots an indicator over the regular bars.

  33. Blog Server Says:


    […]Range Bar Approximation Indicator for Think or Swim « Read the Prospectus[…]…

  34. Barna Hardwick Says:

    Looking to create a Woodies Cci that will SMS me when a particular stock signals >+80 CCI or -80 cci

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: