Lefora Free Forum
87 views

Possibly a silly question

Page 1
posts 1–4 of 4
regular - member
184 posts

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

__________________
Slashdot. It's like Digg on slow, but sensible.
novice - member
37 posts

Alan
I use the following for indicators like this: if the last traded is between (including) the back and the lay, use that.  if not, use the mid point of back and lay (probability based mid, not odds). You might want to filter out wide spreads and just ignore those prices.

I found this recently, a free technical analysis library for java with a range of indicators.  Haven't used it yet, but it will remove alot of my code.  http://www.webcabcomponents.com/Java/api/ta/index.shtml

One traditional indicator is to compare two moving averages but of different duration e.g. in your case you could compare the 60 second ma with the 120 second ma.  Subtract one from the other to get the direction of the market.

novice - member
37 posts


I use this (C#) library. It's free and the source code is available. Down side is that I had to fix a bug in the Relative Strength Index (RSI) code. I can give anyone the updated code if they're interested.

http://www.4xlab.net/

regular - member
184 posts

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

__________________
Slashdot. It's like Digg on slow, but sensible.
Page 1
posts 1–4 of 4

This Topic Is Locked To Guest Posts

It's been a while since this topic was active, if you'd like to get it going again, please post as a registered member

join now