Results 1 to 20 of 244

Thread: Bet Angel and Excel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    VBAX Contributor
    Joined
    Sep 2017
    Posts
    128
    Location
    If you mean the section from cells AG45:AK88, this does update at 20m/s the same as the rest of the sheet yes. It is: Stall number, Reduction Factor, Actual SP, Projected SP and Volume Weighted Average Price in that order.

    To get this working to the point I can use it in the market then I will choose two indicators and a confirmation indicator. The MACD previously mentioned will be the momentum indicator along with the RSI to show over/under sold prices.

    RSI: 100 - (100/1+RS), whereby RS = an exponential moving average (14 day average is common, although if I will be using this inlay with extremely volatile markets, something less like a 10-day-EMA may be more approproate). This will return a number between 0-100. A figure of 30 or less shows undersold and 70 or above shows overpriced so we have two triggers. Alternatively, gains/losses were recommended as follows:

    100
    RSI = 100 - --------
    1 + RS

    RS = Average Gain / Average Loss
    To simplify the calculation explanation, RSI has been broken down into its basic components: RS, Average Gain and Average Loss. This RSI calculation is based on 14 periods, which is the default suggested by Wilder in his book. Losses are expressed as positive values, not negative values.
    The very first calculations for average gain and average loss are simple 14-period averages.

    • First Average Gain = Sum of Gains over the past 14 periods / 14.
    • First Average Loss = Sum of Losses over the past 14 periods / 14

    The second, and subsequent, calculations are based on the prior averages and the current gain loss:

    • Average Gain = [(previous Average Gain) x 13 + current Gain] / 14.
    • Average Loss = [(previous Average Loss) x 13 + current Loss] / 14.

    I'd also use the Weight of Money (WOM) to confirm any trend, which is: Best three lay prices / (Best three lay prices + Best three back prices), so for Horse 1 would be =SUM(I46:K46)/(Sum(I46:K46)+SUM(F46:H46)-50%.
    I added the -50% part on myself, this gives readings of -50:50. Anything negative hints at a price drop, anything plus hints at a price increase, anything near 0 hints at no change.

    So if I use these two triggers (+ WOM as a confirmation trigger), my next challenge becomes including these into the VBA code. Originally I was just going to type the function for the formula into the rows under the blue section updating at 200m/s but you said it would be more efficient sticking it straight into the code?

    This leads me back to my biggest misconception of how the code knows where to put everything? If it's all running via code now that adverts the problem but at some stage I still need to show the 'triggers' in specific cells, I was thinking it appearing in the purple section so that the triggers can be called in the green and white section from here with a simple =IF("1",BACK,"") kind of formulas.

    And then absolutely finally, each time a bet is placed, it stays in that green section as confirmation so you need to constantly clear it. I have previously been suggested the following code to do this, would this work? If so, could it be added in to the optimal place in the master code please?:

    Private Sub Worksheet_Calculate()
        If Range("P45:P103").Value = "PLACED" Then Range("PLACED").ClearContents
    End Sub
    I have deleted all my current macros in this project to start fresh (well copied them into a word document for now I should say) so what kind of macros do I put where and what do I fill them with exactly please? There's so many things going on now, it just needs sorting before anything else I think. SamT you are literally a VBAX Wizard in every way!
    Last edited by Aussiebear; 12-31-2024 at 02:16 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •