Quantcast
Channel: Thinkscript – Read the Prospectus
Viewing all 24 articles
Browse latest View live

Volatility-Based Trailing Stop Strategies for Think or Swim

$
0
0

Here is my Volatility-Based Trailing Stop indicator implemented as strategies. These are only exit strategies at the moment, so if you use long and short entry strategies of your choice, these will stop you out if the corresponding trailing stop is breached.

These files are free. Download “VolatilityTS_Strategies.zip” from “Released Thinkscript Strategies” on my Google site.



CumTick Study Updated

$
0
0

The latest update broke the ability to hide clouds automatically. So I fixed it in the CumTickv2 study. The version on my Google site is the most recent one. Go download again if you want it.


Buried

$
0
0

I’ve been buried with end of the year work. If you’ve emailed me lately or if you are waiting on something, I’ll get to it. Just bear with me…


Urgent: Think or Swim Database Maintenance

$
0
0

Think or Swim tells me that they will be doing database management this weekend (1/22/11-1/23/11). Because of that, it is advisable to back up your thinkscripts locally on your computer. Just highlight them all in the list and click export and save them to some folder on your computer. Everything should be fine, but they recommend this action just to be safe.


Status Update: Getting Email Alerts from a Thinkscript through DDE

$
0
0

I’ve got an Excel sheet working that will send you an email upon a cell value changing. Right now it requires a Gmail account. I’ll try to generalize it as much as I can. I plan on releasing it as a free tool when it’s done. Then you can use it in your own DDE spreadsheets. I will also incorporate it into the CAT tool for donors. And I will also update the ability to stream custom columns from TOS through DDE in all my tools, thanks to reader Allen, and put up a full tutorial to walk you through setting it up. No ETA, could be a couple of weeks.


Excel 2010 and TOS DDE Problems

$
0
0

If you are having trouble with DDE links to Think or Swim with Excel 2010, and your Excel application hangs, then make sure you don’t have the Google Chrome browser running. For some weird reason, the links don’t work if Chrome is open, but if you close it then they start working again.


Think or Swim: The Crossroads

$
0
0

So it’s been over a month since the Think or Swim / TD Ameritrade accounts merging fiasco started. I’ve always been an ardent supporter of Think or Swim since I first started trading with them. There was so much that was great about them! Their developers would release new updates and features almost monthly for ThinkDesktop. Email support was responsive. You could actually reach and converse with the platform developers. From customer education, to seamless integration of stocks and futures, not to mention the mind-blowing complex options transactions that were easy as a click to analyze and trade–and decently discounted commissions to boot. It was the ultimate setup for the advanced-amateur / semi-pro trader. Almost everyone I can think of on my Twitter and StockTwits streams seemed to have accounts with them. Their iOS trading app was the best in existence. I used it every day, and it had come to be my primary platform for the trading I have been doing. The few warts that ToS had would show up on occasional fast market opens, and quotes might be delayed for 5-10 minutes, then it was fixed. Not a big deal for the most part.

Then the account merging disaster. TD was absolutely unprepared for this event, which was obviously pushed through by some management decree rather than technical readiness. (Before I go any further, I want to completely make clear that I hold no hard feelings nor disparaging judgement of the original crew from Think or Swim or the employees that now find themselves, lamentably, to be part of TD. They have been responsive and engaged, and have done the best that they could with the atrocity of the situation that they have been thrust into. Any further criticism is directed directly at TD alone.)

Since the merge, I have faced these maddening problems:

1. iPhone app not working. It stopped accepting orders from me. The app would crash and lose connection to the servers. But all of this was back end stuff; the app still worked great. When TD “updated” it to include multi-tasking, they broke the charts if you had any futures symbols in your lists. It’s now unusable. They took the best mobile trading system in the business and turned it into utter garbage.

2. Account segregation. Futures were (and still are) in a separate account from stocks/options. This was a problem because I managed my futures intraday margin (which is high, but hey, it’s a retail broker) in combination with my swing trades and options positions. Spitting them out was a non-starter for me. So I sat by and waited for the integration that the ToS team was trying to implement, missing the best month in years for futures daytrading.

