Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

jperl

Trading with Market Statistics V. Other Entry Points

Recommended Posts

feel free to help out at the Tradestation forum site for this:

 

https://www.tradestation.com/Discussions/Topic.aspx?Topic_ID=66875&SearchTerm=VWAP&txtExactMatch=

 

Sadly I don't have access there any more :( There are some forums that are public still (I think) but that one you need to be logged on for. Perhaps you can keep us informed if there are significant developments (though this might not be the appropriate thread to do it).

Share this post


Link to post
Share on other sites

I am really enjoying how you use market statistics to trade...thank you for sharing the insights into your method. I am new to intraday trading and it is refreshing to see a new twist on plotting distributions (like market profile).

 

I had a more experienced trader tell me one time that you have to find a method that speaks to you. Being mathematically inclined I am really enjoying this way of looking at the market. It is speaking to me "so to speak"

 

Glad you are finding that market statistics speaks to you dbntina. It speaks to me too. I realize for many traders, statistics is a difficult subject, so that is why I am trying to approach this in a slow methodical way, in the hope that those who are not generally familiar with statistical analysis will be able to follow along.

Starting with the next thread on scale-in, stoploss and trade management we will be getting into virgin territory for most new traders.

Share this post


Link to post
Share on other sites

Jerry,

 

Very much looking forward to it...(the next thread).

 

I think I have finished the code for tradestation users to get on an intraday chart the VWAP (same code as posted in the forum under VWAP_H) with the calculation of Standard Deviation from the square root of the variance but bands seem farther out than the one currently posted in the TS forums. I put everything in one indicator to do all plots with 1st and 2nd SD's.

 

Is there any way you can tell me where the VWAP and 1SD and 2SD bands ended today on your 2m chart of either the S&P or NQ. That will let me know if I have it right and then I will post on the forums the code or here...whatever suits everyone.

 

The question I have also is on the Variance formula I don't see it dividing by the result by the total number of price bars since the start but when you gave an example you did divide by the total number of bars. That's how I calculated it but didn't know if that was correct?

 

Thanks a bunch...will get it posted for TS users once I can verify it looks like yours.

 

dbntina

David

Share this post


Link to post
Share on other sites

jerry, since Newbie is using purely mathematical techniques, would you mind sharing the back-tested results for say, what you presented in 'V'? did the back-test optimize to an optimal stop placed above the PVP for a short/below for along? just curious if recent trading lines up with 'theory' of a skewed distribution...

 

also, is there a minimum difference between the PVP and the VWAP before the skew is considered significant enough to 'play'... ie, # of ATRs difference...?

Share this post


Link to post
Share on other sites

also, is there a minimum difference between the PVP and the VWAP before the skew is considered significant enough to 'play'... ie, # of ATRs difference...?

 

 

I find this to be a good question that I wanted to ask as well. I have been observing the markets (mostly the YM) and I find it rare to find a skew at all... seems like prices are always near the VWAP and the PVP runs through it, so there is seldom anything to trade at all, unless I am not using the proper tools. (the vwap I use was programmed by a third party for amibroker)

Share this post


Link to post
Share on other sites

Is there any way you can tell me where the VWAP and 1SD and 2SD bands ended today on your 2m chart of either the S&P or NQ.

 

David,

Here is the end of day VWAP +- SD for today August 2, 2007

 

ES 1474.11 +- 3.64

NQ 1968.52 +-5.77

 

The question I have also is on the Variance formula I don't see it dividing by the result by the total number of price bars since the start but when you gave an example you did divide by the total number of bars. That's how I calculated it but didn't know if that was correct?

 

No, it is not correct. To compute the variance correctly, use the equation I posted in the SD thread post 14545

 

You have to multiply each term in the variance by the probability distribution for the volume because the VWAP is volume weighted. That takes care of the normalization factor. The example I gave, had no weighting factor, so the variance was simply divided by the number of terms in the summation.

Share this post


Link to post
Share on other sites
jerry, since Newbie is using purely mathematical techniques, would you mind sharing the back-tested results for say, what you presented in 'V'? did the back-test optimize to an optimal stop placed above the PVP for a short/below for along? just curious if recent trading lines up with 'theory' of a skewed distribution...

 

