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

    • TDUP ThredUp stock, watch for a top of range breakout above 2.94 at https://stockconsultant.com/?TDUP
    • NFLX Netflix stock watch, local support and resistance areas at 838.12 and 880.5 at https://stockconsultant.com/?NFLX
    • Date: 8th April 2025.   Markets Rebound Cautiously as US-China Tariff Tensions Deepen     Global markets staged a tentative recovery on Tuesday following a wave of volatility sparked by escalating trade tensions between the United States and China. The Asia-Pacific region showed signs of stability after a chaotic start to the week—though some pockets remained under pressure. Taiwan’s Taiex dropped 4.4%, dragged lower by losses in tech heavyweight TSMC. The world’s largest chipmaker fell another 4% on Tuesday and has now slumped 13.5% since April 2, when US President Donald Trump first unveiled what he called ‘Liberation Day’ tariffs.   However, broader sentiment across the region turned more positive, with several markets rebounding sharply after Monday’s dramatic sell-offs. Japan’s Nikkei 225 surged over 6% in early trading, rebounding from an 18-month low. South Korea’s Kospi rose marginally, and Australia’s ASX 200 gained 1.9%, driven by strength in mining stocks. Hong Kong’s Hang Seng rose 1.6%, though still far from recovering from Monday’s 13.2% crash—its worst day since the 1997 Asian financial crisis. China’s Shanghai Composite added 0.9%.   In Europe, DAX and FTSE 100 are up more than 1% in opening trade. EU Commission President von der Leyen repeated yesterday that the EU had offered reciprocal zero tariffs on manufactured goods previously and continues to stand by that offer. Others are also trying again to talk to Trump to get some sort of agreement that limits the impact.   Much of the rally appeared to be driven by dip-buying, as well as hopes that the intensifying trade war could still be defused through negotiations.   China Strikes Back: ‘We Will Fight to the End’   Tensions reached a boiling point after Trump threatened to impose an additional 50% tariff on all Chinese imports unless Beijing rolled back its retaliatory measures by April 8. ‘If China does not withdraw its 34% increase above their already long-term trading abuses by tomorrow... the United States will impose additional tariffs on China of 50%,’ Trump declared on social media.   If implemented, the new tariffs would bring total US duties on Chinese goods to a staggering 124%, factoring in the existing 20%, the 34% recently announced, and the proposed 50%.   In response, China’s Ministry of Commerce issued a stern warning, stating: ‘The US threat to escalate tariffs is a mistake on top of a mistake... If the US insists on its own way, China will fight to the end.’ The ministry also called for equal and respectful dialogue, though signs of compromise on either side remain scarce.   Beijing acted quickly to contain a market fallout. State funds intervened to support equities, and the People’s Bank of China set the yuan fixing at its weakest level since September 2023 to boost export competitiveness. Additionally, five-year interest rate swaps in China fell to their lowest levels since 2020, indicating potential for further monetary easing.   Trump Talks Tough on EU Too   Trump’s hardline approach extended beyond China. Speaking at a press conference, he rejected the European Union’s offer to eliminate tariffs on cars and industrial goods, accusing the bloc of ‘being very bad to us.’ He insisted that Europe would need to source its energy from the US, claiming the US could ‘knock off $350 billion in one week.’   The EU, meanwhile, backed away from a proposed 50% retaliatory tariff on American whiskey, opting instead for 25% duties on selected US goods in response to Trump’s steel and aluminium tariffs.     Volatile Wall Street Adds to the Drama   Wall Street experienced wild swings on Monday as investors processed the rapidly evolving trade conflict. The S&P 500 briefly fell 4.7% before rebounding 3.4%, nearly erasing its losses in what could have been its biggest one-day jump in years—if it had held. The Dow Jones Industrial Average sank by as much as 1,700 points early in the day but later climbed nearly 900 points before closing 349 points lower, down 0.9%. The Nasdaq ended up 0.1%.   The brief rally was fueled by a false rumour that Trump was considering a 90-day pause on tariffs—rumours that the White House quickly labelled ‘fake news.’ The market's sharp reaction underscored how desperate investors are for any sign that tensions might ease.   Oil Markets in Focus: Goldman Sachs Revises Forecasts   Crude prices also reflected the uncertainty, with US crude briefly dipping below $60 per barrel for the first time since 2021. As of early Tuesday, Brent crude was trading at $64.72, while WTI hovered around $61.26.   Goldman Sachs, in a note dated April 7, lowered its average price forecasts for Brent and WTI through 2025 and 2026, citing mounting recession risks and the potential for higher-than-expected supply from OPEC+.       Under a base-case scenario where the US avoids a recession and tariffs are reduced significantly before the April 9 implementation date, Goldman sees Brent at $62 per barrel and WTI at $58 by December 2025. These figures fall further to $55 and $51, respectively, by the end of 2026. This outlook also assumes moderate output increases from eight OPEC+ countries, with incremental boosts of 130,000–140,000 barrels per day in June and July.   However, should the US slip into a typical recession and OPEC production aligns with the bank’s baseline assumptions, Brent could retreat to $58 by the end of this year and to $50 by December 2026.   In a more bearish scenario involving a global GDP slowdown and no change to OPEC+ output levels, Brent prices might fall to $54 by year-end and $45 by late 2026. The most extreme projection—based on a simultaneous economic downturn and a full reversal of OPEC+ production cuts—would see Brent plunge to below $40 per barrel by the end of 2026.   Goldman noted that oil prices could outperform forecasts significantly if there was a dramatic shift in tariff policy and a surprise in global demand recovery.   Cautious Optimism, But Warnings Persist   With both Washington and Beijing showing no signs of backing down, markets are likely to remain volatile in the days ahead. Investors now turn their attention to upcoming trade meetings and policy decisions, hoping for clarity in what has become one of the most unpredictable trading environments in recent years.   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 of how markets work. Click HERE to register for FREE!   Click HERE to READ more Market news.   Andria Pichidi 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 Leveraged 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.
    • CVNA Carvana stock watch, rebound to 166.56 support area at https://stockconsultant.com/?CVNA
    • CVNA Carvana stock watch, rebound to 166.56 support area at https://stockconsultant.com/?CVNA
×
×
  • Create New...

Important Information

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