3. Spotty connections and platform glitches in thinkDesktop. The data stream is intermittent and keeps dropping out. I have to really fight with the platform just to keep working. Lots of restarts.

4. For much of the morning yesterday, TD was just down. No quotes, no positions or orders, nothing. The streams were full of people experiencing these issues. It was a major outage right when things were dicey in the markets and traders needed to hedge and position for the volatility. This is bad enough if the systems were working fine during the uptime, but in light of the other problems its just about the final straw.

The infuriating thing is that the entire system worked fine under ToS. If TD had just bought ToS and operated it as a separate division none of this would have happened. But integration was going to happen, and they pushed it through. And just like that, TD has become the Yahoo of brokers–buying up great companies and capability and slowly killing them off through mismanagement and incompetence. “We’re doing the best we can, be patient” only goes so far. Maybe intentions are enough inside a big company (or the government), but for traders who eat what they kill, they can’t make it by on promises, excuses and hope. In that regard, I’m lucky to have full-time employment. I don’t depend on trading for an income. But I know people that do who have been hit hard by this situation. Were I in their shoes, I’d have been long gone long ago from this mess. But patience was something I could afford to have. As I struggled to get quotes and to close a position Friday morning, I finally accepted to myself that ToS is dead as a viable broker for me, and it’s time for me to move on as a trader. I felt sick looking at my year-to-date commissions. For the amount of money I paid ToS/TD this year, I could have bought a lifetime license to Ninja Trader. Instead, I bought sub-par service at a premium price, along with the aggravation and stress of the system problems. I bought broken software and a back office nightmare.

I used to be happy to say I was a ToS customer and would recommend them to people at every opportunity. I built this blog and a lot of my custom work and development around them. I even held out public optimism that TD would just let ToS keep doing it’s thing back when they bought them out. But so far, that was all misguided. And here I am at the crossroads.

I’m looking for another all-in-one broker to replace Think or Swim as my trading outfit. I’m seriously considering ending my code development and support for the ToS platform. If I can’t find a good stocks/options/futures broker that fits my needs, I may switch to Mirus, Amp or another futures introducing broker with low intraday margins and commissions and support for Ninja Trader. If I have to segregate my accounts, there are cheaper and more capable solutions out there. I have neglected Ninja development in place of ToS work, and it’s becoming clear going forward that this is a mistake.

Anyway, that’s where I’m at. Just sad and disgusted that our incredible top-tier outfit has been rendered impotent and will languish until its demise. So far, MB Trading is looking like a good bet for a replacement. They even have an SDK for developers to work with their accounts. A lot of potential there. If anyone has experience using MB as a broker, please leave a comment and give me your opinion of their brokerage service.

I’m not burning down all the bridges with ToS yet. I guess some part of me still holds out some hope for a good outcome. It’s just looking less and less likely to arrive.

Alas poor ToS, I knew thee well.


Thinkscript Chat Room Comes to Think or Swim

$
0
0

Today I got word from Think or Swim of a new resource for Thinkscript users and developers. The ToS folks are listening to the requests of their customers for more Thinkscript support. Within the next two weeks, there will be a new chat room inside of the Think Desktop platform covering the topic of Thinkscript! The idea is to build a ToS sanctioned community where people can share ideas and scripts, or just ask for help. It will be moderated by ToS. They plan to have free chat times, and also have the occasional presenter talk about a certain topic of interest like they do in the other rooms in Think Desktop.

As you may know, I tried to put up a little discussion board, but there wasn’t enough interest. I know that there are sporadic groups of folks on the yahoo boards, or communities at sites like Thinkscripter’s. Hopefully having a centrally located area will gather more people together. I think it will also be a good place to make requests for new features in the Thinkscript language and report any bugs that we see.

I see any attention given to Thinkscript from inside ToS as a big positive, since the management types don’t necessarily see it as a big profit center. The more we as customers show up and support the work of the ToS dev team, the more firepower they have to get resources to bring us more capability.

So look for this in your Think Desktop platform soon!



SMS Text Message Alerts Come to Think or Swim!