There is actually no good way to back test something like this Dogpile, because the distribution function, the volatility and HUP distribution (Hold Up Price, which we haven't discussed yet) is constantly changing from day to day. What you will discover in the next thread, is a new paradigm about stop loss placement and trade management.

 

is there a minimum difference between the PVP and the VWAP before the skew is considered significant enough to 'play'... ie, # of ATRs difference...?

 

Very good question, glad you asked. I'll phrase it differently. How large does the skew have to be to consider taking a trade at the VWAP or SD in the direction of the skew.

The answer is: I was concerned about this for a long time. It turns out, that there is no correlation between the size of the skew (as measured by the Karl Pearson definition of skew which is (VWAP-PVP)/SD ) and the momentum of the trade in the skew direction. What only seems relevant is that a skew exist. Other HUPs will come into play between the entry point and the profit target which will play an important role in the momentum of the trade. We will discuss these in a later thread.

Share this post


Link to post
Share on other sites

Trade Station Users,

Jerry gave good description of SD function and how to calculate it in thread #IV. In the same thread I have posted code for calculating simulated SD, which tracks pretty close with ensign SW and jerry's calculation. Important point is that SD is cumulative calculation with lookback period changing thru the day to always start at the beginning of the session ( basically one has to count bars and change lookback period to include data from the first bar of the day. SD is calculating price distribution around VWAP. What SD calculation is is missing is vi/V factor vi is volume @ price; V is total volume for the session.

Share this post


Link to post
Share on other sites

<<It turns out, that there is no correlation between the size of the skew (as measured by the Karl Pearson definition of skew which is (VWAP-PVP)/SD ) and the momentum of the trade in the skew direction. What only seems relevant is that a skew exist. >>

 

thx. the problem is that if not much skew, then the stop point (PVP) will be very close to the VWAP price -- where you might be entering.

 

for example, market trades down and then retraces back up to the -1 SD level, you enter short with stop just above PVP. market trades to VWAP and overshoots a bit on noise. here is where a tight PVP might be a problem... I guess such is life.

Share this post


Link to post
Share on other sites
I find this to be a good question that I wanted to ask as well. I have been observing the markets (mostly the YM) and I find it rare to find a skew at all... seems like prices are always near the VWAP and the PVP runs through it, so there is seldom anything to trade at all, unless I am not using the proper tools. (the vwap I use was programmed by a third party for amibroker)

 

Unleashed, perhaps you can post a chart of what you see and I can take a look

Share this post


Link to post
Share on other sites

What you will discover in the next thread, is a new paradigm about stop loss placement and trade management.

 

Other HUPs will come into play between the entry point and the profit target which will play an important role in the momentum of the trade. We will discuss these in a later thread.

 

 

Really looking forward to these missing pieces of the puzzle. (and getting hold of/writing some indicators so I can follow along properly).

Share this post


Link to post
Share on other sites

Okay...I thank I got it...just need to figure out where/how to post the code in here.

 

Thanks for your help Jerry. I was able to match your numbers yesterday on ES and NQ within a tick or two so I will consider it matched.

 

Any TS coders take a look and see if it looks correct please.

 

Thanks everyone...looking forward to learning more Jerry,

 

dbntina

 

;)

Share this post


Link to post
Share on other sites

nice job dbntina -- that looks visually right -- I am not an advanced EasyLanguage guy but the bands look great.

 

would you know how to code 'PVP' to update dynamically? it is the same number that appears in the matrix window under 'Vol Bars'... would just like to place that into a 'chart analysis' window as a histogram indicator on the left side of the chart (Y axis).

Share this post


Link to post
Share on other sites

Thanks Dogpile...I am pretty confident in the formula because it is exactly the same as jperl posted. The only thing I was mainly concerned with is if the count was off by 1 bar for looping and summing the terms. It looks correct though when I look at the chart because the bands move on the 2nd intraday bar, not the 1st or 3rd so it seems to be working correctly and it matches jperls numbers (within a tick or two).

 

After looking at past intraday data it is scary how well the bands are acting as support and resistance.

 

Anyway...I am disappointed in TS and the market profile thing. Esignal has an add on for $10 a month or something like that and TS has nothing. The probability map stinks in my opinion and I actually was using marketprofileplus for a while and ghkramer has a decent one that I can't get to work on my machine (and believe me I am thankful for guys like ant and ghkramer) but TS is dropping the ball big time on this and I like TS.....

 

So the bottom line is I will probably have to write market profile code myself because I do want to know the PVP/POC (if they are exactly the same...they probably are a little different if you are using a smaller tf than 30M??) and VAH and VAL from previous days and the developing numbers as they do act as HUP's just like pivot points and such good to be aware of.

 

Anyway writing that code should make it easier to write the code for volume distribution as well. The problem I am going to have is figuring out exactly the formulas for calculating all the stuff...once I get that then I should be able to crank it out...we'll see I am kind of dreading it actually.

 

