Article

Custom bot script - 3. MiroGapStrategyBotTrigger

Strategy bot trigger

Simply I need bespoke trigger which will execute:

- different bots (from: My Bots)
- at different odds (relatively: in ticks from saved best offers)
- execute not far than x ticks from current best price on selection

 

I will explain it on this picture:

 

1) bot waiting for situation like on pictures:
If GAP between best current prices (back vs. lay)  is 0 or 2 -> remember best back price and best lay price (odds close together) - in this case 3.55 and 3.50

On the picture on the right side (with GAP = 2) is the same case. (Odds close together - 3.55 and 3.50 - inside the gap)

2) Now the Bot trigger easy execute any bots with this trigger parameters:

0;Back;PlaceBet   ... 0 = tick from best remembered Back offer (Odds = 3.55), Back = To Back side (StakeType = Back), PlaceBet = name of the bot from My Bots
1;Back;PlaceBet   ... 1 = tick from best remembered Back offer (Odds = 3.60)
2;Back;PlaceBet   ... 2 = ticks from best remembered Back offer (Odds = 3.65)
5;Back;PlaceBet   ... 5 = ticks from best remembered Back offer (Odds = 3.80)
...
0;Lay;PlaceBet   ... 0 = tick from best remembered Lay offer (Odds = 3.50), Lay = To Lay side (StakeType = Lay) , PlaceBet = name of the bot from My Bots
1;Lay;ClosePositionAtOddds   ... 1 = tick from best remembered Lay offer (Odds = 3.45), .... ClosePositionAtOddds = name of the bot from My Bots
2;Lay;PlaceBet   ... 2 = ticks from best remembered Lay offer (Odds = 3.40)
...
etc.

***********************
Behavior:
bot trigger takes trigger parametres, parse (relative to concrete Odds, StakeType), and use in bots from My Bots (if needed)
***********************

3) Limitation for runnig robots (placed bets) for selection.
Execute a bot only if is near x ticks from current best price - green arrows Trigger parameter:  Range = 3, the same on To Back side and To Lay side. All robots at Odds in (orange rectangles) executed.

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

This bot trigger is like stencil, combo of bots on selection...
Repeatedly the same.

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

PS: I would also use these kinds of bot trigger... Like specific action bots  http://bfexplorer.net/Community/BlogContent/81?page=1 ... I think to use: Odds, StakeType

This is similar http://bfexplorer.net/Articles/Content/84#Bot Trigger - Miro Strategy but this trigger is static, no kill any bots - only runs, like stick a pin and trade around

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

Updated by Stefan, March 20, 2016

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

 

Comments ( 3 )


  • Stefan
    16.3.2016 12:45:07

    I hope I will find some spare time in following days, will let you know when it is ready.

  • Mir.
    16.3.2016 13:01:13

    Thank you very much.

    --------------------------
    My expression in English is not good. If you have any questions, please email me.

  • Stefan
    20.3.2016 17:46:19

    There is problem with gap detection, for now bot triggers action bot execution even if a gap is 1 tick only. In the code line:

    if selection.GetOfferedPriceDifference() >= 2

    the correct gap detection should be:

    if selection.GetOfferedPriceDifference() > 2