$
0
0

The day is finally here! Via ToS, here’s how to get alerts sent as a text message to your mobile phone by SMS:

Last but not least, we have expanded our capacity to deliver notifications such as order fills and alerts directly via text message to your mobile phone. (Prospectus says: Note that iOS users can get push alerts from the Mobile Trader app now as well.)

To activate this functionality, go to the Notifications tab of the “Application Settings” menu.
Click “Set up a Confirmed Number” and follow the instructions on the screen
Once your mobile number has been confirmed, simply check the box to “Send SMS During
US Market Hours” for any notification type that you would like to receive

20121118-123519.jpg

There you go!


DDE to RTD Conversion Status

$
0
0

I’m working on an update to the CAT tool that will use the new RTD components instead of the old broken DDE ones. Stay tuned for more updates on it.


UPDATE: MACD Divergence Indicator for Think or Swim

$
0
0

This has been a long time in coming.  My family life has been in upheaval for a couple years now.  I finally had a bit of time so I wanted to get this done.  Thanks for staying with me.

Many people have asked for a version of the MACD Divergence Indicator that can run in a scan.  The old one I had ran on recursive logic and so wasn’t supported in scans.  This new one uses a different philosophy that runs in real time.  Before I would use my Swing Points and check the value of the MACD against them.  Higher swing highs and lower corresponding values of MACD on those bars would signal a bearish divergence.  Now I am using Linear Regression slopes to compare divergences.  Here’s the theory of how it works:

A linear regression is a way to fit a straight line through some data such that you get the least amount of average distance from the line. If the slope of the linear regression is up, then values are generally trending upward over the set of data you put in. If the slope is negative, then the values trend downward.

So I take a linear regression of price, then get the slope of the LR, and I also take a linear regression of the standard MACD indicator and get that slope. When the price slope is positive and the MACD slope is negative, we have a bearish MACD divergence. If price slope is negative and MACD slope is positive, we have a bullish divergence. If price slope and MACD slope are the same, we have a trend continuation (up/up or down/down). This chart shows this theory in action:

howitworks

 

Here’s what my indicator actually looks like.  The small arrows are short term divergences, the larger arrows are the long term divergences.  The short and long timeframes are inputs, so you can set them at whatever you want.  This chart uses 20 and 50 as the inputs, but you can experiment with what works best for what you are trading:

whatitlookslikenew

As with all divergences, just because it is there doesn’t mean that the trend must reverse. Sometimes divergences can go on for a long time. This information is good to give you a sense that a trend might reverse, and you can plan your own entry and stop accordingly.

Now, to set set up a custom scan, you follow the instructions in these pictures:

scan1

scan2

Then when your scan runs, you will get flagged if the divergence you asked for is currently found.

This indicator is for blog donors only.  You can find it on my google site under Released Thinkscript Studies down in the Donors Only section.


Buried

$
0
0

I’ve been buried with end of the year work. If you’ve emailed me lately or if you are waiting on something, I’ll get to it. Just bear with me…


Urgent: Think or Swim Database Maintenance

$
0
0

Think or Swim tells me that they will be doing database management this weekend (1/22/11-1/23/11). Because of that, it is advisable to back up your thinkscripts locally on your computer. Just highlight them all in the list and click export and save them to some folder on your computer. Everything should be fine, but they recommend this action just to be safe.


Think or Swim: The Crossroads

$
0
0

So it’s been over a month since the Think or Swim / TD Ameritrade accounts merging fiasco started. I’ve always been an ardent supporter of Think or Swim since I first started trading with them. There was so much that was great about them! Their developers would release new updates and features almost monthly for ThinkDesktop. Email support was responsive. You could actually reach and converse with the platform developers. From customer education, to seamless integration of stocks and futures, not to mention the mind-blowing complex options transactions that were easy as a click to analyze and trade–and decently discounted commissions to boot. It was the ultimate setup for the advanced-amateur / semi-pro trader. Almost everyone I can think of on my Twitter and StockTwits streams seemed to have accounts with them. Their iOS trading app was the best in existence. I used it every day, and it had come to be my primary platform for the trading I have been doing. The few warts that ToS had would show up on occasional fast market opens, and quotes might be delayed for 5-10 minutes, then it was fixed. Not a big deal for the most part.

