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.

BlowFish

Market Wizard
  • Content Count

    3308
  • Joined

  • Last visited

Everything posted by BlowFish

  1. HI NAVEEVIa, I tried your code and it looks fine (as far as I can tell). It does suffer from being pretty processor intensive though. Cheers.
  2. From just a cursory look seems Ok to me....I'll try plotting it in a bit. Cheers
  3. I think its ZeroLine trader Darth. Ive heard lots of good things about it. I use Bracket Trader which works well for me. Don't have the energy to try a new setup just now.
  4. OK glad I finally put it clearly! On the plus side this has given me a far deeper knowledge of the tools. Personally I always like to have that. I think is all to do with 'constructing your reality'. Kind of building your beliefs from ground zero. I do wonder if that is why people don't have confidence in there tools - they don't spend enough time getting to really understand what they do and how they do it. Ironically when you have done all that leg work its probably best forgoten when you actually trade!! I also wonder if I allowed myself to get sidetracked by the subconscious demons trying to delay the final test (trading with real money). I have spent a good portion of the last week pursuing about half a dozen versions of this indicator. Actually I think I should post them but still could do with writing a decent histogram module. I can see that taking a while to get right. Cheers.
  5. Hi Nick, The concern is that the value used for total volume in all the algorithms is not the total volume for the whole series it is the volume for the series up to the bar you are processing. As an example Lets say you are processing bar 100. Total Volume is now the old Total Volume + Volume(100) you now need to re process bars 1-99 with the new total volume!! As there is more volume in the whole 'universe' Bars 1-99 need re-weighting taking into accounting for this volume. Lets use the annotation Volume(1 to 100) for the total volume for bars 1 to 100 WeightedPrice(n) = price * volume(n) / volume(1 to 100) NOT WeightedPrice(n) = price * volume(n) / volume(1 to n) Put another way the weights on all the previous bars change when the total volume changes (i.e. there is new tick). Of course you don't re-plot old bars but the weighting they contribute changes so you do need to re-calculate the series. (well strictly speaking you do). Obviously this is computationally intensive and my hunch is most software doesn't bother. TS dosent. Actually I wonder if institutions that lean heavily on VWAP do? Thats a spooky thought... the 'inaccurate' line seems to be heavily leaned upon. Cheers, Nick. P.S. the usual caveats apply - its not the line you trade its how you trade it. Yes its all a bit anal but there is a difference etc. etc.
  6. Hi Jerry, I have a couple of questions about trade management but wanted to give them a bit more thought. Seeing as Maildigger mentioned stops I thought I'd chip in anyway. I'll think as I go along Back in the newbie days when things where nice and simple the way I understood it was you would enter at the VWAP with a stop at the PVP? (or was it a couple of ticks the other side perhaps?). You then introduced us to SD's With options of taking a trade there. At this time the stop would still be the PVP with the option of adding to your position at the VWAP. In fact a Whole section was devoted to risk tolerance. Again if I understand this correctly we decide what the maximum amount is we are ever to risk (based on account size) and then use market statistics (VWAP,SD) to enter and the PVP for a stop? All well and good to this point however when you introduced breakout trades and counter trend trades I think a couple of different styles of trade management where also introduced. With BO's you would move the stop to BE as soon as possible? As an aside because BO's break and go you would consider entering these aggresively without waiting for the Shapiro effect? Also the way I understand it you would only do this at a BO of the SD band. A BO through the VWAP would be managed normally? With countertrend trades (symmetric distribution) you offer a couple of choices for stops - add 1 at the SD2 for a return to SD. -or- Stop and reverse if your trade moves against you for a journey to SD2 (I guess you are switching from counter trend to BO)? Does this sound correct? Things are certainly a bit more complex than when newbie started out! One other thing you mentioned briefly (can't remember where) I seem to recall you mentioning those with low risk tolerance could put the stop behind the Shapiro bar? Maybe I dreamt that. I also recall you saying you where 'conservative'. I wonder how you reconcile that with wide action points (I hesitate to use the word stops) particularly those introduced for 'newbie'? Especially in light of the paragraph that follows :- Another thing about the Shapiro effect - if the tigger bar (the bar that touches the band) is of a wide range, we can end up giving away a lot of potential profit and adding to our risk (as your stop must be further). For example for a short at the VWAP if the bar comes from halfway between the SD1 & VWAP we give up half the potential profit and our stop is correspondingly further away while we wait for the low of this bar to be broken. Do you pass those trades or maybe not use Shapiro, or maybe drop down a timeframe for a more precise entry? Cheers, Nick. P.S. great scalping video (closet scalper here).
  7. Just a quick tangential question - Have you ever researched 'rolling' distributions for scalping? (I plan to try this at some stage). By rolling I mean using a fixed N period for your indicators. So for example you could use just the last hours data. When a new 2 min bar paints you drop the oldest bar and factor in the newest. Cheers,
  8. Love all your basic price pattern threads then you go and spoil it by using CCI for a trigger! (Only joking). Seriously I wonder if you still look at other triggers? Its clearly something you are pretty comfy with. Still like to see you converted to a no squigly lines man The simple patterns (like flips W's etc) are a very 'pure' basis for trading imo. Not only that they appear to have stood the test of time well. I guess the methods are based on fundamental market action. Its refreshing to see them explored so thoroughly. Cheers
  9. Hi Nick, posted a long reply yesterday and then couldn't submit it ! I thought I saved the txt file but can't find it. I think all the tradestation calculations for VWAP may be wrong. TS native, mine, Dbntina, and the code you submitted. In your code line 3 does not sum total volume it sums volume up to bar N. Whenever a new bar comes in (with added volume) every single preceding bar needs re-calculating with the new total volume for the series. You need to do something like for n = 1 to totalnumber of bars VolumeTotal= VolumTotal + Volume(n) then you run the weighting. for n = 1 to totalnumber of bars VWAP = close * Volume(n) /VolumeTotal Basically you need to use the volume for the whole series (not just up to bar N) for the weighting. The same issue as with the SD. I'm not sure if I am explaining myself well do you see what I am getting at? If you are calculating the variance with total volume for the whole series should you not do the same for the VWAP itself? Jerry sorry to bug you I wonder if you had any comment on this, a simple yes or no would be cool:cool: Cheers, Nick. P.S. Apologies to all, I know I am being pedantic about this but its become a sort of challenge. having said that its not wrong to strive for 'truth' & 'accuracy'.
  10. Great points PP. Let me just add a couple of things. When you look at bars/candles you are choosing an arbitrary period of time to 'sample' what is happening to price and volume. Sometimes things take longer to happen some time less. Its constant evaluation of the ebb and flow of supply and demand. As an example a wrb down folowed by a wrb up on a 5 minute chart will be a long legged doji (test) on a 10 minute chart. Some VSA bars are somewhat more 'powerful' than others. Some VSA bars have little (or no meaning) unless the context has been set by other bars/patterns. For example a test has to test something. There is often a progression through a series of events. e.g. stopping volume (demand enters) - followed by low volume bars (no supply and often no demand too) - followed by a test (any supply left) - followed by strength appearing on up bars as price rises. You can also look at what should not be happening. e.g. should not be seeing weakness (no demand) on a rising market. There is no shortcut for learning the underlying principles. i.e. just learning a couple of bar patterns will only get you so far. (maybe thats far enough for you). Cheers,
  11. Well I have joined a couple of maths forums..been chilling so haven't got round to asking about calculating variances using non iterative methods. The various methods I have coded are lightening fast (no loops). I think you could run dozens on tick charts with little problem. BTW the blue set is the 'long hand' calculation and I think I prefer it. Maybe I am judging too harshly. One thing I have noticed is the VWAP as presented by TS does not use the total series volume for wieghting??? it is along the lines of :- (for bar n = 1 to z) where z is lastbar on chart Vwap = Price(n) * Vol(n) / TotalVol(1-n)......so vol is summed from first bar to curent bar. Should that not be Price(n) * Vol(n) /TotalVol(1-z)........so total volume is summed from firstbar to the last bar?? So I am confused again the VWAP as presented by TS does not divide by the total volume of the series? Is this correct? Dosen't seem like it is. Cheers, Nick
  12. When is a discretionary trader simply a 'system' trader that overrides there signals? For example I think that the LBR method and the Goslin method could be 'systematised' or put another way programmed to spit out signals. One could then choose whether to take them or not (hence exercising discretion). Of course you could say I am only going to take a trade when the 3 crosses the 10 "by a good amount" and the volume is "high". Is it valid for a discretionary trader to leave these terms 'fuzzy'? If not these variables can be systematised. Incidentally computers can do a reasonable job at 'fuzzy' stuff. The reason I raise this is because as a discretionary trader I am constantly asking myself :- What should be included in my trading plan, and what can be safely left out? And, how rigorously should these parameters be defined. (high,good,wide,long) Honestly I don't know the answer to this. Do you define stuff rigorously then only take the ones that 'feel right'? Is one of the failings of less successful discretionary traders the fact they don't define there setups rigorously enough? Cheers. Edit: oops gone of at a bit of a tangent.
  13. No takers on the which plot is which? I thought you might have a go DBNTina as you must know this stuff quite well Do they both have merit? Cheers.
  14. Emmster despite following carefully at home I discovered something that I had missed. Skew and Trend can be quite different. I am not sure Jerry introduced the term 'bias' I think he has always talked about skew until others (like me ) mentioned it. Early on I chose to think of skew as a 'bias'. On reflection maybe that was not such a good idea. Might be easier to just think of skew (more volume above or below the PvP) i.e the distribution is skewed. And trend i.e. price is trading above or below the VWAP. In the basic trades skew and trend match things become trickier when they don't. Caveat - I'm still learning this stuff too so I hope I haven't given duff info. I am sure Jerry will correct me if I am mistaken.
  15. Random thoughts. The system guys look at maximum adverse excursions. Worth checking out for discretionary traders. I think that's what James seminar chap is talking about. You can fiddle with stop size at the expense of % winners. Trouble is often everyone knows where stops are. No its not a conspiracy - that last swing low that you put your stop under ...guess what, that's probably where my stop is too. This is one of the reasons price moves back and forth the way it does. The path of least resistance is where the liquidity is. On the other side of the coin the break out traders will have orders in the other direction at exactly the same levels. Another option is not to uses a stop....I know heresy. Let me re-phrase that put a hard emergency stop in that's well outside the market. Wait for bar close for your actual stop. That will save us from all those long tailed doji's that seem to know exactly where my stop is then close back where they started. Its a toughie and thats for sure. One thing I have noticed many great traders are much more flexible with stops. They still know pretty quick when a position is going against them but they tend to give more breathing room and not close on that final test before the move. Cheers.
  16. Yes it is. Like most things in multicharts its clunky or not all there. For example you can only select nnnn bars, whole series, or screen for the bars to factor into your calc (no dates). So for todays values you have to constantly mess around re scaling and scrunching up bars. Seems like they half implemented it so they could tick the box then gave up on. This seems a common philosophy over at TSSuport (the supplier).
  17. Here is the dax seems the difference is more pronounced. (gives the game away) I am not sure why.
  18. Jerry, Thanks for your indulgence on this. I appreciate it. On the plus side I understand a lot more about the math behind things! (Clearly still not enough). I am hunting for an arithmetician as I type. Let me just say how I got started on this. It was precisely because of performance issues. Basically using the code by Dbtina and Nick the code was too slow when loading on a tick chart. It takes about 10 minutes to process a few days of ticks. Once running its OK but for every tick it needs to process every bar back to the start of the day. Having re-done the PvP code (that used to have the same speed issues) and getting pretty massive performance gains, I figured I would try this. A lot tougher! Actually on YM the various results are close enough and I think the difference can be attributed to rounding errors (again the non-iterative code is superior in this respect). I'll post a couple of screens and challenge anyone to detect which is which. I would have said I was done...except.... The DAX subjectively looks 'different'. The lines track but sometimes end up a handful of ticks apart. Its perplexing. I think I'll go ahead and 'publish' I reckon its solid code and there are a couple of neat bits. Next thing a super efficient histogram (again the plan is to make it tick precise and perform OK) I have a couple of ideas how to approach that without iteration too. So which is the real SD blue plot or yellow plot?:) Actually I think I can spot them apart but i have been staring at these things for 2 days now.
  19. Hi jerry, The last question was meant to be "does it make sense to multiply the square by volume as well". Multiplying the price by normalised volume makes sense as you illustrated above it is the whole basis for the VWAP. You can see what it actually is and why its done. Multiplying the square by the normalised volume I can't get my head round. The square is just an intermediate number used in the calculation. In fact if you are multiplying the sum by vol and the sum of the squares when you take the difference they largely cancel out (but not completely). Why not divide the sum by normalised volume or multiply and then square? The other thing is that all of the ways of calculating variance (except just re totalling the series when you get a new data point) seem to produce a slightly different (but consistent result). I presume there are proofs for all these formula adding in the weighting seems to break them all. Unless I am doing it wrong which is highly likely. Still kinda tearing my hair out. EDIT: Another thought wherever you normalise price with the VWAP (Price-VWAP) You are taking into account the volume as it is already factored into the VWAP. I wish my maths was better to actually work through the proofs.
  20. OK I've been tearing my hair out with this. Basically I coded all 4 different text book algorithms for calculating Variance. See http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance I added in the volume weighting (using a couple of methods) but could make none match exactly with method one. I hesitate to say this but I wonder if multiplying the squares by the barvolume/total sample volume is mathematically 'valid'? The more pressing question is should the ratio Bar Vol/Tot Vol use the complete sample size volume for its calculation I guess the answer is yes again. Does it make sense (math wise) to multiply the Square by price too? I favour the last algorithm however the bands seem slightly narrower than looping through the sample each time. X is the price and mean is the VWAP which plots perfectly. n = 0 mean = 0 S = 0 foreach x in data:...//i.e each time we get a new bar ..n = n + 1 ..delta = x - mean ..mean = mean + delta * Weight ..S = S + delta*(x - mean) ........... // Note This expression uses the new value of mean end for variance = S/(n - 1) Anyone have any ideas? BTW I have lots of great code but am loath to post it until I resolve this issue. BTW above Weight is Volume/TotalVolume. BUT Total Volume is the total for the series to that point. I am convinced if it is mathematically valid there must be a way to calculate variance correctly as each bar arrives without scaning the whole series. I can do that for the VWAP and a regular SD its just the weighting that causes issues. Cheers, Nick. Cheers.
  21. Ahh Ok I see. I have to say its hard to get context from all 4000v charts (even though you have HTP overlays on TL5). Look great to actually trade from though. I don't normally look at YM but seeing as the plug gets pulled on ER I have switched stuff around. Looks like we are still dealing with W Dot ...I agree looks like its refreshing to push down though I need more YM data for a decent monthly chart. Keep it coming!
  22. One last chart a 1 tick of the same period as the last post (yesterdays ER2). Looks good to me? It is much much quicker this way and its plausible to run it on 1 tick charts (meaning complete accuracy is attainable if desired). If it looks good enough I'll upload it. Incidentally watching PvP for the last week or two and comparing tick precise with 1 & 2 minutes I think I might have changed my mind - tick precise would have kept you out of a couple of bad trades due to quicker 'flipping' Cheers
  23. OK figured out what was wrong with the last two indicators but have come up with something that I think is OK. The reason for this is that there are some performance issues with the indicator here as it has to scan the series back to the days start when there is a new tick. Applying it to a tick chart (especially at the end of the day) it slows right down. Anyway I figured there should be a way to do it using running statistics and indeed there is. There is a side benefit to doing it this way as you don't get cumulative rounding errors (according to the signal processing guys). This does not get rid of the sampling inaccuracy that Nick mentions earlier in the thread. I'd welcome comments? I wonder if rounding errors would explain the 2 or 3 ticks difference?
  24. Thanks, I figured that was the case just wanted to be sure. I have used and alternate algorithm from the signal processing world. I'll post in DBtinas thread but would welcome your expert opinion. It has a couple of advantages. Cheers, Nick.
  25. Hi Jerry (and other standard deviants ) With respect to the SD bands. If the VWAP changes do you re-calculate the whole series with respect to the new VWAP or do you calculate the SD with the current point and the current VWAP? i.e. is it the sum of the squares of price(n)-VWAP(n) or price(n)-VWAP(z) (where z is the last element of the series). I think that's what the difference between the two methods I used here :- http://www.traderslaboratory.com/forums/46/vwap-indicator-with-1sd-and-2sd-2175-3.html#post17254
×
×
  • Create New...

Important Information

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