Author Topic: Updating list of bets [TCKTQVO-361385]  (Read 12792 times)

Tags:
  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Updating list of bets [TCKTQVO-361385]
« Reply #15 on: 30 Dec 2013, 16:59 »
hi
all good traders will tell you that it is not good to leave an open trade, hoping that it will get matched,but to create multiple open trades is not good at all.
are you sure that you want to create multiple open trades, it would be better to close the trade x seconds after the unmatched bet was placed or if the price goes x ticks against you and take a small loss, then try again.
what do you think.

mcbee
Please read the following  disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 211
Re: Updating list of bets [TCKTQVO-361385]
« Reply #16 on: 30 Dec 2013, 20:18 »
Hi,

I understand what you mean, and i thought about that too. But that would be a simple case of scalping with stop losses and i doubt that i can earn money with that. It would be too simple, too easy.

Probably you right it´s not the best idea to let an open bet in the market, but i intend to develop the trigger step by step, testing new ideas. Anyway i intended in the future to create a condition to estabilish a maximum (and small) number of open back and lay bets in the market.

But 1st what comes 1st. I was studying the trigger you sent me and i´ve some questions. If possible i would like you to enlighten me about it:


1- Why are there two sets of "OR" conditions. I can´t understand the necessity of the 2nd one and therefore of the variable "si". I noticed that in the 1st "OR" block "the number of matched back bets" is equal to zero and in the 2nd greater than zero. Can´t we delete that condition in the 1st "OR" block and the entire 2nd block? I made it and i can´t see the diference in the trigger behavior in relation to the trigger you sent me (trigger with changes attached)

2-market_mbnumsi: market_mbnum is defined in the manual as" The number of all matched back bets in the market.". What´s the meaning of market_mbnumsi, the same as market_mbnum?

3-IF(si=0,r_1_sel_index,r_1_sel_index): Supposing the "IF" condition works like in excel (what i am not sure about), this condition is equal for both si=0 and si≠0. Can´t we just write "r_1_sel_index"?

Thanks :):):)

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Updating list of bets [TCKTQVO-361385]
« Reply #17 on: 30 Dec 2013, 22:26 »
hi
the first condition block placed the bet on the favourite.
the second condition block placed further bets on the selection that was the favourite.
without the second block, you could be placing bets on different selections that reach the favourite, if and when the prices are very close, because the first and second favourite,changes position as the prices move.
the market_mbnumsi  is a mistaken variable, it should be market_mbnum without the si. ??? :o
the si is the selection index number.
the first action is to set the si to 0 if it is the first bet placed.
the IF(si=0,r_1_sel_index,r_1_sel_index) is to set the si to the correct index number.
without the first action and the last action the si could retain the wrong index number.

with this trigger you can set
time to stop placing bets
bet amount
maximum number of back bets
maximum number of unmatched back bets
maximum number of unmatched lay bets

please use test mode until you are happy with your settings

mcbee

download the trigger below
Please read the following  disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 211
Re: Updating list of bets [TCKTQVO-361385]
« Reply #18 on: 31 Dec 2013, 04:24 »
Hi mcbee,


I am not sure if i understood what´s the purpose of the 2nd condition´s block. ??? ??? ??? If its objective is to continue putting bets in the same selection (horse) even when the odds change enough to establish a new 1st favorite, at least in the tests i made it doesn´t do that. It seems that when it´s established a new 1st favorite the settings of the "si" variable  change to the new selection´s index, and therefore it puts bets on the new 1st favorite.

I understood the purpose of the "IF(si=0,r_1_sel_index,r_1_sel_index)". I just don´t understand the need to make an "IF" condition. If it works like in excel it would be enough to establish an unique formula for all the "si" values (r_1_sel_index).

I tested this new trigger you sent me today, and i am having some problems with it. As i don´t want to make things even more complex than they already are, i will continue using, the previous one, as my basis.


Please comment