Then the account merging disaster. TD was absolutely unprepared for this event, which was obviously pushed through by some management decree rather than technical readiness. (Before I go any further, I want to completely make clear that I hold no hard feelings nor disparaging judgement of the original crew from Think or Swim or the employees that now find themselves, lamentably, to be part of TD. They have been responsive and engaged, and have done the best that they could with the atrocity of the situation that they have been thrust into. Any further criticism is directed directly at TD alone.)

Since the merge, I have faced these maddening problems:

1. iPhone app not working. It stopped accepting orders from me. The app would crash and lose connection to the servers. But all of this was back end stuff; the app still worked great. When TD “updated” it to include multi-tasking, they broke the charts if you had any futures symbols in your lists. It’s now unusable. They took the best mobile trading system in the business and turned it into utter garbage.

2. Account segregation. Futures were (and still are) in a separate account from stocks/options. This was a problem because I managed my futures intraday margin (which is high, but hey, it’s a retail broker) in combination with my swing trades and options positions. Spitting them out was a non-starter for me. So I sat by and waited for the integration that the ToS team was trying to implement, missing the best month in years for futures daytrading.

3. Spotty connections and platform glitches in thinkDesktop. The data stream is intermittent and keeps dropping out. I have to really fight with the platform just to keep working. Lots of restarts.

4. For much of the morning yesterday, TD was just down. No quotes, no positions or orders, nothing. The streams were full of people experiencing these issues. It was a major outage right when things were dicey in the markets and traders needed to hedge and position for the volatility. This is bad enough if the systems were working fine during the uptime, but in light of the other problems its just about the final straw.

The infuriating thing is that the entire system worked fine under ToS. If TD had just bought ToS and operated it as a separate division none of this would have happened. But integration was going to happen, and they pushed it through. And just like that, TD has become the Yahoo of brokers–buying up great companies and capability and slowly killing them off through mismanagement and incompetence. “We’re doing the best we can, be patient” only goes so far. Maybe intentions are enough inside a big company (or the government), but for traders who eat what they kill, they can’t make it by on promises, excuses and hope. In that regard, I’m lucky to have full-time employment. I don’t depend on trading for an income. But I know people that do who have been hit hard by this situation. Were I in their shoes, I’d have been long gone long ago from this mess. But patience was something I could afford to have. As I struggled to get quotes and to close a position Friday morning, I finally accepted to myself that ToS is dead as a viable broker for me, and it’s time for me to move on as a trader. I felt sick looking at my year-to-date commissions. For the amount of money I paid ToS/TD this year, I could have bought a lifetime license to Ninja Trader. Instead, I bought sub-par service at a premium price, along with the aggravation and stress of the system problems. I bought broken software and a back office nightmare.

I used to be happy to say I was a ToS customer and would recommend them to people at every opportunity. I built this blog and a lot of my custom work and development around them. I even held out public optimism that TD would just let ToS keep doing it’s thing back when they bought them out. But so far, that was all misguided. And here I am at the crossroads.

I’m looking for another all-in-one broker to replace Think or Swim as my trading outfit. I’m seriously considering ending my code development and support for the ToS platform. If I can’t find a good stocks/options/futures broker that fits my needs, I may switch to Mirus, Amp or another futures introducing broker with low intraday margins and commissions and support for Ninja Trader. If I have to segregate my accounts, there are cheaper and more capable solutions out there. I have neglected Ninja development in place of ToS work, and it’s becoming clear going forward that this is a mistake.

Anyway, that’s where I’m at. Just sad and disgusted that our incredible top-tier outfit has been rendered impotent and will languish until its demise. So far, MB Trading is looking like a good bet for a replacement. They even have an SDK for developers to work with their accounts. A lot of potential there. If anyone has experience using MB as a broker, please leave a comment and give me your opinion of their brokerage service.

I’m not burning down all the bridges with ToS yet. I guess some part of me still holds out some hope for a good outcome. It’s just looking less and less likely to arrive.

