Tuesday, October 27, 2009

VWAP

Definition


"Volume Weighted Average Price. A measure of the price at which the majority of a given day's trading in a given security took place. Calculated by taking the weighted average of the prices of each trade. The method is used by institutional traders, who often break a given trade into multiple transactions."

Another definition

The VWAP for a stock is calculated by adding the dollars traded for every transaction in that stock ("price" x "number of shares traded") and dividing the total shares traded. A VWAP is computed from the Open of the market to the market Close, AND is calculated by Volume weighting all transactions during this time period.

VWAP, or Volume Weighted Average Price is a tool used by some traders, I first learned of it from Brian Shannon who trades stocks. This won't work for forex since there is no volume.

There are a few different ways of displaying this in Amibroker. It can be a simple line like a moving average, this is the most common way pro's use it. Amibroker has a function to display it behind price, look in the help for these two functions with examples;

  • PlotVAPOverlayA
  • PlotVAPOverlay
Here are a few ways tp lot it and some code to try out.

eTokes Blog post on VWAP
I suggest reading his post, as well as Brian's post on VWAP, links below. eToke used a vertical "study" line drawn on the chart. This might give you an error on your chart if there is no line drawn. Here is his code with a little fix for this problem (adding "Nz");


Plot VWAP starting at a horizontal study line (Study ID set to ST)

//VWAP since last change in sentiment
TurningPoint = IIf(Nz(Study(“ST”,GetChartID())==0,1,0));
BarsSinceLastTurn = 1 + BarsSince(TurningPoint==1);
StartBar = ValueWhen(TurningPoint==1, BarIndex());
RunVolume = Sum(V,BarsSinceLastTurn);
IIf (BarIndex() >= StartBar, MTVWAP = Sum (C * V, BarsSinceLastTurn ) / RunVolume,0);
Plot (MTVWAP,”MTVWAP”,colorPink, styleLine);

Other ways to plot VWAP

Plot VWAP starting at selector line

This is another way, it will display the VWAP starting from where your selector line is placed. I use it for short term trading to see where all the volume is, makes finding support / resistance a bit easier when working with breakout.

_SECTION_BEGIN("Selector Line VAP");
segments = IIf(SelectedValue(BarIndex()) == BarIndex(), 1, 0);
PlotVAPOverlayA( segments , 300, 50, ParamColor("Color", colorDarkGrey ), 6 );
_SECTION_END();

Plotted like a moving average

_SECTION_BEGIN("VWAP");
Bars_so_far_today = 1 + BarsSince( Day() != Ref(Day(), -1));
StartBar = ValueWhen(TimeNum() == 093000, BarIndex());
TodayVolume = Sum(V,Bars_so_far_today);
IIf (BarIndex() >= StartBar, VWAP = Sum (C * V, Bars_so_far_today ) / TodayVolume,0);
Plot (VWAP,"VWAP",colorOrange, styleThick);
_SECTION_END();


Other links on VWAP
VWAP link 1
VWAP link 2

Tuesday, October 20, 2009

Chat Room

Most nights I'm trading EURUSD or HSI (mini Hang Seng). Tonight I'm in the chat room mentioned in an earlier post. Join me if you like. Tonight I'm looking at HSI. IB symbol for Amibroker is MHIV9-HKFE-FUT-HKD

CHATROOM

I was contemplating using twitter as a chat medium but I haven't explored it much or used it. Stocktwits is also a possibility but again I don't know much about it. Any comments on it's use compared to a chat room would be beneficial. Also, are any readers interested in chatting in the evening?

Sunday, October 18, 2009

EURUSD

The last post on EURUSD talked about some basics and a short update as price was playing with the trend line. I am currently long and I plan on holding for the ride.


WEEKLY CHART
From the weekly chart we can clearly see that price has entered an "air" zone, there is no meaningful resistance on the way up to the top of the yellow box.









Daily Chart - Long History
The last time price had to overcome resistance it popped through the orange trend line on the third attempt (yellow circle). Price followed the upward red trend line and is still following it. More on this line later on.... We just broke the blue trend line, and as it happens, on the third attempt just like the prior break. No we are into the yellow free air space.








Daily Chart - Closeup
Price just broke through the blue horizontal trend line, on the third attempt, same as the last horizontal trend line break. The pullback after the breakout above the orange horizontal trend line came to the upwards trend line and the 50% retracement. Note that it did not come back to the orange trend line, indicating a strong upward trend following the red line. Keep this in mind when looking to enter on the recent break.








Intraday
The yellow area is the S/R "zone" from the weekly chart. It looks like we are clear for now. A good area to place a but LMT order would be at 1.4790 to 1.4844 for a low risk opportunity.







What's next?



Breaking the upward red trend line - This would only mean that the rate of increase or rise in price has slowed. Once it breaks through, look for it to come back to it and test it, then fall. No telling when this line will break.


Pullback - look for a pull back to the upward red trend line or the blue horizontal trend line. The best choice might be whichever one of those area also lines up with a fib level and a round number. I might even load up more on a pull back.


Be patient and wait for the pullback. If you need some help with pull backs watch this
Pullback Video.


Do you have a position right now? Are you planning on geting in on this move?

Monday, October 12, 2009

HSI - Mini Hang Seng, and the big brother MHI

