Article

Profit History - first easy trading analyzer

Hi, is there any output from Profit History?

 

------------------

In my full automated strategy I need to analyze some running process. Not for trading, only for analyze - for example usually behavior of market, if profit is bigger or loss smaller anytime, or the profit is oscillating around zero etc.

-------------

Any saved output...

 

Updated by Stefan, August 25, 2015


SaveBotDataBotTrigger uses just one parameter: CsvFolder, the folder name where you want to save your csv files, for instance: CsvFolder:F:\Temp

Bot saves: Bot name;Selection name;Back prize;Back size;Lay price;Lay size;Hedged profit

Download “SaveBotDataBotTrigger” script if you want to test it or build your own script from it.

Comments ( 16 )


  • Stefan
    23.8.2015 20:33:20

    You can save any market data you see in bfexplorer, all those data are available for bot developer, so it is up to you what you save and how.


    In the latest version of bfexplorer I added new method to IBotTrigger interface, EndExecution. So if you implement your bot trigger to listen for bot notifications, you should clean up when bot trigger stops its execution, in the EndExecution method.

  • Mir.
    24.8.2015 19:55:12

    Yes, I know...

    But I only know how to use in-buid features.

    Close Market Bet Position bot write to Output window potential profit. This is only one available posibility for me...

    I used Stop Market Monitoring too. What about implement save data from market into this bot. I think all records from "Output window" and from current market is enough.

    // it is only suggestion. Ask for all other traders if will be usefull for

  • Stefan
    24.8.2015 20:22:41

    Yes Miro I can prepare something, but I think you actually do not know how you will analyze data. From what you said, you want to save market profit value, well ok but how you want to analyze such data?


    I think you should first read some papers about analyzing data. You will not get any relevant information from just one value.


    For instance have a look at on my article: Betfair Tennis Trading and Data Visualization

  • Mir.
    24.8.2015 21:49:23

    I prefer so the most easily trading as can be...

     

    This is afternoon test... full automated trading on 3-4 selections.
    I am sure that will be more profitable if I can cut losses and take profits... on average

    Big profits and big losses - nothing good for premium charge

     

     

     

    ---------------

    BTW: now I need analyse winning streak for my Place Bet Close Position bots - If I have "output" data, each robot will have their name, I can easily find out winning streak - first step for any staking plan

  • Mir.
    25.8.2015 17:47:33

    Thanks.

    -----------------

    My csv:

    PlaceBet_Back_now;Ainslie;0.00;0.00;0.00;0.00;0.00

    - only one row...

  • Mir.
    25.8.2015 22:29:02

    How can I use this “SaveBotDataBotTrigger” script ?
    Perhaps I wasted much time vainly

     

    https://www.youtube.com/watch?v=VOZLI8VuUYE

  • Stefan
    26.8.2015 12:05:22

    Miro, I already mentioned words about using common sense when replying on your other forum post, and we can actually see it now on your video.


    Execute Trigger Bot needs to set the full path name to the bot trigger script file with parameter TriggerFilePathName. When working on your triggers and on my own ones, I was tired to copy&paste the script file name to this parameters, so I added a button (…) on the right side of the input box, when you click on this button the Open file dialog appears and you can select the script file which the Bot Trigger must to open and execute. It is definitely quicker to enter this parameter, and the last used folder is remembered as well.


    We can all see a new button in your video, but you, once learnt to copy&paste script file name you will do copy&paste, well because you are used to mechanically repeat what you saw or what you were learnt to do, and doing it without thinking.


    I added this button 3 version back maybe, so you actually worked with this for 3-5 days without noticing it.


    You know that I used to name bots so the bot name describers a bot activity, and actually explains what a bot is doing and how. For instance Place bet and close selection bet position, well I could simply name it Trading bot, right? Naming this bot Trading bot would be confusing mainly for those who just started to learn what it is trading on betfair.


    I believe that naming it Place bet and close selection bet position, is better as it exactly says what the bot does, so place bet first, and then close bet position. Well English is foreign language for me, but I hope that everyone understands what bet position means.


    I named your script file SaveBotDataBotTrigger.fs


    So what does this bot trigger do? Well, of course save bot data(s), and as I did not mention anything about when/how the bot saves “bot data”, it is at least clear that as the bot saves bot data, this bot must be executed before any other bot is started, as the bot saves bot data for bots which were executed later, and it does so by registering that bot had finished its activity, that bot was stopped, and saving its name, selection on which the bot was executed, and the bet position the bot had created.


    If the bot would save profit history on the market, then I would name such bot:

    SaveProfitHistoryBotTrigger.fs

     

    Well BotTrigger in the name is useless, as the bot actually does not trigger any action bot, but if you have got more files in a project folder then you basically creates your naming convention for files, and this way you can differ different files in its purpose.


    In your video we can see that you executed two instance of this SaveBotDataBotTrigger bot, even if you expected that the bot save profit history data, then I do not understand why you executed/started two instances of this bot, you must clearly understand that profit history, is a market profit balance saved “history”. I think the list of profit balances saves last 60 changes of the profit balance on a market. So I would expect to start the bot only once, as the bot would save market profit history.


    In your video we can see that you installed Visual Studio on your computer, but instead of showing us your bot script file, maybe changed to suits your needs, for instance to not save bot data if bot did not create any bet position, such change requires two additional lines in your bot trigger code, you showed us csv file opened in Visual Studio, well that is frecking unbelievable.


    So you installed Visual Studio, but you did not open Bfexplorer BOT SDK projects, and you did not create a project for your bot scripts, then my question is why you actually installed VS, very huge application installation which took you maybe more than 3 hours to install, but you actually do not know how to use VS for bot development.


    This is really quite strange, but you have got the bot source code, so you have got “documentation”, what the bot does and how, but you were not interested to learn what the bot does, by opening the bot source code in the Visual Studio.


    I would really suggest you to not doing something what it beyond your possibilities, make all your effort to study market prices development on many betfair sports events, then do manual trading and then find possibilities for bot automation, but not by bot triggers development for what you need at least basic understanding of for you are doing.

  • Mir.
    26.8.2015 12:28:53

    Frankly, I do not mind. I make an idiot of yourself you explain function and logic of bots to others...

    Someone else?

  • Mir.
    26.8.2015 13:05:33

    Please, explain me anybody why CSV file has only 1 row and how I can save every bot cycle on the market?

  • Mir.
    6.9.2015 19:35:46

    Well... I explain it for myself.

    "Do you know dude without common sense that it works only if you run the action bots directly on selections?
    If you run full automated trading solution (example: 1. Execute Bots, 2. Execute on Selections, 3. Repeat Until and finaly action bot 4. Place Bet and Close Selection Bet Position...)

    SaveDataBot doesnt work."

    -----------------------------

    PS: I dont need any modification