Happy New Year ;D ;D ;D


  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Updating list of bets [TCKTQVO-361385]
« Reply #19 on: 31 Dec 2013, 06:47 »
hi
yes you are correct, i think the festive spirit is getting to me.  :P
the formula should be
IF(si=0,r_1_sel_index,si)
so if it is the first bet then selections index else the previous index.
i have added some new constants to this trigger
you can now set
time to stop placing bets
bet amount
maximum number of back bets
maximum number of unmatched back bets
maximum number of unmatched lay bets
Place a new bet if the last lay price increased by                                      ticks
Time to place a new bet if the last lay bet is unmatched                  seconds

please use test mode until you are happy with your settings

mcbee

download the trigger below
Please read the following  disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 211
Re: Updating list of bets [TCKTQVO-361385]
« Reply #20 on: 02 Jan 2014, 01:58 »
Hi mcbee,


The last trigger you sent me seems really great.  ;D ;D Even so, i detected the time condition wasn´t triggering. I checked out and it seemed to me the correct formula should be "trigger expression...now_time... is equal or greater than bu_laytime+(mf_second*tnb)".Am i correct?

Anyway i am not sure if i will use that time condition. In the preliminary tests i made it wasn´t profitable. As expected it seems you were right. :):)

One of the possibilities that i´ve is to place 2 simultaneous bets: the back bet at lay price and the lay bet at back price. Which one of the 2 possibilities you advise me to use? This one or the one you use in the trigger?

Continuing to improving the trigger, i would like to hedge seconds before the off. How can i do it?


Thanks and Wishes of a Great Year :):):)

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Updating list of bets [TCKTQVO-361385]
« Reply #21 on: 02 Jan 2014, 07:13 »
hi
Quote
I checked out and it seemed to me the correct formula should be "trigger expression...now_time... is equal or greater than bu_laytime+(mf_second*tnb)".Am i correct?
yes, it is good that you are looking at the manual and learning quick. ;D
Quote
One of the possibilities that i´ve is to place 2 simultaneous bets: the back bet at lay price and the lay bet at back price. Which one of the 2 possibilities you advise me to use? This one or the one you use in the trigger?
you would be better to test both, to see which one gets the most matched and makes a profit.
Quote
Continuing to improving the trigger, i would like to hedge seconds before the off. How can i do it?
use a distribute loss trigger, with a time condition.

happy new year
mcbee
Please read the following  disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 211
Re: Updating list of bets [TCKTQVO-361385]
« Reply #22 on: 03 Jan 2014, 03:59 »
Hi,


I continue developing my trigger. Now i am fighting to create a stop losses triggered by a time limit. As i chosed to establish the maximum number of both unmatched lay and back bets greater than one, my basic knowledges don´t allow me to what i want. ??? ??? ???

I want to establish a time limit canceling just the unmatched bet that overpassed that time limit and placing a similar bet in the market. Is it possible?

1st of all i can´t find the right time expression.  I know bu_laytime and bu_backtime, but these are related to the last unmatched bet. And as obvious i would like to cancel the oldest (1st) unmatched bet, not the last.

In 2nd place i can´t find a way to cancel just that 1st unmatched bet, The trigger as it is now, cancels all unmatched back or lay bets not just the one that overpassed the time limit. As it places just 1 bet usually, unlike i wanted, it creates a big diference between the number of matched lay and back bets.

I send the trigger attached

Thanks :):):)

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Updating list of bets [TCKTQVO-361385]
« Reply #23 on: 03 Jan 2014, 07:09 »
hi
what you ask is not possible with the cancel and bet times, because they only record the last bet time.
i will try and do a work around using variables to record the times and prices, when the bets are placed.
but i am not sure that it will work how you want.

mcbee
Please read the following  disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 211
Re: Updating list of bets [TCKTQVO-361385]
« Reply #24 on: 03 Jan 2014, 20:38 »
Hi mcbee,