So the short answer dogpile is I don't have code for that....anyone else...of course if I create it I will post it for free.

 

Sorry this went a little of topic...ranting a little bit

 

dbntina

Share this post


Link to post
Share on other sites
Unleashed, perhaps you can post a chart of what you see and I can take a look

 

Okay, this is my YM chart taken @ 12:29pm, as you can see the VWAP is +17 above my PVP, and I would have considered going long at 13444, it is currently 12:54 and prices are hovering around there, fell through a bit to 13430s. I am wondering if going long here would have been a good idea. (I did not, only simulating)

 

attachment.php?attachmentid=2210&stc=1&d=1186159927

Share this post


Link to post
Share on other sites

Just an update. That trade would have been good for about +15 if you entered right at the VWAP, but if you held longer would have been stopped out depending on how tight you had it...

 

Market seems pretty flat, whipsawing the VWAP and bouncing off the PVP since lunch hour.

 

 

attachment.php?attachmentid=2211&stc=1&d=1186163593

vwap2.thumb.png.6abc751fd86856c3bdcea44177970c6a.png

Share this post


Link to post
Share on other sites

finally with patience a good move to the upside was there if your stops were wide enough...

 

If it wasn't obvious enough the VWAP is the yellow moving average line, and the red line mixed into it is the 89 EMA, solid horizontal line is the PVP.

 

Move was good for about +50 YM points if you had good nerves :).

 

attachment.php?attachmentid=2212&stc=1&d=1186164448

 

edit - DAMN, after this 'trade', at that 13500 level, the YM dropped 100 points in less than half an hour...

vwap3.png.f47860ef45beb4932e6d0e3c127a48fb.png

Share this post


Link to post
Share on other sites
Okay...I thank I got it...just need to figure out where/how to post the code in here.

 

Thanks for your help Jerry. I was able to match your numbers yesterday on ES and NQ within a tick or two so I will consider it matched.

 

Any TS coders take a look and see if it looks correct please.

 

Thanks everyone...looking forward to learning more Jerry,

 

dbntina

 

;)

 

You could either cut and paste the test into a message. Or use the 'manage attachments button' down below the message posting box.

 

Cheers.

Share this post


Link to post
Share on other sites

Blowfish,

 

The code is posted in the indicators section.

 

Nick had a good question about using the normalized volume to multiply with in the variance formula.

 

The indicator is doing that in the calculation. It is taking the volume of the current bar and dividing it by the total volume since the start and using that to multiply the square of the difference between price and the VWAP (and then summing all the terms of course)

 

I am pretty sure that's what we were trying to accomplish.

 

Take a look and see if the code looks correct...if not we want to catch it now. I think that is what Jerry was getting at when calculating it (that was causing the calculation to be a nightmare).

 

Cheers,

 

dbntina

Share this post


Link to post
Share on other sites
finally with patience a good move to the upside was there if your stops were wide enough...

 

Ok, for your reference unleashed, I took a look at YM at 12.28 EST. My values for VWAP and PVP are as follows:

 

VWAP= 13445

PVP = 13433 for a difference of 12 ticks.

 

And yes you could have taken the trade at 13445 and exited at the 1st SD which was 13472 at 13:54 EST for a profit of 27 ticks or held on until the 2nd SD at 13500 14:02 EST for a profit of 55 ticks.

 

HOWEVER---if you set a stoploss at the PVP you would have been stopped out earlier with a loss on the trade. This is a good example of why hard stoplosses will slowly bleed you to death. In the next thread we will discuss an alternate paradigm called risk tolerance to replace hard stop losses

Share this post


Link to post
Share on other sites

Great point Jerry. I was looking at the same thing on my chart with the bands and saw the spike just below the PVP to stop you out...before moving towards the bands....very interested in seeing the risk tolerance ideas...etc.

 

dbntina

Share this post


Link to post
Share on other sites

This is a good example of why hard stoplosses will slowly bleed you to death. In the next thread we will discuss an alternate paradigm called risk tolerance to replace hard stop losses

 

Fixed stops (and targets for that matter) are quick and dirty but take no account of changing volatility. I kind of favour using market structure (previous swing high/lows) but of course absolutely everyone know stops are located there and so they are frequently run. Then of course you can place the stop 'a few' ticks outside but that is kind of arbitrary too.

 

Dbtina thanks I'll take a look. I have concidered the PoC stuff and whilst not hard it will be a bit 'tricky' volume at each level will need accumulating in an array. I can't help feel there should be a code fragment somwhere to do this.

 

Cheers.

Share this post


