Author Topic: place bet and keep it until its matched or no longer acceptable  (Read 4927 times)

Tags:
  • Élite
  • Posts: 3698
  • Gender: Male
*
hi
what is your trigger not doing that you expect it to.
the variable marketIndex is set by the trigger and the info is kept for each market.

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: 314
hi mcbee,

as per the description above, if the first bet has been placed, then the next trigger is fired, BUT, as we have exceeded the boundary of the times, set between mao and maom (50 - 60), then, the marketIndex variable, when checked, has no value.

I was hoping that my description above was clear, which it seems not to be?

between 50 and 60 minutes, the marketIndex value is set, and this is the score AT THAT time.... ANY TIME AFTER that, the score can change, and so, the index of the market will also change. BUT, when I want to check the index of the market now, IF AND ONLY IF, the current index (score) is the SAME as the score at the first bet, THEN, AND ONLY THEN, it will place a further bet, 2 ticks below the previous bet.

I really do not know how to explain this very simple condition, any clearer.

You ask what the trigger is NOT doing...

Well, once the first bet has been matched, then the next trigger will fire, BUT, the check is being done against marketIndex - which is the variable containing the score at the first bet placed. BUT, this score may have changed, and so, the index will have changed. So, after 70 minutes into the match, once the first bet has been placed, the marketIndex value is no longer able to check the score because of the time boundary, which is now outside 60 minutes.

I need to be able to, in C# parlance, be able to have a static variable and keep the score at the time of the very first bet. Then, any further triggers, will then look at placing a bet AT THAT SCORE only...

When any of the next triggers check the marketIndex variable, it can no longer be evaluated, because the time has expired - and so, to follow on from this, I cannot regenerate the marketIndex value, because, the score may have changed, which will mean the ORIGINAL marketIndex value, will not be the same as the NEW marketIndex value.

I really want to know how I set a value, and keep it, for the duration of the match, and not on a global scale, at just after the half time point, during the half time period.

Mark.

  • Élite
  • Posts: 3698
  • Gender: Male
*
hi
just add another variable to the mktIdx trigger to record the score.
set user variable  hts  market_score1+market_score2
then use that variable in your betting triggers


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: 314
hi,

That cannot work, because, as time goes by, market_score1 and market_score2 will change, if a goal is scored, and so, when they change, the markets index will change, and the objective is to place the bet in the same index, using a drip lay, as per the triggers definitions.


if at half time, the score is 0-0, then the marketIndex will set its value as 1.... The initial bet is placed, where the markets index is 1...

Now, 10 minutes into the second half, a goal is scored, and it is now 0-1, and so, if we examine the current score index, it will now be 2, and this is NOT what I want. I only want to place a bet at market index 1. Of course, at this time, it is not possible to place a bet at score of 0-0, because this is not a valid score.. So, hopefully, you can see that I only want to place the bet, at the original market index, and if that is no longer possible, then the bet will not be placed...

Now, after 80 minutes, if no goal has been scored, since half time, then the selections market index will be 1, and a bet can be placed, BUT, only where marketIndex has a value, and of course, marketIndex has expired, and so, there is no index value possible. I cannot re-check the index at this 80 minute point, because, it is conditional that we only have the index of the market sat at half time point, so, even if there is no further scoring, it cannot be valid to look at marketIndex at that time.

the essential NEED is to be able to store whatever the score is, at half time, and keep this in a variable, and then, even at 85 minutes, if I check this stored value, it will be and always will be, the value as it was at half time. and even if a goal has been score at 65 minutes, then, any new bets will still be placed at the OLD market index (score), even if it snot possible to have a bet at this point.

the initial value of the market index needs to be stored, and no matter what happens after this time, I want to be able to reference this SAVED value, and even if the score changes, then, I still want to be able to get the original value..

There does not seem to be a way to store a value and keep it. The value I want, is the current score at half time, and as per the Value set in the marketIndex, this is the value I want, and no matter what happens afterwards, I only want to have the original value stored.

This is the value I need, and not some changing value.

Mark.

  • Élite
  • Posts: 3698
  • Gender: Male
*
hi
yes i know as time goes the score will change.
SO in the other triggers you have the condition
and selections trigger expression market_score1+market_score2 is equal to hts (or whatever you name the variable)
reason been if at half time the score is 1-0 = 1
if there is another goal market_score1+market_score2 will be 2 and so on
so the other triggers will not place a bet because the score is not the same as the recorded score at half time

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: 314
hi,

the important thing here, is we need to check the index of the selection...

as in if the score at half time is 0-0, then the index is 1
if the score at half time is 0-1, then the index is 2
if the score at half time is 0-2, then the index is 3

its the INDEX that is the critical value, and we can only evaluate the markets index at half time, using the triggers Value calculation. And following this, we need to be able to store this value, and the critical word here, is 'store', and at no point in time afterwards, can this value change, kind of like a static value in C#;