Alas poor ToS, I knew thee well.


Thinkscript Chat Room Comes to Think or Swim

$
0
0

Today I got word from Think or Swim of a new resource for Thinkscript users and developers. The ToS folks are listening to the requests of their customers for more Thinkscript support. Within the next two weeks, there will be a new chat room inside of the Think Desktop platform covering the topic of Thinkscript! The idea is to build a ToS sanctioned community where people can share ideas and scripts, or just ask for help. It will be moderated by ToS. They plan to have free chat times, and also have the occasional presenter talk about a certain topic of interest like they do in the other rooms in Think Desktop.

As you may know, I tried to put up a little discussion board, but there wasn’t enough interest. I know that there are sporadic groups of folks on the yahoo boards, or communities at sites like Thinkscripter’s. Hopefully having a centrally located area will gather more people together. I think it will also be a good place to make requests for new features in the Thinkscript language and report any bugs that we see.

I see any attention given to Thinkscript from inside ToS as a big positive, since the management types don’t necessarily see it as a big profit center. The more we as customers show up and support the work of the ToS dev team, the more firepower they have to get resources to bring us more capability.

So look for this in your Think Desktop platform soon!



Multi-Divergence Indicator for Think or Swim: MACD, RSI, CCI, On Balance Volume and many more

$
0
0

whatitlookslikenew

I figured out a way to combine all my divergence indicators into one single study. The new Multi-divergence script uses slopes of linear regression lines just like in the new MACD divergence indicator. This script supersedes all the other divergence scripts. The difference is now it can perform a regression on any one study of your choice from a list of ToS indicators. The indicators currently supported for divergence analysis are:

MACD, RSI, CCI, Momentum, Moneyflow, On Balance Volume, Rate of Change, Stochastic Momentum Index, Ultimate Oscillator, Volume Flow Indicator, Volume Oscillator, Volume Rate of Change, Volume-Weighted MACD, Williams Percent-R, and Woodie’s CCI

(Note that it doesn’t scan all of these for divergence at once. Just the one indicator you select. If you want to have RSI and MACD at the same time for example, you put the script on your chart twice and select the appropriate indicator for each one separately.)

If there is another built-in ToS indicator you want to have available for divergence analysis, let me know and I can add it in future updates. You can use the Multi-divergence indicator on real time charts and in scans of watch lists, and I put in alert logic so it can ping you when a divergence occurs.

This indicator is for blog donors only.  You can find it on my google site under Released Thinkscript Studies down in the Donors Only section. If you already donated in the past you can use your password to access it. If you want to become a donor (or throw me some more coin) you can do so by clicking the Donate button:

As always, if you are a DIY’er, feel free to ask questions in the comments and I’ll help answer.


Multi-Divergence Scan for Think or Swim: MACD, RSI, CCI Divergence in Your Stock Scans

$
0
0

In my Multi-Divergence indicator, there is logic used that breaks the study filter when you try to use it in a scan. So I made a new indicator specifically for scanning by limiting it to only use MACD, RSI or CCI. Now it can be used in a watchlist scan, and it’s called “Pro_Divergence_Scan”. It is still a donor-only script, so use your blog donor info to access it in the Released Thinkscript Studies section of the Google site. If you’re not a donor, you can chip in by clicking the Donate button:

Instructions:  Import Pro_Divergence_Scan like any other study, then follow these directions to set up a scan with it.

Go to the scan tab in Think Desktop, and choose “Stock Hacker”.  Then you click “Add Study Filter” (First in screenshot below) then click the pencil to edit the default filter that is added (Second in screenshot):

screen-shot-2016-09-11-at-7-19-25-pm

Delete the default ADXCrossover() if there is one (Third in screenshot) and then click “Thinkscript Editor” (Fourth):

screen-shot-2016-09-11-at-7-19-47-pm

