Bot Trigger - Miro Strategy


sometimes I must kill bets which are too far from "trading edge". Placed by me or by bot.


What do you think, will be useful the parameter which kills bets in the distance bigger than 10 ticks from last traded odds?
For my "healthy" liquidity certainly.


Feature is for:

- running bots; for example if bot offered Open Lay bet at current Odds and the market drifted out; robot may restart after a kill bets

- manual trading; with many open bet - maintains a maximum size of accounts available, for next trading opportunity on market



Updated by Stefan, August 15, 2015

Your new bot trigger offers 4 parameters, the one is mandatory: CsvFile

The default setting for other 3 parameters are: CheckTimeSpan:20.0;BackRange:2;LayRange:6

For those who want to use this bot trigger as an inspiration or as a sample to build your own bot triggers, this bot script shows how to implement the following features:

1) Loading and processing csv file.

2) Filtering bot criteria by two parameters.

3) Implementation of the bot state machine.

4) Stopping not active bots.

5) Executing a bot action in set time interval.

6) Executing a list of action bots with different parameters.

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

Comments ( 20 )

  • Stefan
    11.8.2015 16:33:16

    I will add cleanup feature for running bot, if you stop a bot execution and the bot has unmatched bets these bets will be canceled.

  • Mir.
    11.8.2015 22:02:50

    Nice to see it!



    but I have more better ideas for next type of Execute Trigger Bot...


    We take previous Execute Trigger bot and script MiroBotTrigger.fs and predefined bots will execute FULLY AUTOMATICALLY.


    In Execute Trigger bot trader define trading area; means ticks from Best Back price and Best Lay price and Execute Trigger bot will execute bots fully automatically.

    For example:

    Trading area is: 5/5 ticks



    IF is Odds in trading area -> RUN the bot (with parameters in a row), REPEATEDLY.

    IF NOT -> STOP the bot

    Sample of CSV file contains definition of bots (is the same as the latter):

    If row is missing (Odds, BetType and NameOfTheBot) - do nothing.

    All other Entry Criteria we can solve in AutomateTrigger.fs script...





    VERY EASY... and solves our problem with killing the bots.
    What do you mean?


  • Mir.
    11.8.2015 22:17:45

    BTW: solve this too... bot script - quick help

    "Trading area" can be useful for manual trading too (bot will run only if trader click on inside trading area)

  • Mir.
    12.8.2015 0:02:17

    What I can think of:

    - Execute Trigger bot checks trading area every 5 sec. (+-)

    - kill bot is possible only before Open bet matched


  • Mir.
    12.8.2015 9:29:18

    Clarification of the image:

    Trading area is: 4/5 ticks - there are run 2×9 (9 lay side, 9 back side) bots (all Odds rows are defined and Execute Trigger bot triggered action bots).

    4 + 5 action bot Placed Open bets, 2 matched - waiting for trade, 5 + 4 action bots waiting for Place bet

  • Stefan
    12.8.2015 17:09:31

    If I understand it correctly then you will prepare CSV file describing which bot to execute depending on current (last) traded price, that is your trigger now and not click on a ladder column row as it was in your previous bot trigger.

    It means that BetType, and MinimumOdds or MaximumOdds parameters must be moved to additional parameters section of your CSV file, your previous bot has been overridden those 2 parameters.

    You want the bot to check last traded price every 5 seconds, that is not a problem, but I think a new bot can be triggered only when triggered price changes, otherwise you can execute the same action bot on the same entry point.

    You want to stop previous running bots which are “out of action”, so which placed bets but their bets are not yet fully matched. That could solve the above problem when the action bot is triggered at the same entry point/at the same triggered price (last price traded price), but it is better what I suggest so to trigger action bot only when is triggered at a different price.

    There is another problem you maybe did not notice. There is no status saying a bot have partially matched opening bet, is status is BetPositionOpening and BetPositionOpened, at BetPositionOpened status the opening bet is fully matched.

    It means that stopping out of action bot could leave you with unbalanced bet position if a bet was partially matched. That is bearable if you will manage your position, what I think you do, as this bot has no end condition as well.

  • Mir.
    12.8.2015 20:02:14

    Thank you for your interest.


    Yes, I want to execute bots with the same rules but without clicking on a ladder.

    Because I know where (Odds) and when the bot will start I talk about "trading around the Odds". I explain it...

  • Mir.
    12.8.2015 20:39:24

    Example situation:

    Handy trading -> I clicked on:

    3,80 Back

    3,70 Back

    3,60 Back

    3,50 Lay


    Automated trading:

    Bot executor checks "trading area"  6 ticks from best lay price and 2 ticks from best back price (red square) and execute all bots (rows in CSV) - which is in the area.

    Check every 5-20 sec; if bot ended it can execute again...


    If running bot is OUT OF AREA -  stop it. For example bot [3,40 Lay] now stopped.

    Bots can be STOPPED only before status BetPositionOpened.


    Unmatched bets - partially matched bets:

    my idea is compare unmatched Stake at Odds and Stake in CSV -> if it is possible we can find out how much money we must place as oposite stake.



  • Mir.
    12.8.2015 21:06:17

    Trading around the Odds.

    I intend to use 2 types of bots. Place Bet and Place Bet and Close Selection Bet Position. If I execute bot at definite Odds I can talk about Trading around the Odds. Profit and Loss is clearly too.

    Therefore, I can predefined CSV file (my settings of many bots). No mystery.



    I dont know how to explain but we can take easy statistic for every of action bot:
    We know that bot will start at [3,70 Back] again and again...
    ... and we can collect how many times bot close at profit or loss, ... for developing golden data, ... understand?


  • Mir.
    13.8.2015 8:55:09

    In other words:

    Every bot has unique identification. Odds and BetType. 



    We can run 700 different bots on Selection at the same time (only theory) 


    We can watch bot status of every bot. Easy addressing, easy request, easy control...

    (is bot 3.60-Back running or not) It is possible even if bot has any chasing the price functionality...


    We can collect results of each of bots. Awesome!

    I need a bot which make a profit (Place Bet and Close Selection Bet Position)... and by this feature I find them.