I am looking forward to see it. ;D ;D ;D


Thanks

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Updating list of bets [TCKTQVO-361385]
« Reply #25 on: 04 Jan 2014, 14:17 »
hi
here is a trigger for you to test.
same constants, but i have added variables to record the times and prices of the bets.
then match the price in the cancel trigger to the price of the first bet etc.
the only problem been, that there is an extra bet at times because when the trigger cancels a bet the other trigger wants to have ago.
also start with a small number of placed bets, your previous setting of 400 could end up taking you above the limit as 400 times each market every 10 minutes, is about 2400 bets per hour.

please use test mode until you are happy with your settings

mcbee
download the trigger below
Please read the following  disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 211
Re: Updating list of bets [TCKTQVO-361385]
« Reply #26 on: 04 Jan 2014, 21:53 »
Hi mcbee,


Really thanks for your time and attention, i will check the new trigger and try to understand it.

As soon as i had studied it i will give you feedback.  ;D ;D ;D

  • All members
  • Posts: 211
Re: Updating list of bets [TCKTQVO-361385]
« Reply #27 on: 06 Jan 2014, 07:02 »
Hi mcbee,


I have been studying the trigger and it seems a quite ingenious idea.

If i understood well you would save for both triggers scalpit and scalpit2 the times and prices at which bets were placed. Then you would use those times and with the "more options" conditions in the cancel triggers you would determine that just the single bet that has the right amount should be canceled. Am i right?

Unfortunatly in the preliminary tests i made i detected what seems to be some problems:

1-The price expressions for unmatched lay and back bets on both scalpit and scalpit2 are the same. That can cause problems when there are more than 1 unmatched lay or back bets:

If there are 2 bets and those bets were placed by the same trigger it updates the prices and the time expressions to the values of the last unmatched bet. So the cancelled bet would be the last one or both in the case they have the same price.

If those same 2 bets were placed by diferent triggers, the price and time expressions of the 1st bet doesn´t change when the 2nd bet is placed, but just when a new bet is placed by the trigger that put the 1st bet. That will just happen when one of these 2 bets is matched. In the cases where the bets were placed by diferent triggers there wouldn´t  be a problem.

2-strangely the "Stop Losses Lay scalp 2" trigger seems to be activated before the time condition is achived. I can´t understand why it says "condition is true" when it didn´t arrive to the required 30 seconds since the bet was placed. ??? ??? ???

3-Also in the "Stop Losses Lay scalp 2" trigger i guess the condition must be "and selection´s lay price is greater than s2lp" instead of s1lp.

4-Is in the stop losses necessary the condition "and selection´s lay/back price is greater/less than"?It´s the reason why they are unmatched. Is it necessary to use it? ??? ??? ???

5-The close block condition makes that sometimes a single bet remains in the market not letting another one to be placed. As you noticed before it´s a condition i don´t know very well. Is it required here, or i could do it without it?

As i told you i just made preliminary tests and you know that i just have basic knowledges of MFD. So, there´s a good probability that i am saying nonsenses mainly in the 1st point due to its complexity.  ;D ;D ;D



  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Updating list of bets [TCKTQVO-361385]