Choose your Aggregation period at the top (D for Daily in this example).  In the editor, type in “Pro_Divergence_Scan()” and then choose “Inspector” from the side panel.  You’ll see the Pro_Divergence_Scan study inputs and the four plots that you can scan for:

    1. BullDivs for Bullish Divergence on short timeframe
    2. BearDivs for Bearish Divergence on short timeframe
    3. BullDivl for Bullish Divergence on long timeframe
    4. BearDivl for Bearish Divergence on long timeframe

 

screen-shot-2016-09-11-at-7-25-30-pm

(As an aside, you can also type the name of any other study you have in your library at this thinkscript editor to get access to it for any filter.)

For the scan to trigger, you want to check for when your chosen plot value is equal to 1, because that’s what I coded the indicator to do.  To do this, add the string “==1” after the plot name, as shown here:

screen-shot-2016-09-11-at-7-25-54-pm

After this, click “Ok” and run your scan.  You may get a pop-up that warns that future changes to the study will not be reflected in this filter.  That just means that if you change the code in the Pro_Divergence_Scan, it won’t be reflected here.  The filter takes a snapshot of the code when you make the filter.  If you update the indicator, just delete the old filter and set it up again as above.


Example RSI Divergence Trade Setup: $TSLA (Tesla Motors Inc.)

$
0
0

All indicators are only a method to repackage complex information in a simple and repeatable way.  I have said before that divergence indicators (like my own Multidivergence Indicator) are not good trade signals by themselves. What they are good for is context.  You will still need some entry criteria of your own to decide when to enter a trade.  You should also have a stop and a target identified before entry, which are basically a plan for if you are wrong and a plan for if you are right.

Here’s a trade I did not take, but I saw developing in real time. It becomes a useful case study for a divergence setup in $TSLA that had a positive outcome.

There was a divergence between the high prices and the RSI indicator for a week or two beforehand. By itself, that doesn’t tell you to sell. Price kept pushing higher even in the face of the divergence. The divergence eventually resolved and went away, and the uptrend continued. But it was telling you that in this context, the trend might be getting tired. You could be looking for a reason to sell. If you try to front-run it, you can get destroyed. Bull markets are built on the smoldering bodies of early bears.

Almost everyone saw that big ugly candle in $TSLA the other day, selling off after threatening to move into all time highs. Using the context of the earlier RSI bearish divergence, this candle was another good piece of information. You have several signs pointing to reversal now. One trade plan could have been to sell a break of the low of that candle, with a stop above the candle high just in case you are wrong. Whatever you do, STICK TO THE ORIGINAL STOP LOSS. Stops only move toward profit, never toward more losses. If you were wrong and price had spiked to new highs in the trend you’d eat the 8 points or so and move to the next trade. In case you were right, maybe you set a target to cover around $255 support, or maybe you sell half and let the rest ride until you see a bullish reversal candle. There’s a lot of great options when you are right! That’s the easy part.  

Here’s what happened:

If you had taken the trade, you had a big follow-through day today on the downside, and you’d be sitting on about 10 points of profit.  One more good day and your target could be hit. 

Remember, indicators only give you information. You as the trader have to decide what to do with it, taking into account your psychology, risk tolerance, account size, and all the other fundamentals. 


Update: Multi-Divergence Indicator v2 for Think or Swim (MACD, RSI, CCI, On Balance Volume and many more)

$
0
0

I’ve made an update to the Multi-Divergence indicator. No more arrows! It’s now a lower histogram that gives you a picture of whether the divergence is increasing or decreasing, and also the size of it relative to all the other divergences on the chart. Here’s an example of it in action for $TSLA (Tesla Inc), along with a plot of Volume Weighted MACD for visualization:

2017-10-20-TOS_CHARTS

The divergences now have a value between 0 and +/- 100. Zero means no divergence is present. A bearish divergence has a negative value while a bullish divergence has a positive value. The scale is determined by the widest divergence, whether bullish or bearish, on the current chart. In this case, the widest divergence came on Sept 15. Everything else is relative to that. If a new divergence comes along that is even larger, then the indicator will scale everything to the new max value.

You can also use this new study as-is in a scan. Just set up a study filter as described below:

Go to the scan tab in Think Desktop, and choose “Stock Hacker”.  Then you click “Add Study Filter” (First in screenshot below) then click the pencil to edit the default filter that is added (Second in screenshot):