in your response, you say if at half time the score is 1-0, then it has a value of 1, because market_score1 + market_score2 = 1

what if the score is 0-1, then, the value is still 1... as in market_score1 + market_score2 = 1

I appreciate the score cannot be 1-0 and then have another value of 0-1 at some other time, but, the principle remains the same, it should ONLY be a value which is specific to the markets index, and whatever score happens AFTER, then, the index will have a different value, and it is this change that I want to avoid - I simply need the original value of the markets index, at half time.

The trigger mktIdx sets the user variable marketIndex, but, due to the condition that this value can only be set in the half time period and at no other time, then, we need some way to be able to store the market index value, and so, the marketIndex value can only be set during the half time interval.

This is the only way this can work, and I cannot figure out how to do this, and honestly thought this would be a common requirement within trigger creation, and yet, it is proving to be a somewhat impossible task.

Mark.

  • Élite
  • Posts: 3698
  • Gender: Male
*
hi
i think that you are complicating was is not complicated.
you have already stored the index number in the marketIndex variable the trigger only activates once so the value cannot change.
the new variable will be used to check that the score is the same value as at half time.
job done , the other triggers will only send a bet on the recorded index if the score is the same as half time.

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: 314
hi mcbee,

I wish it was true that I am complicating a simple case...

The trigger is not working, and when I observe the marketIndex variable through the User Variables, its value is set at marketIndex...

I even set the initial time to be 10 minutes, so I could see what happens.. Still same result.

Mark.

  • Élite
  • Posts: 3698
  • Gender: Male
*
hi
i have looked at your trigger and it works as it should, but the first trigger needs to be set to favorite and once per market.
the marketIndex has the correct value after the trigger has activated in this case after 10 minutes, then the lay bet is placed.
if you require the trigger altered or checked you will need to make a trigger request.


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: 314
OK,

we will have to agree to disagree.

I have explained in more detail than I care to say, how, and why this DOES NOT work, but you seem to disagree.

Your response to claim that I was over complicating things was totally unwarranted, and without wanting to be nasty, you clearly do not understand the logic behind this question.

This is supposed to be a forum to help users to develop triggers, and if they are having trouble, it should be a free place to ask for help, but, quite clearly, when the 'experts' here, do not fully understand the question being asked, it is then switched to a 'you must make a trigger request', which, in my honest opinion, is ridiculous, because what use to me would asking for a trigger be? Would you develop a trigger in the same way that I would? This is unlikely because we have different ways of thinking, and as always, 'my way is best' - and I am sure you have the same opinion of your own working. If I ask for a trigger, I would then have to re code it to fit with my standards, and my days of refactoring other peoples code have long since passed.

I asked what was a very simple question - how do I set a value and have it persist. And of course, there were complications involved in this, because of the conditions involved in setting these things up. After observation, through this User Variable interface, to check the marketIndex, I can see, quite clearly, that marketIndex does not persist, and yet, you send me a response to say that it does work. If I could see that it was working, do you honestly think that I would keep asking for help on this?

What I will also say, is that setting the favourite is not the way to do this,because, even though the current score should be the favourite, this is not always the case in the market interface.

I accept that I may not fully understand the workings of this software, hence the reason I have asked for help.

Even my questions may be a little long, for such a simple request, and I do it this way to hopefully present my requirement in as much detail as possible.

This would be incredibly easy to do in C#, but I don't have that luxury here.

I do appreciate any help that is given, and always send my thanks.

I will just have to try and figure out a different way to look at this.

MFP is a very good product, but getting ideas into a trigger, are quite tiresome at times

Mark.

  • Élite
  • Posts: 3698
  • Gender: Male
*
hi
here is a screen shot of the bet and the variable info.
i am only trying to help you.

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: 905
This seems to be a silly impasse.   If you set a user variable at any point in a market, in my experience it will persist until the trigger is reset or the program restarted.  I suggest you put in a request for a free trigger to undertake your requirements.  This will be written by a trigger compilation expert, one of whom is mcbee.;)

  • Moderator
  • Posts: 3597
*
Hi
in your last uploaded trigger file, in the mktIdx trigger, you have:
selections: all matching selections
execute: one time only
markets minutes since the off is greater than mao

this means the trigger will run once for each matching selection, i.e. multiple times at anytime after mao, but only on the first market of the day because
the execute field is set as one time only, which means the trigger will be applied only in the first market of the current trigger session
please check the manual on the trigger action "set user variable", this behaviour is highlighted in the description.

in reply#23, mcbee suggests a way to ensure this trigger runs once per market, only on one single selection, in his example he uses the favourite. It can be any current single selection, or "first matching selection", as well as changing one time only to once per market.

selections: favourite (or second fav) (or "first matching selection")
execute: once per market

I think if you do this, you will find the marketIndex variable contains a static value appropriate to each market.
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.

 

Please note, BetFair is seems to be currently OFFLINE