C# a Step by Step Beginners Tutorial

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts

  • kawafan
    replied
    hi dear.
    we would love to see the same type starting guide for the new API.
    are you thinking about it ?

    Leave a comment:


  • clerk
    replied
    the problem was that I tried to use as the data provider directly MarketGrid. I found that to get MarketGrid only indexes to refer to classes of runners
    Code:
    private void c_MktGrid_CellClick(object sender, DataGridViewCellEventArgs e)
            {      
    
                int ri = e.RowIndex;
                int ci = e.ColumnIndex;
                           
                //selectionID
                long id = mData.RDATA[ri].ID;
                 ........................
                
             }

    Leave a comment:


  • clerk
    replied
    Escapee, please help. How to derive the parameters for the order the rate of events CellClick when you click on a cell

    Code:
    private void c_MktGrid_CellClick(object sender, DataGridViewCellEventArgs e)
            {
                // this control, in which you need to pass
                BetEdit be = new BetEdit();
                fLP_Bets.Controls.Add(be);
                
                //selectionID
                ????????????????
               
                //Odds
                ????????????????
    
                //color back or lay
                ??????????????????
    
                //runner name
                ???????????????????
            }

    Leave a comment:


  • Escapee
    replied
    CaptnCanary

    Are you logged on to the website when you are seeing those differences between the api and website prices ?

    If you are not logged to the website, then the website prices are at least 15 minutes delayed so will appear different.

    Another possibility, it's caused by betfair's X-Matching bot....
    See this thread for an explanation of how betfair generates synthetic prices which show up on the website but NOT on the API.

    But I think the most likely is you are not logged on to the website when comparing prices

    Leave a comment:


  • CaptnCanary
    replied
    Originally posted by betdynamics View Post
    What have you got your RollupStake value set to?
    Hi. Where can I find RollupStake? I searched through the cs files but cannot see it anywhere. But anyhow, I have not changed anything in the tutorial code so everything should be completely as designed by the OP. Since posting my question I noticed some other behaviour too. When watching in-play football(soccer) odds, the tutorial GUI matches the Betfair market well, but when there is a goal, and the market is suspended then reopened, the odds in the GUI jump around all over the place for a while, whereas the odds on Betfair are stable in comparison.

    Here is another example of the problem on the greyhounds markets but this time over an hour before the race while the odds are not moving at all, in the GUI or on Betfair website.

    Leave a comment:


  • betdynamics
    replied
    What have you got your RollupStake value set to?

    Leave a comment:


  • clerk
    replied
    Maybe website Betfair just opened, and the entrance to your account is not complete?

    Leave a comment:


  • CaptnCanary
    replied
    Originally posted by denvb View Post
    This is a known issue. Simple use this method

    Convert.ToDouble(data, System.Globalization.CultureInfo.InvariantCulture)
    I am completely new to coding but have worked through the tutorial and managed to get it working. Unfortunately, the odds on my GUI are not showing up the same as on the Betfair website. I don't think the problem is quite the same as the one paypascal mentioned but could have a similar solution? I note the suggested code above but do not know where to put this to try it out.
    Here is a screenshot of my GUI and Betfair taken at the same time on a Greyhound market. As you can see, most of it is right but the odds and amount available are not.



    Any help would be much appreciated. Please tell me exactly where to put any suggested code. I will be working on more tutorials to learn C# to help me develop this program further and learn to automate placing bets.

    Leave a comment:


  • chewie22
    replied
    An old thread but I've just gone through the sample for the first time and as you spent the time to create it, I felt obliged to spend the time to thank you for your effort.

    Thanks very much for the generous donation of your time and expertise.

    Leave a comment:


  • Letrix
    replied
    Solved

    Finally I solved the problem.
    Right click on Toolbox->Choose items...->browse file BetfairControls.dll

    Leave a comment:


  • Letrix
    replied
    MenuTree doesn't appear in my Toolbox

    Hello.

    Thank you so much for this very useful and detailed tutorial.

    But I don't have experience in writing programs with windowsforms, buttons etc. and so do maybe stupid mistakes.

    After 25th step MenuTree control doesn't appear in my Toolbox as well as BetfairControls Components and BetfairAPI Components groups of controls.
    And it doesn't appear independently on weather I change from what class MenuTree inherits or not.

    Does someone encountered such a problem?

    I am using VS2010 professional.
    Last edited by Letrix; 01-06-2013, 07:22 PM.

    Leave a comment:


  • Escapee
    replied

    Leave a comment:


  • denvb
    replied
    Originally posted by paypascal View Post
    If anyone else has the same issue.
    This is a known issue. Simple use this method

    Convert.ToDouble(data, System.Globalization.CultureInfo.InvariantCulture)
    Last edited by denvb; 01-04-2013, 11:29 AM.

    Leave a comment:


  • paypascal
    replied
    If anyone else has the same issue.
    Change this UpdateMarketPricesCompressed() in CMarketData:

    RDATA[ind].BackPrice[i].dOdds = BackPricesArr[iTmp].Length > 0 ? Convert.ToDouble(BackPricesArr[iTmp]) : 0;
    RDATA[ind].BackPrice[i].dAmount = BackPricesArr[(iTmp + 1)].Length > 0 ? Convert.ToDouble(BackPricesArr[(iTmp + 1)]) : 0;

    To:

    if (BackPricesArr[iTmp].Length > 0) RDATA[ind].BackPrice[i].dOdds = Convert.ToDouble(BackPricesArr[iTmp].ToString().Replace(".", ","));
    if (BackPricesArr[(iTmp + 1)].Length > 0) RDATA[ind].BackPrice[i].dAmount = Convert.ToDouble(BackPricesArr[(iTmp + 1)].ToString().Replace(".", ","));

    And the same for laying.

    Leave a comment:


  • paypascal
    replied
    I've copied your source code quickly, but the odds aren't functioning right. Do you know what might be causing this?

    I would have simply divided by 10 but the numbers change like this:
    Essence Of Bubbles
    30 305 31
    Which really is:
    3.0 3.05 3.1

    CMarketData.RDATA[r].BackPrice[0].dOdds

    Leave a comment:

Working...
X