I live near Toronto, eastern time zone, I work during the day (not in the finance or trading field). I have free time after dinner and do some short term trading. Forex doesn't do much from 7pm to midnight unless you want to play ranges and scalp. Scalping doesn't work for me. I was looking to trade something that moves a little less choppy, has some liquidity, shows the volume, and can be traded technically. From my research which includes reading forums and blogs I have found the Asian markets are a good place for that. I'm taking trades at night on the mini Hang Seng futures (HSI).

Other contracts I have looked at include the following;


SPI - S&P/ASX 200 Index (Australia)
APZ9-SNFE-FUT-AUD

mini Hang Seng Stock Index
(MHI) MHIV9-HKFE-FUT-HKD

MSCI Taiwan Index @ SGX
TWV09-SGX-FUT-USD

Be sure to adjust the symbol for the correct contract expiry before trading.


Of the above, I have chosen to concentrate on MHI. Here is the chart so far tonight, 1 minute time frame over several days.
As you can see it trends nicely and has the odd gap fill. Trading shuts down for lunch time in Asia and when the come back there can be huge swings in the opening price, so trade small. I typically trade 1 or 2 contracts, depending on the set up. Right now the P/L is up and down, I'm learning the instrument and as long as I stay afloat and break even over the week I'm generally happy for now.

Intraday - HSI


Daily Chart - HSI


UPDATE:

Mr. Addict blogs about his experience with trading this instrument, both discretionary and Auto trading. Very interesting read and to me, his blog shows that he checks his results, indicating a high level of interest in success. This is something I lack (the checking results part) but I'm working on keeping the trade journal up to date. I'm going to use another approach and use AFL to import my IB TWS generated trade log and plot the trades. Then my notes will make sense. Keeping a spreadsheet doesn't appeal to me, it to slow, I prefer scratching notes.

Mr. Addict contributed a very valuable comment for those that trade MHI or HSI and use IB as their broker. Here is his comment, I've inserted the approximate USD equivalent values beside the HKD value so you can easily relate.

Addict said...

Why don't you try the full size contract, i.e., HSI instead of MHI? The bundled commish on MHI is 34 HKD (4.38 USD) per round trip and it's worth 10 HKD (1.29 USD) per tick. So price has to move four ticks in your favor to break even.

With HSI, the commish is 60 HKD (7.74 USD) per round trip, but each tick is worth 50 HKD (6.45 USD). So price only has to move two ticks in your favor to at least break even.

Better yet, go unbundled and you pay only 20.30 HKD (2.61 USD) per round trip for trading HSI, and 13.16 HKD (1.69 USD) for MHI. With unbundled, you need only one tick movement in your favor to break even with HSI, and three ticks with MHI.

EURUSD

UPDATE
Looks like a false breakout to me. It could also be a shakeout but I dont think a shakeout is that easy in forex and given this is a well watched trandl ine, there are too many participants at this level to do that.




Original Post
I was looking at the EURUSD chart today, deciding how to play pair as it nears long term S/R. My son came into the room and asked me what I was doing. I explained the bar chart and told him that we could make lots of money if our prediction was right. I asked what he thought the chart would do, first taking no more than one minute to show him how prices bounces off previous S/R levels, showing him the trend lines and S/R lines I drew. His 30 second view into the future is attached below and I have to tell you, its as valid as any other.

I'm playing this as a breakout for one reason only, this level has acted as resistance four times already and there is upward pressure from a very long trend line. There are three outcomes I see in the next week or so;

1: Breakout and huge move to the upside because of the long term nature of the two trend lines.
2: Breakout and a failure within a few days, price will move back below the 1.4821 area in a classic 2B move and then tank over multiple weeks if not longer.
3: Price will bounce off this area and head lower, below the uptrend line, then we are moving sideways. until a low is broken.

BTW - I have used Tipster Trendlines to place my trades. Check out this AFL for Amibroker for placing error free trades. "Error free" refers to the task of placing the trade, it does NOT refer to a trading system. the AFL also offers a risk management tool.

In short - this is a great place to watch price and place a trade. In other words, don't waste your time trading in between S/R lines on your chosen time frame.

Not sure about the long term, I'm focusing on the weeks ahead. Just for kicks, I'm posting what a 9 year old boy thinks of this market.

Sunday, September 6, 2009

Forex Volume

If you have traded forex for more than a day you will now that there is no volume data since there is no central exchange. There are ways to guess at volume, which by the way will help you even though its an approximation. Since trading isn't an exact science, any data for volume is better than no data. When volume is read on a chart, say for stocks, we look for increasing or decreasing levels, or a spike on a breakout, and not a particular number.... only comparisons.

Forex data can be derived from tick data. I use this right now, the number of price changes from the IB data stream is counted and added until the bar closes, the afl uses the ibc.getrealtimedata function.

You could also use forex futures volume data, Amibroker will let you do this easily, but the market hours aren't the same from what I understand. I've never looked into this, so don't consider this as fact.

I ran across a site where forex futures data is taken from the CME website reports that are posted and available via ftp. The website is call evolution. I read some post at forex factory and it seems the site has been up for a couple of years. There doesn't seem to be a huge following, (which is good if you ask me).

I'll be taking a closer look at the max volume levels for the past week and keep an eye on them. Use this with your support and resistance and we will probably find more clues to where the next bounce will happen.

Take a look and leave a comment here on the site, as well as your thoughts on forex volume.

Disclaimer

The information presented on this site is for educational and entertainment purposes only. This site contains no suggestions or instructions that you must follow, do your own research and due diligence before committing your cash to the markets. Your on your own.