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.

gooni

Members
  • Content Count

    77
  • Joined

  • Last visited

Everything posted by gooni

  1. Zen-Fire has a .NET API and you can request a free demo account.
  2. This is the tutorial I used when writing my Zen-Fire API connector (C#). Can't recommend it highly enough. If you'd like some code, PM me. Since I come from a messaging/integration background, I naturally created a single 'hub' that would receive ticks from Zen-Fire, and I then distribute to interested 'tick sinks' (which are plugins). Some tick sinks are files, others are the console itself, others are trading programs etc. This saves having to rewrite sections of code and manage multiple connections. By far the largest issue was reconnection after a connection failure. The API is meant to take care of it internally, but it simply doesn't always work. I had to resort to actually killing my daemon and restarting it. This works nicely Note that Zen-Fire is definitely not thread-safe. All access to its events etc should be single threaded. This is especially important for GUI applications (which I try and avoid).
  3. No problems AgeKay, just wanted to be sure you understood the difference between the API blocking and your event thread queuing. Regarding Zen-Fire, the suggestion from FulcrumTrader is that the order book updates might come out of sequence with regards to the trades themselves, causing a mild discrepancy that over time could build up when one is doing bid-ask cumulative delta work. However, you need to ask yourself whether this affects you. If you look at, say, a Ninja DOM when connected to Zen-Fire, the frequency of updates is quite good. Is this guaranteed to be in the same order that is disseminated by the exchange? I'd be amazed if it was. But is it good enough for what you want to do, given that it's free and easy to program to? As always, it might be more prudent trying what's free and easy before attempting to expensively solve a problem you may never have.
  4. Zen-Fire should do this, or at least seems to based on my usage of the API - even though I never used it for the level 2 feed (order book). Although I very strongly recommend that you don't block the API even if you don't want to process the events immediately (ie you need guaranteed synchronous processing). I used a thread to pull the events from the API and place them in a local memory queue (actually a Queue in C#) and then processed them from that queue. If the API itself does it, all good and well - I'm just saying that it's not a requirement and none that I know do it (most APIs are geared towards technologically advanced users, all of which have their own methods for synchronising threads and prefer to retain control over it). Best part: Zen-Fire API access is free. Can't comment on quality of data though.
  5. NeoTicker :-) Great piece of software if you know how to use it. You can google "Time Distribution Analysis" along with "NeoTicker" for an idea of how I did these tests (although I rewrote that indicator to allow it to do quite a few extra bits and pieces).
  6. My apologies if I didn't make this clear earlier - I've been running many different tests other than the one I posted the full breakdown for. I find the full breakdown unnecessary unless there is an interesting 'time' component to the results. So where I'm spitting out percentages, they are generally based on different tests which I've tried to articulate. Testing how the day closes compared to both the previous days close and the current days open is the last set of tests I did, as per the clarification you highlighted. This is different to the initial run. I may start another thread on ES statistics if there are questions people would like answered, especially regarding intraday tendencies based on contextual setups (setups can be both intraday and across many days, and can include complex analysis such as market profile for example). I could use the research practice, I'm a bit rusty. Anyway, back to your regular scheduled programming.
  7. Without the 'trending' criteria I outlined earlier, compared to the open it will close in the direction of the gap between 50% and 55% (no edge). Compared to the previous days close, it will close in the direction of the gap between 70% and 75% of the time (if the gap isn't closed in the first 30 minutes). Now, if I add the trending component (only on 30 minute bars again), the chances of closing up are 85% (compared to previous close) and 65% to 70% compared to current open. There are two options here: - Vic's stats are wrong - His stats were right in his time and the market has changed If I were to write a TVGR for today's ES market (note that's the only market I analysed, being short on data and time), it would say: "If the first 15 to 30 minutes of market open trends in the direction of the gap, then there is greater than 80% chance the market will close in the direction of the gap for the day. Furthermore, there is only between 25% and 35% chance the gap will fill at all during the day. This is in stark contrast with the usual gap fill chance of 70%". As it stands, I believe much of this phenomenon has to do with the distance the market is away from the gap at the point that these statistics kick in. There is already a very strong correlation between gap size and gap fill chance. I wouldn't be surprised to find that these stats are indicative of the percentage chance of a reversal move of N points being made once a market closes twice in any direction. I may yet test this...
  8. Interesting concept for an automated system ;-)
  9. Just one addendum to the above, gap closures once the first 30 to 60 minutes have played out happen at any point during the day - fairly random distribution, slightly correlated to the expected volatility at that time of day. That is, for the 30% of days that defy the odds and close the gap, it can happen at any point. So be mindful of the reversal...
  10. Interesting observations. I tested this in various ways (gaps up only at first): 1. Market opens, first 15 minute bar doesn't close gap and closes up, second 15 minute bar breaks above first bar high. Chance of gap closure by close? 37%. This happens on 7% of days. 2. As above, but market opens above previous day high (big gap up). Chance of gap closure by close? 27%. This happens on almost 3% of days. 3. As above but using first and second 30 minute bar instead and odds drop to 29% and 24% respectively. This is expected since an OR30 breakout is more directional than a OR15 breakout, and there's less time in the day. Of course, this happens slightly less often. 4. If we consider the odds provided above in order as 37%, 27%, 29%, 24% - the corresponding odds for gaps down are 32%, 23%, 25%, 23%, so marginally less likely to close. These happen happen about as often (6% to 8% for regular gap downs, 2% to 3% for gaps below previous days low). I hope everyone is clear how useful this information is. On around 15% of days, the market will gap and break out of its 15 or 30 minute opening range away from the gap. If this breakout bar also closes away from gap, you would want a lot of momentum back towards the gap to trade against this TVGR. The numbers are good - not 90% to 95% good, but good enough to not trade against without good reason.
  11. Heh, I guess I'll try to be clearer. Odds of gap filling: 70% Odds of gap filling in first 15 minutes: 30% Therefore, odds of gap filling after first 15 minutes: 40% So, if gap doesn't fill in first 15 minutes (30% of days), there are still two options. One option is that the gap fills some other time in the day. This happens on another 40% of days. The second option is that the gap doesn't fill at all. That happens on the last 30% of days. In any 10 days, 3 days the gap will fill in 15 minutes, 4 days it will fill in the rest of the day, 3 days it will not fill at all. I didn't mean to derail the thread, but I hope this is clear. This was run on futures data so 4:15pm close was taken. Yes, on rollover this may cause slight discrepancies but this hardly effects the odds.
  12. I understand. Vic's odds are still wrong (but may have been right at the time..). If we just look at gaps that close (70% of days), 50/70 of those (about 70%) close in the first hour. In the first 15 minutes, only 30/70 (43%) close. Vic states 90% to 95%, not 43%. I'm completely ignoring the days that don't close the gap at all. I'm also not considering the final close for the day, just whether the gap is filled. Perhaps he doesn't care about the gap fill, but just the final close. Personally, I want to know where price shouldn't visit, rather than just where it might end up. Stats for where it closes would be worthwhile to run. If I'm still missing something, please point it out. Otherwise, while TVGR is still a very useful rule, one must understand the true odds.
  13. I don't normally post in this thread but follow it most days. Just wanted to comment on TVGR since it's come up a bit recently. Over the last 6 years on the ES I ran the time distribution for when a gap is closed: Days - 2269 Total - 1557 / 2207 ( 70.5%) Bars (Count) ( Pct) ( AccPct) Histogram 3 ( 648) ( 29.4%) ( 29.4%) ############### 6 ( 188) ( 8.5%) ( 37.9%) #### 9 ( 154) ( 7%) ( 44.9%) ### 12 ( 79) ( 3.6%) ( 48.4%) ## 15 ( 75) ( 3.4%) ( 51.8%) ## 18 ( 51) ( 2.3%) ( 54.1%) # 21 ( 36) ( 1.6%) ( 55.8%) # 24 ( 28) ( 1.3%) ( 57%) # 27 ( 16) ( .7%) ( 57.8%) 30 ( 25) ( 1.1%) ( 58.9%) # 33 ( 16) ( .7%) ( 59.6%) 36 ( 22) ( 1%) ( 60.6%) 39 ( 18) ( .8%) ( 61.4%) 42 ( 9) ( .4%) ( 61.8%) 45 ( 19) ( .9%) ( 62.7%) 48 ( 20) ( .9%) ( 63.6%) 51 ( 12) ( .5%) ( 64.2%) 54 ( 10) ( .5%) ( 64.6%) 57 ( 12) ( .5%) ( 65.2%) 60 ( 16) ( .7%) ( 65.9%) 63 ( 18) ( .8%) ( 66.7%) 66 ( 20) ( .9%) ( 67.6%) 69 ( 15) ( .7%) ( 68.3%) 72 ( 15) ( .7%) ( 69%) 75 ( 17) ( .8%) ( 69.7%) 78 ( 8) ( .4%) ( 70.1%) 81 ( 10) ( .5%) ( 70.5%) The bars column is in 5 minute bars and each row represents 3 bars, so 15-minute periods. This tells us that: 1. 70.5% of gaps close (this is fairly consistently between 65% and 75% most years). 2. 50% of all days close the gap within the first hour - this means another 20% close over the rest of the day (very low odds) and another 30% don't close at all. So, while the original TVGR rules (90% to 95% of gaps close in 15 minutes) aren't quite right, the odds are still against a closure once the first hour has passed. And yes, the above stats mean that just under 50% of gaps that eventually fill will fill in the first 15 minutes.
  14. The image is not showing up for some reason. Other than obvious previous swings, cumulative delta and market profile, I estimate where moves or days ranges might end. I also look using specific methods at where players might be trapped either long or short. I didn't see anything at that high (although there were lots of trapped shorts earlier in the day...). Of course, I didn't look at cash SPX, I'll have a look tonight. Of course, it's usually the most obvious things. I did note that your earlier screenshot showed the limit at 4450 yet here you've entered at approx 4600, I guess you waited for the pause or reversal?
  15. While I can respect any refusal to answer I'll ask the question anyway: what's the basis behind this trade? I can't see anything anywhere that would suggest that is a level for a sell off and I look at quite a few things..
  16. On Balance Volume adds the volume of a bar if it closes up and subtracts the volume of a bar if it closes down, and tracks that bar to bar. Cumulative Delta does this on a trade by trade basis, and adds if the trade was at the ask and subtracts if the trade was at the bid. You can also do something that is part way between the two where you accumulate tick by tick (like cumulative delta) but add on an up tick and subtract on a down tick (like on balance volume). I trust this is clear - the two are similar in high level abstract concept but extremely different in practice and usage.
  17. Profit is only a function of contracts traded. I'd like for highest efficiency or highest win rate or lowest drawdown (and at best, all three) - because the goal is to increase leverage and these are the factors that make that step the easiest and least psychologically challenging. Although the number of trades for all systems looks far too low to be drawing a conclusion from, especially something like efficiency.
  18. There are plenty of comms protocols that add reliability and sequencing on top of UDP - in fact this is usually the preferred approach for high volume data distribution. The beauty of IQFeed's approach is that they (apparently) embed the current bid and ask along with each trade, rather than requiring this to be rebuilt at the client end. For the vast majority of retail use, this is sufficient and quite significantly more reliable.
  19. The 2nd SD only contains 95% of values within a normal distribution. Not to put water on anyone's fire, but market movements are hardly normally distributed. Regardless, they will occur at the edges of an extended market - as long as you can manage your risk on the smaller percentage of days that consistently stretch beyond, it is a viable strategy.
  20. gooni

    Jonbig04's Log

    I get what you're saying, but you're looking at things a little 'holistically' at the moment (what is the overall best way to trade these price movements). If you are anticipating (or preparing) for a short breakout, and you have a method for shorting the highs of the range, that's a much better position to short from. How you manage the trade afterwards is your own call - but you are much better prepared at the top of the range price ;-) (My personal preference is to look at these all as their own system and to plan to trade a portion of contracts for each 'system', allocating less contracts to the less likely but higher payoff outcomes). (Also, I'm pretty sure you're quite comfortable with letting large positions move back to breakeven - it's just that your usual target is 'other side of current range' as opposed to something quite a bit bigger) Food for thought.
  21. gooni

    Jonbig04's Log

    I obviously meant the move to BE quickly on the breakout trades. It's fine if you don't have a setup or confidence to play the short at top of range on CL (if 'preparing' for a downside breakout) - but there's no reason why, if you could play it, to not hold partial positions for a breakout and liquidate them only if it doesn't arrive (or at BE, whatever your system might be).
  22. gooni

    Jonbig04's Log

    I'm curious - since you're expecting a breakout to the downside, why not trade shorts at the top of the range with similarly limited risk but much greater potential of actually holding onto the trade (since you like tight stops and BE quickly)?
  23. Yes, but there's a empirically measurable and practical idea of value, rather than some ephemeral concept that is often touted through MP. It is not so much value as efficiency.
  24. OK so any single transaction is between, at that point in time, a liquidity provider (limit order) and a liquidity taker (market order). In order to differentiate whether to allocate said transactions as 'buys' or 'sells' is dependent on determining which side is expected to be holding inventory at the end of the transaction. This I suppose is clear enough. I haven't yet deciphered the cryptic clues, especially the one about counting buys twice (although my thinking, so far, is that it's potentially counted once as a sell on the liquidity provider side then later as a buy on the liquidity taker side, which may have the 'effect' of counting it twice as a buy). Clear as mud? Is for me...
  25. Furthermore, is every transaction then a transaction between a liquidity provider and a liquidity taker? If so, I'm not sure how there can be an imbalance between the two. Surely I'm missing something..
×
×
  • Create New...

Important Information

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