screen-shot-2016-09-11-at-7-19-25-pm

Set the aggregation period at the top to whatever timeframe you are interested in. Then edit the default ADXCrossover() seen here under Condition Wizard:

scan1

Here’s an example of how to set the scan input, looking for bullish divergences of 30 or greater on the Volume Weighted MACD with a divergence length of 20:

scan input

You click in the upper left dropdown and choose “study”, then lookup Pro_MultiDivergence_v2 from the dropdown list. Then you can select the divergence (bulldiv or beardiv) from the Plot dropdown. Under inputs you choose the length and divergence indicator you want.

For a bullish scan: Choose “is greater than or equal to” and set the select condition dropdown at top right to “Value”, and enter your scan value as a positive number.

For a bearish scan: Choose “is less than or equal to” and set the select condition dropdown at top right to “Value”, and enter your scan value as a negative number.

This indicator is in the “Donors Only” section of my Google site under Released ThinkScript Studies. You can become a donor to the blog through PayPal here:

ProSwingVWAP: Combining Swing Points with volume-weighted prices to define trends

$
0
0

Hello, it’s been a long time.  Life finds a way to get you off track.  I’m trying to get things here up and running again.

This is something I was working on a long time ago, and I just re-visited it this last week.  I think it’s interesting, so here it is: ProSwingVWAP.

2018-11-18-ProSwingVWAP

A VWAP is a volume-weighted average price.  I talked about VWAPs more here.  The idea for this indicator is to use Swing Points to define the period where we start tracking the volume-weighted value.  The chart above shows it in action.  I like using a VWAP as the price input, so you get a running volume-weighted total of each bar’s VWAP.  Kind of a VWAP squared.  You can use close, high, low, etc. as well.

Once a swing point (white dot) is charted, that swing point becomes the first value for that SwingVWAP.  From there, the price value you choose to average for the VWAP is volume-weighted on each bar and the running VWAP is adjusted.  This is done for swing highs (green dots) and swing lows (red dots) separately.  As long as a new swing high / low hasn’t been made, that long / short VWAP value will just continue to build.  A new swing high or low will reset the VWAP and start again.  I added optional paintbars to show green when a bar close is above the swing high VWAP, red if a bar closes below the swing low VWAP, and grey if it closes between them.  I also hide the VWAP value if bars close beyond them.

Because swing points need to have some future values to know if it really is a swing, there is a delay in this indicator.  The more forward bars you require to decide if a swing is in, the longer it will take for the data structure to be confirmed.  If you set the “FlagEarly” input to yes, then paintbars are yellow during this unknown stage.  The fastest reaction is if you use a value of 1 for Swing Forward, but you get more false positives this way too.  I usually use a value of 1 or 2.  The more bars back you look (Swing Back), you get fewer swings but they are bigger ones.  I mess with this value based on the timeframe and the particular name I’m working with, but I’ll usually use 8 or so.

I’m still in the research phase of this one, so I haven’t decided exactly what to do with it yet.  I like how it defines trends.  A bull trend is present when price is closing above the long SwingVWAP, and a bear trend when price is closing below the short SwingVWAP.  I also like the way it shows when a pullback is on, and when the trend resumes.  On the chart above of $SPY, the period from June to October is a prime example.  The market bottomed out at the end of July and then started an uptrend.  When a new swing high was in, the long SwingVWAP (green dots) told us when we were still in the pullback. Once price closed above the long value again, the trend was back on.  The short SwingVWAP kept trailing along below, reminding us that we were in a bull trend.  Then, as October started, we closed below the short SwingVWAP very dramatically, and the correction was on.  Now we seem to be right back in the middle of the two in a holding pattern.

For now it’s a just a context indicator rather than a trading signal, but it looks like it has some potential.  You can get ProSwingVWAP in the “Donors Only” folder in “Released Thinkscript Studies” at my Google site.  It will work on desktop or mobile, but paintbars only work on the desktop platform.

If you’d like to become a blog donor, hit the button below:

Viewing all 24 articles
Browse latest View live