« Reply #28 on: 06 Jan 2014, 08:42 »
hi
Quote
1-The price expressions for unmatched lay and back bets on both scalpit and scalpit2 are the same. That can cause problems when there are more than 1 unmatched lay or back bets
yes, this is a problem when you place a bet twice on the same selection, maybe it would be better to have the second betting trigger with a condition that the lay or back price is 2 ticks lower than the unmatched bet from the first betting trigger.
Quote
2-strangely the "Stop Losses Lay scalp 2" trigger seems to be activated before the time condition is achived. I can´t understand why it says "condition is true" when it didn´t arrive to the required 30 seconds since the bet was placed.
i will do more tests to see why and to see if i can add another condition to correct it.
Quote
3-Also in the "Stop Losses Lay scalp 2" trigger i guess the condition must be "and selection´s lay price is greater than s2lp" instead of s1lp.
yes you are correct, when i cloned the triggers, i forgot to change it, you are learning fast, that is how i learned about triggers, by looking at the conditions and working out what each one does.
Quote
4-Is in the stop losses necessary the condition "and selection´s lay/back price is greater/less than"?It´s the reason why they are unmatched. Is it necessary to use it
that is to give the last unmatched bet chance to get matched.
Quote
5-The close block condition makes that sometimes a single bet remains in the market not letting another one to be placed. As you noticed before it´s a condition i don´t know very well. Is it required here, or i could do it without it?
i tried using the no more than x seconds and the triggers placed to many extra bets, due to the first and second betting triggers picking up that there were no unmatched bets when the cancel trigger canceled the unmatched bet, so the betting trigger sent a bet out and the cancel trigger sent a bet out, so it ended up with more lay bets than back bets or more back bets than lay bets thus leaving the profit/loss way off.
i can see why you are trying 2 bets on the selection, but it would be better to use 1 bet and if it goes the wrong way by 2 ticks, take a small loss and try again .

mcbee
Please read the following  disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 211
Re: Updating list of bets [TCKTQVO-361385]
« Reply #29 on: 07 Jan 2014, 04:26 »
Hi mcbee

Quote
Quote
2-strangely the "Stop Losses Lay scalp 2" trigger seems to be activated before the time condition is achived. I can´t understand why it says "condition is true" when it didn´t arrive to the required 30 seconds since the bet was placed.
i will do more tests to see why and to see if i can add another condition to correct it.
I checked out and strangely the same problem happens in the other triggers. In the "stop losses lay scalp 2" trigger i noticed that it happens, for example, when there are 1 unmatched lay bet placed by the scalpit2 trigger at the price bu_layp (s2lp) and a new bet is placed by the trigger scalpit. As the scalpit trigger puts the lay bet at lay price that bet is, hopefully, automatically matched and the s2lp becomes the new value for s1lp. Having said that, i couldn´t find out why it happens. It´s almost like in that situation and for that bet the s2t becomes zero. But i checked out the logs and there is nothing there that points to that. ??? ??? ???


Quote
Quote
5-The close block condition makes that sometimes a single bet remains in the market not letting another one to be placed. As you noticed before it´s a condition i don´t know very well. Is it required here, or i could do it without it?
i tried using the no more than x seconds and the triggers placed to many extra bets, due to the first and second betting triggers picking up that there were no unmatched bets when the cancel trigger canceled the unmatched bet, so the betting trigger sent a bet out and the cancel trigger sent a bet out, so it ended up with more lay bets than back bets or more back bets than lay bets thus leaving the profit/loss way off.
You are right that´s one of the problems of having 2 unmatched back or lay bets. I noticed that if both bets have the same price they would be both canceled and as only a new one is placed it causes an unbalance. I think that´s a problem that could be solve:

1-Should be placed each new bet with a diferent amount: You can place a new lay or back bet increasing or decreasing the amounts for example  by bm_laynum*0.01. Probably you would not be able to automatically hedge on each pair of bets.

2-Should be set new users variables for saving the bet amounts (e.g. s2ba). They would replace the the price variables.

3-The price condition in the "more options" should be changed for (e.g priced between 0.01 and 10). It will be irrelevant now.

4-The bet size condition should be set in the "more options" for bet size between...(e.g if(bu_backnum=1,s2ba,0)...and...if(bu_backnum=1;s2ba,s2ba-0.01)).

It´s all too theoretical. The basic idea is to use the amount instead of the price to caracterize diferent bets.

As it´s useless to test it before solving the time problem in the close triggers i didn´t make the necessary changes in the trigger, so i am not sure if it is even near of working.  ;D ;D ;D

I would like to know your opinion. :):):)

 

Please note, BetFair is seems to be currently OFFLINE