+ Reply to Thread
Results 1 to 13 of 13

Tracking a staking system problem, stop at x%

  1. #1
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Tracking a staking system problem, stop at x%

    Hi guys thanks for taking the time to look at my problem.

    I have created a betting system but i do not have the ability with either formulae or macros to track it over historic data. What i would like to do is to track this system as a "stop at %threshold profit system" This system would look at column H at the start of the day, if at any point during a given day it became x% higher than at the start of the day no further bets would be placed that day. This would need to take into account any other bets within a given event (each event array is seperated spatially in column A.) There is also one further problem to add to this task, in that the historic data i have goes down more than 300,000 rows which i believe maxes out any arrays in formulae of macros?

    Please view example to understand further (hopefully)

    Many thanks
    Attached Files Attached Files

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Tracking a staking system problem, stop at x%

    ad9051,

    I took a look at the example file, and I have a few questions.
    • Where do you want the output? (Should it be somewhere on the same sheet as the data, or on a new sheet, etc)
    • In your example results, the start for 10/25/2011 is 100, and then end for 10/25/2011 is 73.97004 and you state that that is row 410. Row 410 contains the last cell dated 10/25/2011 for column A, but the last cell dated 10/25/2011 for column B is 414 (results are identical though). Does that mean you want start/end to go off of the dates in column A?
    • For 10/26/2011 the start is 73.97004 and a 2% increase would be 75.44943809 or higher. The first row containing a number exceeding that for 10/26/2011 is 898 with a value of 75.9054 but in your example results, you state the finish is on row 962 with a result of 87.08526 so I'm confused on what the logic is behind how you got that result vs the explanation given.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Re: Tracking a staking system problem, stop at x%

    Hi Tiger, thanks for taking a look and apologies it isn't clear enough.
    - I would like the output either in this sheet as a list in one column or another sheet either is acceptable. It would be nice if any macros would reference a threshold cell, so that the model can easily be changed from 2% to 3% and so on, for optimization.
    - With regard to day one shown, (25/10/11) the results are identical. On this particular day any stop at x%profit system wouldn't have 'got out.'
    - With regards to my example you are correct the first time this occurs is row 898, however because there are several stakes within that event, at the end of that event it is sitting at 74.39, not above the 2% threshold ( each event is defined by the arrays shown in column A.)

    I hope this makes sense.

    Many thanks

    Alan

  4. #4
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Re: Tracking a staking system problem, stop at x%

    Hmm could really use some help on this one. Many thanks

    Alan

  5. #5
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Re: Tracking a staking system problem, stop at x%

    Sorry guys i have to bump this one. Many thanks

    Alan

  6. #6
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Tracking a staking system problem, stop at x%

    Alan,

    I'm afraid I don't fully understand the requirements or logic used to reach the intended results. Referencing a threshold cell is easy enough, but can you walk me through, step by step, the logic used to accomplish the goal?

  7. #7
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Re: Tracking a staking system problem, stop at x%

    Hi Tiger, i know that if you cannot understand it then there is a problem with my explanation, normally you interpret the problem correctly every time. I have amended my example with annotations and a potential method to achieve the required result. Once you have understood the aim, you may know of a better way of achieving the goal. Any method would be acceptable, please let me know if there are ant parts you don't understand, its always so easy for the creator of a problem to overlook the fact that any reader may not be familiar with such a system/problem type. Apologies for this.

    Thanks so much for your time.

    Best regards

    Alan
    Attached Files Attached Files

  8. #8
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Tracking a staking system problem, stop at x%

    Alan,

    Attached is a modified version of your most recent example file. After modifications, I was at 1.02 MB so I had to zip it to attach it here.

    I don't think I fully understand all the requirements because the macro I came up with seemed to hit some "False Positives". As far as how to prevent that, should the macro look at the end of day line first, and if it does not meet or exceed the profit threshold, there were no winners for the day? Even if, at some point during the day, the threshold was exceeded?

    Anyway, here's the macro I came up with. I commented it as much as I could so you can alter it as needed. At least it's a starting point:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Re: Tracking a staking system problem, stop at x%

    Wow, longest macro i have seen. Ill test it now, thanks soo much!

    Alan

  10. #10
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Re: Tracking a staking system problem, stop at x%

    As far as how to prevent that, should the macro look at the end of day line first, and if it does not meet or exceed the profit threshold, there were no winners for the day? Even if, at some point during the day, the threshold was exceeded?
    No the macro should not look at the end of each day. But it does need look at the end of each array (so for instance) in row 898 this is a false positive because at the end of that event (row 907) is not above the required threshold, the event arrays can be found by looking in column A.

    The macro is close and i love the output table. Will make graphing very easy.

    Also in my example i have manually put the 1's in column L to stop the staking being the same as the continuous bank (column g). The macro would need to identify the row below the end of an event array which achieved the 2%, it would then need to insert 1's into column L down until there was a new day. For instance threshold is achieved in row 1083 (end of event array) where as it is not achieved at the end of the event array related to the row 898 win. So in this case the macro would be required to put 1s in L970:L973. If the macro can be made to do this, and the line :
    Please Login or Register  to view this content.
    is turned to Column K instead.
    Then i believe the macro will achieve the goal. Just for your interest columns F-H is a continuous staking plan, easy for me to model via formulae, where as columns I-K (Affected by the 1's in column L) is a stop at x% (in this case 2%) staking plan.

    Essentially the difficult thing to do with 300,000 rows of data is to identify the bank at the start of the day and then identify the array end which is above x% and insert 1's in column L.

    I really do hope this makes sense?

    Thanks so much

    Alan

  11. #11
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Tracking a staking system problem, stop at x%

    Alan,

    Made some changes to the code. It now clears the L column and puts in the 1's in the L column where appropriate. It uses the arrays in column A to check if a win actually happened or not. Let me know if it is now returning the correct results, or if it still needs tweaking.
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    12-01-2010
    Location
    Southampton, England
    MS-Off Ver
    Excel 2007
    Posts
    303

    Re: Tracking a staking system problem, stop at x%

    Works a treat! Thanks so much!

    Alan

  13. #13
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Tracking a staking system problem, stop at x%

    You're welcome, and I'm glad to hear that did the trick

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1