Link to post
Share on other sites

Blowfish,

 

Yes I am thinking about writing some simple code for the PVP and POC intraday and maybe including that in the VWAP, SD bands code so that it will all be in one place.

 

The challenge is going to be when JPERL starts looking at the weeks PVP/POC with the weeks VWAP and SD bands and using that as a framework in framing the days statistics and taking trades that way.

 

Because I will have to figure out how to do that in code for TS as well...man this coding stuff gets tiring after a while.

 

I don't know for sure but I have a feeling JPERL is heading that direction.

 

Also the POC is simply where the most 30M TPO's occur horizontally correct...this is not the same where the most volume traded at price correct? (PVP) Just want to make sure I have it correct before trying to code it.

 

Cheers,

 

dbntina

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Topics

  • Posts

    • Date: 29th March 2024. GBPUSD Analysis: The Pound Trades Higher But For How Long? The global Stocks Markets are closed due to Easter Friday (Good Friday). The NASDAQ continued to follow the sideways trend while other indices again rose. The SNP500 reaches an all-time high, but the NASDAQ remains under pressure from Tesla, Meta and Apple. The Euro continues to trade lower against all major currencies including the US Dollar, Euro and Japanese Yen. The British Pound is the best performing currency during this morning’s Asian session. However, investors are largely fixing their attention on this afternoon’s Core PCE Price Index. GBPUSD – The Pound Trades Higher but For How Long? The GBPUSD is slightly higher than the day’s open and is primary due to the Pound’s strong performance. At the moment, the British Pound is increasing in value against all major currencies. However, the US Dollar Index is also trading 0.10% higher and for this reason there is a slight conflict here. If investors wish to avoid this conflict, the EURUSD is a better option. This is because, the Euro depreciating against the whole currency market avoiding the “tug-of-war” scenario. The GBPUSD is trading slightly lower than the 2-month’s average price and is trading at 49.10 on the RSI. For this reason, the price of the exchange is at a “neutral” level and is signalling neither a buy nor a sell. The day’s price action and future signals are possibly likely to be triggered by this afternoon’s Core PCE Price Index. Analysts expect the Core PCE Price Index to read 0.3% which is slightly lower than the previous month but will result in the annual figure remaining at 2.85%. The PCE rate is different to the inflation rate and the Fed aims for a rate between 1.5% to 2.00%. Therefore, even if the annual rate remains at 2.85%, as analysts expect, it would be too high for the Fed. If the rate increases, even if only slightly, the US Dollar can again renew bullish momentum and the stock market can come under pressure. This includes the SNP500. Investors are focused on the publication of data on the UK’s gross domestic product (GDP) for the last quarter of 2023: the quarterly figures decreased by 0.3%, and 0.2% over the past 12-months. This confirms the state of a shallow recession and the need for stimulation. The data, combined with a cooling labor market and a steady decline in inflation, increase the likelihood that the Bank of England will soon begin interest rate cuts. In the latest meeting the Bank of England representatives did not see any members vote for a hike. USA500 – The SNP500 Rises to New Highs, But Cannot Hold Onto Gains! The price of the SNP500 rises to an all-time high, before correcting 0.33% and ending the day slightly lower than the open price. Nonetheless, the index performs better than the NASDAQ which came under pressure from Tesla, Meta and Apple which hold a higher weight compared to the SNP500. For the SNP500, these 3 stocks hold a weight of 9.25%, whereas the 3 stocks make up 14.63% of the NASDAQ. The SNP500 is also supported by ExxonMobil’s gains due to higher energy prices. The market will remain closed on Friday due to Easter. However, the market will reopen on Monday for the US and investors can expect high volatility. Investors will also need to take into consideration how the PCE Price Index and the changed value of the US Dollar is likely to affect the stock market next week. Always trade with strict risk management. Your capital is the single most important aspect of your trading business. Please note that times displayed based on local time zone and are from time of writing this report. Click HERE to access the full HFM Economic calendar. Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding on how markets work. Click HERE to register for FREE! Click HERE to READ more Market news. Michalis Efthymiou Market Analyst HFMarkets Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in FX and CFDs products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • MT4 is good and will be good until their parent company keep updating the software, later mt4 users will have to switch to mt5.
    • $SOUN SoundHound AI stock at 5.91 support area , see https://stockconsultant.com/?SOUN
    • $ELEV Elevation Oncology stock bull flag breakout watch , see https://stockconsultant.com/?ELEV
    • $AVDX AvidXchange stock narrow range breakout watch above 13.32 , see https://stockconsultant.com/?AVDX
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.