inksmithy's Blog
I have too many websites!
Posts: 184
Member of: Diybetfairbots Forum.
If you have no idea what I'm talking about, have a look at the video, it will explain things a lot better than I would be able to. Basically though, it is a mathematical law which talks about the distribution of numbers within seemingly random data sets.
I can't help but think that something like this could be useful in a botting scenario. What I'm thinking is that looking at (for example) football, figuring out a relationship between this law and the times a goal is scored and so on. That might be a bad example, but I'm really starting to think there might be something to it. Any thoughts?
- from the topic: Benfords Law
I'm trying to come up with metrics
October 11, 2009 by inksmithy
lo all
The one I'm looking at at the moment is runner activity, ie, the amount being traded on a runner over a set period of time. In this case, I'm working on the basis of a running total which takes a single minutes trading into account.
Here is the code:
private double tradedLastMinute;
private LinkedHashMap<Long, Double> minutesValues;
private long oneMinute;
private boolean foundEldest;
private boolean removed;
public RunnerActivity()
{
this.minutesValues = new LinkedHashMap<Long, Double>();
this.oneMinute = 60 * 1000;
this.removed = false;
this.tradedLastMinute = 0.00;
}
public void addRemoveValues(RunnerPrices rp)
{
long now = System.currentTimeMillis();
this.minutesValues.put(now, rp.getTotalAmountMatched());
double newest = rp.getTotalAmountMatched();
double eldest = 0.00;
for (Iterator<Long> it = this.minutesValues.keySet().iterator(); it.hasNext();)
{
long curVal = it.next();
if (curVal < (now - this.oneMinute))
{
eldest = this.minutesValues.get(curVal);
this.tradedLastMinute = newest - eldest;
it.remove();
}
}
}
I seem to be getting some interesting results here, particularly in a volatile market. What I'm trying to figure out though - and this sounds a bit silly - but what would be the best way to actually use these metrics? From what I can see, the trend seems to be that the favourite runner has the most activity. I figure, (working on an overs/unders market here) if I calculate the total on each runner as a percentage, I can weight it accordingly, which will help in the decision making process. Anyone else have ideas?
Alan
Re: Possibly a silly question
September 25, 2009 by inksmithy
Thanks for that guys, useful answers both of them. I'm having a good hard look at that library denp, I'll let you know what I come up with.
Thanks again,
Alan
Possibly a silly question
September 22, 2009 by inksmithy
Lo all.
Right, I'm following up a theory I came up with a while ago (with the assistance of a link provided by someone here) which involves both an Exponential Moving Average and a Simple Moving Average.
Struggling with the maths as usual, but I mostly understand it.
This is the silly question though. Because these averages by their nature lag slightly behind the actual values they are based on, I want to use the most up to date values possible, which sounds obvious. However, because I'm trying to identify which direction the market is trending in, which values should I use? I have a couple to play with when I use the betfair API.
1) The current BestPriceToBack for the runner.
2) The current BestPriceToLay for the runner.
3) the LastTradedPrice for the runner.
The first two are obvious contenders, since they represent the most up to date information regarding prices available.
The third one though, is interesting. Interesting because it doesn't just provide the most recent back price or the most recent lay price, but it provides both.
Lets say I'm monitoring prices over a 120 second period. During that time, I'm getting trades on both sides of the market, back and lay. What if I was to take an (SMA based) average of the last traded prices for the first 60 seconds and compare that average with an SMA based average of the second sixty seconds of LTPs? That would in effect give me two figures to compare against, which is the goal after all. Am I heading up the right path here?
Alan
Re: How's everyone doing?
August 20, 2009 by inksmithy
hiya denp,
I dunno about that - this course is teaching me a lot about the underlying mechanics, but I think an awful lot about design of any kind has to be taken with a grain of salt really.
Design of any kind is too subjective to be given a binary result. Sure, there are general principles which need to be applied, but they just principles, not rules.
Also, I've seen some of your code - once I figure out what you have written, I'm a bit awestruck tbh.
Alan
Re: How's everyone doing?
August 9, 2009 by inksmithy
I went a bit quiet on the betfair front. I'd rewritten my bot from scratch, to almost the point of making bets, then had a look through it and wondered what the hell I was doing with it. It was so complicated and convoluted that nothing was making any sense from a fresh eyes perspective.
I've just started rewriting it again, using all the principles from the software design course I'm doing and things are starting to make a lot more sense now.
University edumacation seems to be making a difference! This is the dullest course I have ever done, but the principles it's teaching me make real sense, so I'm slogging on and applying them. Seems to be working so far. Watch this space I guess.
Alan
Re: API Lite - what's the difference?
May 1, 2009 by inksmithy
ooh, I didn't realise they had been added to the free API.
And that data charge looks ouchies, how much did you get hit?
Re: API Lite - what's the difference?
April 25, 2009 by inksmithy
I think its basically just a pared down version of another API response. GetBet gives you all the info, GetBetLite gives you similar info as GetBet without the possibly esoteric overhead and GetBetMatchesLite gives you pared down information on matched bets only.
I think thats it anyway. Most of the lite calls aren't available to the free API though, which is headscratchingly strange really.
Re: API request XML - hand rolled
April 16, 2009 by inksmithy
ahaha, I dunno whether I was or wasn't back then, but the General Discussion fora (?) hit 1000 posts with freds.
I have no idea why I noticed that, the number just jumped out at me.
On a slightly different, yet still XML related note, has anyone ever looked into using the twitter API to get hold of live football scores? Its something I've been looking into recently, there are a couple of tags being used on the site which follow matches as they are played, I'm thinking about ways I can hook them into my bot.
I promise, no matter how much it might look like it, I'm not drunk now.
Alan
Re: API request XML - hand rolled
April 11, 2009 by inksmithy
There you go fred, 1000th post. try making a frosty piss out of that!
Re: Little bit of code review/inspiration
March 21, 2009 by inksmithy
Right I haven't implemented the EMA yet, but I've put together a Simple Moving Average for a one minute period and a two minute period for each market I'm monitoring. I've left the rating system I had in place, although I'm going to tweak it a little. Just to recap, at the moment, the ratings look like this:
if (thisPrice < oldestPrice)
{
initialScore = initialScore + 0.5;
}
else if (thisPrice == oldestPrice)
{
initialScore = initialScore - 0.025;
}
else if (thisPrice > oldestPrice)
{
initialScore = initialScore - 0.5;
}
The way I think I will change it is like this:
if (thisPrice < oldestPrice)
{
initialScore = initialScore + ((this.updates.size() / 10) * this.updates.size());
}
else if (thisPrice == oldestPrice)
{
initialScore = initialScore - ((this.updates.size() / 10) / (this.updates.size() / 10));
}
else if (thisPrice > oldestPrice)
{
initialScore = initialScore - ((this.updates.size() / 10) * this.updates.size());
}
That at least will give me a rating and a decay based on the number of calls I have in the collection. The above idea could well be completely stupid - I just came up with it as I was writing this post. It hasn't been tested or implemented yet.
As far as the SMA's go, here is the output I'm getting from them. There is a bit of other cruft in there which I'm looking at for debugging and ratings tweaking, but so far it all seems pretty good. The figures you are looking at here are based on a price call every 275 milliseconds, while monitoring 35 different markets. That will make sense once you have looked at the returns:
avgPrice = 6.43 updates size = 14
oldest price = 100440176
Favourite = runner 0
runnerNum = 0
One Minute Rating = 0.95
One minute SMA = 0.76
Number of calls within oneMinuteUpdates: 7
Two Minute Rating = 1.45
Two Minute SMA = 0.46
Number of calls within twoMinuteUpdates: 14
avgPrice = 18.92 updates size = 14
oldest price = 100440236
Favourite = runner 1
runnerNum = 1
One Minute Rating = -0.18
One minute SMA = 1.39
Number of calls within oneMinuteUpdates: 7
Two Minute Rating = 3.33
Two Minute SMA = 1.35
Number of calls within twoMinuteUpdates: 14
avgPrice = 7.45 updates size = 14
oldest price = 100440177
Favourite = runner 0
runnerNum = 0
One Minute Rating = 2.48
One minute SMA = 0.92
Number of calls within oneMinuteUpdates: 7
Two Minute Rating = 3.48
Two Minute SMA = 0.53
Number of calls within twoMinuteUpdates: 14
avgPrice = 20.73 updates size = 14
oldest price = 100440237
Favourite = runner 0
runnerNum = 0
One Minute Rating = 0.4
One minute SMA = 1.47
Number of calls within oneMinuteUpdates: 7
Two Minute Rating = -2.1
Two Minute SMA = 1.48
Number of calls within twoMinuteUpdates: 14
avgPrice = 14.14 updates size = 14
oldest price = 100440251
Favourite = runner 1
runnerNum = 1
One Minute Rating = -0.18
One minute SMA = 1.01
Number of calls within oneMinuteUpdates: 7
Two Minute Rating = -0.35
Two Minute SMA = 1.01
Number of calls within twoMinuteUpdates: 14
avgPrice = 14.14 updates size = 14
oldest price = 100440252
Favourite = runner 1
runnerNum = 1
One Minute Rating = -0.18
One minute SMA = 1.01
Number of calls within oneMinuteUpdates: 7
Two Minute Rating = -0.35
Two Minute SMA = 1.01
Number of calls within twoMinuteUpdates: 14
avgPrice = 14.71 updates size = 13
oldest price = 100440266
Favourite = runner 0
runnerNum = 0
One Minute Rating = -2.02
One minute SMA = 1.12
Number of calls within oneMinuteUpdates: 7
Two Minute Rating = -5.02
Two Minute SMA = 1.13
Number of calls within twoMinuteUpdates: 13
I'll break that down a little bit with what I think the significance of the important numbers are, if I get it wrong, let me know.
The one minute rating is still using the old code. I haven't implemented the new one yet. However, you can see that the decay is working as I intended it to, which was to bring the price back towards some sort of equilibrium (0.00) when the price is staying fairly stable.
The one minute SMA is reflecting the most up to date figures and could potentially be used as a reasonable decision metric when compared with the two minute SMA. If the one minute SMA is lower than the two minute SMA, I could potentially place a bet with the expectation that I could trade out of it within a minute or so, depending on the number of ticks between the one and two minute SMAs.
My next step is to try to implement the Exponential Moving Averages over one and two minute periods. It should be relatively simple to do and it would provide another useful metric to help with the decision making process.
Just as a matter of interest, I set up a very basic java enum type which takes two doubles and returns a value based on the difference between them. Its dead simple and was my first real go at creating readable and useable enums. Currently I use it to set the text of a label in the UI, but I have further plans for it.
public enum PriceDirectionEnum {
RISING, FALLING, STATIC, NOTHING;
private PriceDirectionEnum pde;
public PriceDirectionEnum getDirection()
{
return pde;
}
public void setPriceDirection(double oldPrice, double newPrice)
{
if (oldPrice > newPrice)
{
this.pde = this.FALLING;
}
else if (oldPrice == newPrice)
{
this.pde = this.STATIC;
}
else if (oldPrice < newPrice)
{
this.pde = this.RISING;
}
}
}
Re: Flutter...
March 21, 2009 by inksmithy
I think all of us would love to go back to then, knowing what we do now. I think even I would have been able to make a profit with one of my bots.
Re: Little bit of code review/inspiration
March 19, 2009 by inksmithy
denp, thats outstanding, thanks very much for that. I'm looking into it now.
Little bit of code review/inspiration
March 17, 2009 by inksmithy
I seem to be leaning on you guys a lot here :)
This is the code I am working on now, its basically a rating system for a collection of prices recieved over any given minute of a market being in-play:
private double rateFavourite()
{
Double initialScore = 0.0;
long oldest = 0;
if (this.updates.size() > 0)
{
for (Iterator<Long> it = this.updates.keySet().iterator(); it.hasNext();)
{
long curTime = it.next();
if (curTime > oldest)
{
oldest = curTime;
}
}
MarketPrices mpStart = this.updates.get(oldest);
Favourite fave = new Favourite(this.mar, mpStart);
int runnerNum = (fave.getFaveRunnerIndex());
double oldestPrice = 0;
if ((!mpStart.getRunnerPrices().getRunnerPrices().isEmpty()) &&
(!mpStart.getRunnerPrices().getRunnerPrices().get(runnerNum).getBestPricesToBack().getPrice().isEmpty()))
{
oldestPrice = mpStart.getRunnerPrices().getRunnerPrices().get(runnerNum).getBestPricesToBack().getPrice().get(0).getPrice();
}
synchronized (this.updates)
{
Collection c = this.updates.values();
Iterator itr = c.iterator();
while (itr.hasNext())
{
MarketPrices mp = (MarketPrices) itr.next();
fave.setPri(mp);
if (fave.getFaveRunnerIndex() == runnerNum)
{
double thisPrice = mp.getRunnerPrices().getRunnerPrices().get(runnerNum).getBestPricesToBack().getPrice().get(0).getPrice();
if (thisPrice < oldestPrice)
{
initialScore = initialScore + 0.5;
}
else if (thisPrice == oldestPrice)
{
initialScore = initialScore - 0.025;
}
else if (thisPrice > oldestPrice)
{
initialScore = initialScore - 0.5;
}
}
initialScore = initialScore + fave.getFaveModifier();
this.faveRunner = fave.getFaveRunnerIndex();
}
this.updates.notify();
}
}
return initialScore;
}
The idea behind the code is for the iterator to go over each call recieved over the last 60 seconds and grab the price from the MarketPrices object within the collection. (I'm using a Collection object because it seems to be the easiest way to iterate over a LinkedHashMap. There may be easier ways, but I got tired of seeing NPEs)
It then compares each price with the oldest price in the collection and if the price is lower, the initialScore value has 5 added to it. If it is higher, it has 5 taken from it and if the price is the same as the oldest one, it takes 0.025 from the score. I did that to allow the price to decay somewhat - after all, I'm trying to figure out when to get into the market so I can get out of it ASAP, hopefully with a profit. I'm trying to jump on the wave as its cresting, if that makes any sense.
All these figures have been plucked out of thin air by the way - +5, -5 and -0.025 were made up out of nothing, which is kind of the point of this post. If I use this.updates.size() (updates being the collection of responses from the last 60 seconds) I then have a figure for how many updates per minute that market is getting. What I would like to do is correlate the scoring system with the number of responses per minute, which is a figure which will vary according to how many markets are in running at any one time. If there are only 2, I'm looking at about 120 responses per market, per minute. If I have sixteen (which I had tonight) I will be averaging 12 responses per market, per minute. I have only just finished debugging this code tonight, so I haven't seen how many responses per minute I will get per market on the weekend. Not that many, I think.
You can see the problem I will have - if there aren't many markets, the decay will be too high and I will miss opportunities. If there are a lot, the decay won't be high enough and the bot will see false opportunities. What I need to do is calculate the decay based on the number of responses per minute.
I'm going to be trying to figure this out myself, but if any of you guys think of anything which you aren't loathe to release, pitch in, please!
Cheers,
Alan
Re: pip calculator
March 14, 2009 by inksmithy
no biggy denp, if nothing else it showed me how capable I am of overthinking something. I think I sometimes need to back off and reduce things to basics. As you saw, I have a shocking tendency to make things more complicated than they are.
As for the ternary operator, I love it, I think I will be using that structure a lot. Lesson learned though, I'm going to document it when I do though - I find reading my own code an adventure in unintelligibility most of the time, reading someone elses code often throws me for a spin.
On the subject of python though, I just bought myself a Nokia e61i off ebay and I was gratified to find that not only is python supported on it, there is an interactive shell for it as well. All I need now is a decent free text editor for it and I'll start playing with it on the boring days at work when I can't get my laptop out.
Thanks again,
Alan
Re: pip calculator
March 12, 2009 by inksmithy
Oh for christs sake.
Consider my arse thoroughly self kicked.
Thats actually a really useful function though - I have a real use for that at the moment.
Thanks Fred,
Alan
Re: pip calculator
March 12, 2009 by inksmithy
I've done a little more experimenting with it and I'm even more confused than before. Probably is me being thick. I had a look at inverse functions and what they are used for (wikipedia) and I think I have a handle on them. I'm still not seeing how to use this function in this class.
This is what I've done:
PipCalculator pip = new PipCalculator();
double cp = rp.getBestPricesToBack().getPrice().get(0).getPrice();
System.out.println("Current price = " + rp.getBestPricesToBack().getPrice().get(0).getPrice());
System.out.println("pip addPips + 1 = " + pip.addPips(cp, 1));
System.out.println("pip addPips + 2 = " + pip.addPips(cp, 2));
System.out.println("pip addPips + 5 = " + pip.addPips(cp, 5));
System.out.println("pip addPips + -1 = " + pip.addPips(cp, -1));
System.out.println("pip addPips + -2 = " + pip.addPips(cp, -2));
System.out.println("pip addPips + -5 = " + pip.addPips(cp, -5));
System.out.println("pip asInverse = " + pip.round(pip.asInverse(cp)));
System.out.println("pip asInverse + 1 = " + pip.round(pip.asInverse(pip.addPips(cp, 1))));
System.out.println("pip asInverse + 2 = " + pip.round(pip.asInverse(pip.addPips(cp, 2))));
System.out.println("pip asInverse + 5 = " + pip.round(pip.asInverse(pip.addPips(cp, 5))));
System.out.println("pip asInverse + -1 = " + pip.round(pip.asInverse(pip.addPips(cp, -1))));
System.out.println("pip asInverse + -2 = " + pip.round(pip.asInverse(pip.addPips(cp, -2))));
System.out.println("pip asInverse + -5 = " + pip.round(pip.asInverse(pip.addPips(cp, -5))));
this is the result I get:
Current price = 1.48
pip addPips + 1 = 1.49
pip addPips + 2 = 1.5
pip addPips + 5 = 1.53
pip addPips + -1 = 1.47
pip addPips + -2 = 1.46
pip addPips + -5 = 1.43
pip asInverse = 0.68
pip asInverse + 1 = 0.67
pip asInverse + 2 = 0.67
pip asInverse + 5 = 0.65
pip asInverse + -1 = 0.68
pip asInverse + -2 = 0.68
pip asInverse + -5 = 0.7
Just for this example, I can see that the difference between the current price and the asInverse return is 0.2 Just looking at the returns from a couple of different price calls now:
Current price = 1.04
pip asInverse = 0.96
Current price = 1.12
pip asInverse = 0.89
I don't understand. I think it may be giving the number of ticks left until the next jump, but that makes no sense at all if you look at the very first lot of output there. I'm horribly confused here and I think I might be overthinking the problem.
Alan
Re: pip calculator
March 12, 2009 by inksmithy
denp, I finally got round to having a good look at this PipCalculator of yours - I understand most of what you have done, but the asInverse function has me a little lost. This is what I'm doing to test it - it isn't very sophisticated, but it works for me.
The code:
PipCalculator pip = new PipCalculator();
double cp = rp.getBestPricesToBack().getPrice().get(0).getPrice();
System.out.println("Current price = " + rp.getBestPricesToBack().getPrice().get(0).getPrice());
System.out.println("pip addPips + 1 = " + pip.addPips(cp, 1));
System.out.println("pip addPips + 2 = " + pip.addPips(cp, 2));
System.out.println("pip addPips + 5 = " + pip.addPips(cp, 5));
System.out.println("pip addPips + -1 = " + pip.addPips(cp, -1));
System.out.println("pip addPips + -2 = " + pip.addPips(cp, -2));
System.out.println("pip addPips + -5 = " + pip.addPips(cp, -5));
System.out.println("pip asInverse = " + pip.round(pip.asInverse(cp)));
The results:
Current price = 2.22
pip addPips + 1 = 2.24
pip addPips + 2 = 2.26
pip addPips + 5 = 2.32
pip addPips + -1 = 2.2
pip addPips + -2 = 2.18
pip addPips + -5 = 2.12
pip asInverse = 0.45
As you can see, the results for adPips are pretty much what I am expecting (and just as a by the by, exactly what I needed, thanks very much!) but I'm not completely understanding what the asInverse function is returning.
This is the function as you have written it:
public double asInverse(double p) {
return p > 0 ? 1 / p : 0.0;
}
Which I have to confess I didn't understand at all. So after another look at the java operators, this is the function as I would have written it - yours is much more elegant than mine:
public double asInverse(double p) {
double result = 0.0;
if (p > 0)
{
result = 1 / p;
}
return result;
}
So I understand the operation of the method, but what is the point of the result?
Just as a by the way, even if you never answer this, I'll be grateful for that code, I can't count how many times I have wished for a shorter way for if, then, else statements. Next time I'm working on picking up a new language, I won't brush past the operators like I did with Java.
Cheers,
Alan
Re: betfair wsdl maven java generator pom
March 3, 2009 by inksmithy
better than me too....I hope she keeps up with that blog, she's doing interesting stuff with her bot.
Re: ArrayList<E> vs LinkedList<E>
February 26, 2009 by inksmithy
5-6 seconds is a pretty extreme example, but I have seen it a few times. I've been trying to figure out what it is which is causing it and the best I can come up with is that I'm using crappy consumer equipment and stretching its capabilities by asking it to work over the network infrastructure I have. I think I might try to save up a bit of cash and buy a couple of Cisco 2600s and a 2950 switch. That way I can fiddle with the network QoS and make sure my stuff makes it to the network ahead of the kids bastard runescape - at times there are four of five of them playing runescape at the same time and I wonder at times whether that has anything to do with it.
You are right, schedule is the call I'm looking for - I should have seen that myself.
I'll dig into that and see how it goes. I'll keep you updated, thanks again.
Alan
Re: ArrayList<E> vs LinkedList<E>
February 25, 2009 by inksmithy
Hiya Austin, how was your holiday? Certainly sounded like it was going well - a foot of powder is useful snow.
As far as the development is going, I'm making progress. Sometimes it seems very slow, but it is progress. I'm trying to take your suggestions on board as I write the app, as well as learn new aspects of the Swing libraries at the same time, so I've had a fair bit to get my head around.
I pretty much came up with the same conclusions as you set out above, which I mostly boiled down to the fact that the lists I'm using aren't going to be much longer than 100 or so elements and I'll pretty much be taking from one end and adding things to the other, so I've decided to stick with ArrayLists for the moment. Once I have my head properly around LinkedList and Iterators, I'll start thinking about using them.
I think one of your earliest suggestions was to try to keep the UI and the business code as separate as possible, so I can work on implementing the strategy without worrying too much about breaking the rest of the app when I get it going. So with that in mind, I've sat down and had a good long think about what my strategy really is and more importantly, what markets I'll be playing in.
What I've come up with so far is that I am aiming (with this bot) at going into just the match odds and the over/unders markets, with the intention of making only a couple of bets in each market. The bot should open and close a position fairly quickly, with as little as two or three ticks between the open and close. Once its made its bets, win or lose, it should stop monitoring those markets and concentrate on whatever markets are left. So basically, my strategy is to make very small gains on a what can work out to be quite a lot of markets. Thats the basic strategy anyway. I have a few metrics I've come up with which will help weight the decision on making a bet or not, but the overall strategy is sound for a patient person, which I'm quite happy to be with this.
As far as the coding itself goes, I've done a few things, some of which I'm reasonably proud of, but all of which I know I can improve. For example, I've created a couple of custom components which will take a MarketPricesResp and distribute the prices and amount available into the relevant UI elements. What I did was extend a JPanel in order to create the components. More specifically, I created a component which had the UI elements to deal with a two runner market, put the extra code in there which would get and set the bits and pieces I wanted, then I duplicated the class and added another runner UI object, so I had a three runner market object.
What I should have done was create an abstract class which extended JPanel, which I could then feed a market into and it would create a market component which took the number of runners from the MarketDataType I made which holds the parsed response from a GetAllMarkets call. So instead of hard coding how many runners in the component, I could have the app generate them dynamically. I've put that one down on my list of things for version 2. At the moment I'm prepared to accept the mistakes like that which I have made in order to get the app running, but I am keeping a little list of things to do and things I have learnt from it.
As far as the business code goes, I've been doing a lot of study on concurrency and how to get things happening correctly. I'm at the point right now of plodding through the idea you gave me and using a TimerTask to get the prices. The strategy I've come up with so far is to have the TimerTask as an inner class within the class which farms out all of the market IDs and decides which markets to work on. What I'm struggling with though is exactly how to implement it. So far I have a couple of possible solutions. The first one is to have the TimerTask iterate through the list of markets and perform a MarketPricesCall on each of them, using the Timer.scheduleAtFixedRate() method. That sounds like the simplest solution, which probably makes it the best one. What I'm wondering though is whether there is a way I can make the timer sort of respond to its environment. For example (just to show I really am working at the shallow end of the botting pool here) my network setup is complicated to say the least. I have my computer connected to a router using ethernet, which is fine. However, the router I'm connected to is accessing another home router over WIFI and that router is then connected (through an incredible tangle of wires which I despair at every day, but can't do anything with because of small children and so on) to the telephone socket. Also, while my broadband is advertised at being "8Mb" I rarely get much better than six or seven hundred kilobits per second throughput. I'm not complaining here, just outlining the issues.
What all that means is that at times, responses can be very slooow. I've seen 5 and 6 seconds elapse between a request and the response. What I've noticed though is that if the response times start off being slow, they are slow for the entire session, no matter how many times I restart the app or reboot the computer. If the network is slow, its slow. If it is fast, its fast. So if I can get the Timer to somehow respond to network speeds and adjust itself accordingly, I should then be able to get work the ThreadPool to its maximum efficiency.
Does all that make any sense, or am I over thinking the problem?
Thanks for your reply and the time you have spent on this Austin, you have no idea how pathetically grateful I am for the tips.
Alan
Re: Creating Tip Output to be read by a Bot
February 15, 2009 by inksmithy
cheers deano, I'll have a look at that - I got up to the point where I'm looking at the rules and regs.
Re: Creating Tip Output to be read by a Bot
February 14, 2009 by inksmithy
could you set up multiple pulls of live score data from different locations.
eg picture 5 or 6 locations from which you pull at a rate the original site is content with.
Yourmain program then pulls not from the orig source but from your ownlocations and takes as current the one with the freshest timestamp. (to cover against different server times .. the score sum with thehighest total )
orig host is happy as they see 5 or 6 different pull urls at an agreeable rate.
you then suck in all of these and merge to get your end result.. info at a rate you need.-punterprofit
I have actually considered doing that and I think in all likelyhood its what I will end up doing, so long as I can find a few sites which get their feeds from different places. I haven't done it yet because I've been busy with other things.
Looking at the correct score market is a useful metric as well, since it not only gives you the opportunity to deduce or infer the current score, it also gives you the ability to see which way the rest of the crowd thinks its going to go. I wouldn't consider relying on it though. What it could be used for though is to come up with a metric whereby all of these different factors are used to come up with a tipping point. Give all the metrics you are using a 'weight' which depends on the reliability and recency of the data you are using and when the combined 'weight' of all the metrics (IE, weight of money, volume traded, how quickly the market is changing) reaches a certain value, the betting process is started. Whether that involves placing a back bet then placing a lay bet a few ticks later is up to you.
Lots of factors can be involved then and could probably be organised so new metrics can be added reasonably easily.
Damn, so many ideas, so little time!
Re: new guy
February 12, 2009 by inksmithy
No worries deano, we've all been there.
Going from the WSDLs, there should be one GlobalService and two ExchangeServices - one of the exchange services is for the aus markets. I generally don't bother with the aus markets yet. But, I'm not sure how python deals with namespaces or their equivalents, so your mileage might differ.