Author Topic: Delete a market if another market does not exist  (Read 7427 times)

Tags:
  • Élite
  • Posts: 111
  • Gender: Male
*
Example

I load "MO, CS and OU markets.
A delete trigger deletes markets from each group of them according to a logic.

So, in "My markets" I have "parent" matches where MO or CS or OU2.5 is missing (due to my previous delete trigger)

I would like to delete the markets where MO or CS or OU2.5 is missing.

Any ideas?

Regards,

Theodore

  • All members
  • Posts: 905
Re: Delete a market if another market does not exist
« Reply #1 on: 08 Sep 2012, 07:47 »
You need to use a remember trigger using market_parent_id.

So:

Remember   delete_market_parent_id     Individually for each market   the delete part is your variable name so can be anything you want

Conditions:
Markets Name Contains ....whatever market you are using in your logic
.................
.................   other conditions


Delete Market trigger:

Conditions:
Global User Variables delete_market_parent_id are set



  • Moderator
  • Posts: 3597
*
Re: Delete a market if another market does not exist
« Reply #2 on: 08 Sep 2012, 07:48 »
Hi
Add another action to your first delete trigger (before the delete action):
set uservar, value: market_parent_id, individually for each market

In your second delete trigger:
condition: selection’s trigger expression market_parent_id is equal to uservar
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
Re: Delete a market if another market does not exist
« Reply #3 on: 08 Sep 2012, 07:53 »
I think that is a better solution, good reply.Mark.  Mine would only have worked where you were always using the same market for the delete logic.

  • Élite
  • Posts: 111
  • Gender: Male
*
Re: Delete a market if another market does not exist
« Reply #4 on: 11 Sep 2012, 05:18 »
Hi Mark,
I tried that. I think it is a little bit more complicated. Let me explain.

Example

I load all today MO, CS, OU markets via the market locator.

A first trigger deletes alll markets except those whose names contain "Match Odds - Match Odds" or "Over/Under 2.5 goals" or "Correct Score - Correct Score"

A second trigger (with 2 actions):

First action
Sets a uservar mydeletedmarkets=market_parent_id, individually for each market 

Second action
Deletes markets where the following conditions are not met:

Market names contain "Match Odds - Match Odds"
   and s_1_back_price is equal or less than 1.65
          or  s_2_back_price is equal or less than 1.65
or Market names contain "Over/Under 2.5 goals"
    and s_2_back_price is equal or less than 1.8
or Market names contain"Correct Score - Correct Score"

A third trigger deletes all markets where:
market_parent_id = mydeletedmarkets

Let's suppose that in a market_parent_id
1. The MO s_1_back_price and s_2_back_price are greater than 1.65
2. The OU s_2_back_price is greater than 1.8

After the 2nd delete trigger in "Mymarkets" I have only the "Correct Score - Correct Score" market, as everything else has been deleted via the 1rst and 2nd delete trigger.

I would like the third delete trigger to delete also the CS market.

But, as the MO and OU markets have been deleted (via the 2nd delete trigger), the uservar mydeletedmarkets has also deleted accordingly the MO and OU informations for each deleted market.
So, when the third delete trigger is trying to compare the expression market_parent_id and mydeletedmarkets, mydeletedmarkets is not defined for the CS market, and, it is not deleted.

Any ideas?

Regards,

Theo



  • All members
  • Posts: 905
Re: Delete a market if another market does not exist
« Reply #5 on: 11 Sep 2012, 07:10 »
Trouble is that user variables set individually for each market are only available for use within the one market.   This is why the remember function is used to enable the variable to be available in all markets that share the same market_parent_id.  But when you use different markets to produce the logic for deletion of other markets, it is more complicated. 

Can you explain which markets you wish to retain for in-play?  As there may be a simpler solution and I have a trigger that works with those 3 markets, so may be able to adapt it to your requirements.

  • Moderator
  • Posts: 3597
*
Re: Delete a market if another market does not exist
« Reply #6 on: 11 Sep 2012, 08:47 »
Hi
How about setting a ‘flag’ (0/1/2 etc.) as the value for mydeletedmarkets instead of market_parent_id.
These values will have common meaning across all your markets
You can set the flag’s value according to your logic in triggers 1 and 2.
Then delete according to flag status.
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.

  • Élite
  • Posts: 111
  • Gender: Male
*
Re: Delete a market if another market does not exist
« Reply #7 on: 11 Sep 2012, 09:05 »
Hi Mark,
I think we will reproduce the same problem, as, the flag information will be lost as the MO, OU markets will be deleted (individually set for each market,)

Hi Rubold,
I will try an intermediate solution with uservar and remember or external (i.e. excel) storage.

If I find a solution I will inform you.

You see guys, I have to "clean" everyday the "incomplete" parent markets manually.
That's why I am trying to automate the process.

Regards,

Theodore

  • Desenvolvedores de trigger
  • Posts: 919
  • Gender: Male
*
Re: Delete a market if another market does not exist
« Reply #8 on: 11 Sep 2012, 11:51 »
Hi Mark,
I tried that. I think it is a little bit more complicated. Let me explain.

Example

I load all today MO, CS, OU markets via the market locator.

A first trigger deletes alll markets except those whose names contain "Match Odds - Match Odds" or "Over/Under 2.5 goals" or "Correct Score - Correct Score"

A second trigger (with 2 actions):

First action
Sets a uservar mydeletedmarkets=market_parent_id, individually for each market 

Second action
Deletes markets where the following conditions are not met:

Market names contain "Match Odds - Match Odds"
   and s_1_back_price is equal or less than 1.65
          or  s_2_back_price is equal or less than 1.65
or Market names contain "Over/Under 2.5 goals"
    and s_2_back_price is equal or less than 1.8
or Market names contain"Correct Score - Correct Score"

A third trigger deletes all markets where:
market_parent_id = mydeletedmarkets

Let's suppose that in a market_parent_id
1. The MO s_1_back_price and s_2_back_price are greater than 1.65
2. The OU s_2_back_price is greater than 1.8

After the 2nd delete trigger in "Mymarkets" I have only the "Correct Score - Correct Score" market, as everything else has been deleted via the 1rst and 2nd delete trigger.

I would like the third delete trigger to delete also the CS market.

But, as the MO and OU markets have been deleted (via the 2nd delete trigger), the uservar mydeletedmarkets has also deleted accordingly the MO and OU informations for each deleted market.
So, when the third delete trigger is trying to compare the expression market_parent_id and mydeletedmarkets, mydeletedmarkets is not defined for the CS market, and, it is not deleted.

Any ideas?

Regards,

Theo




Hi let me see if can help

"A first trigger deletes alll markets except those whose names contain "Match Odds - Match Odds" or "Over/Under 2.5 goals" or "Correct Score - Correct Score""

** This part you can solve in market locator, and load only this especific markets.

"First action
Sets a uservar mydeletedmarkets=market_parent_id, individually for each market 

Second action
Deletes markets where the following conditions are not met:

Market names contain "Match Odds - Match Odds"
   and s_1_back_price is equal or less than 1.65
          or  s_2_back_price is equal or less than 1.65
or Market names contain "Over/Under 2.5 goals"
    and s_2_back_price is equal or less than 1.8
or Market names contain"Correct Score - Correct Score""

** If you use a remember triggers one for each scenario, you can later delete all market_parent id that are set in here.

"A third trigger deletes all markets where:"

*** Like i say before i believe whith individual cenario remembers u can solve that

pcal72
Desenvolvedor de triggers oficial Market Feeder pro

Também faço:
Cursos sobre Market Feeder pro (gratuitos)
Triggers (gratuitos para sempre)

Para saber informações contacte-me!

NOTA: TESTE SEMPRE OS SEUS TRIGGERS ANTES DE OS USAR COM FUNDOS REAIS!

  • Moderator
  • Posts: 3597
*
Re: Delete a market if another market does not exist
« Reply #9 on: 11 Sep 2012, 12:30 »
Hi
Another idea on flag:
rather than delete markets on the fly, set their flag for deletion, and delete all in one go at the end.
Trigger 2
second action: set uservar flag = 1 (for deletion), individually for each market
conditions: your conditions
Trigger 3
action: set uservar flag = 1,  individually for each market
conditions: Markets name contains "Correct Score - Correct Score”
and market_parent_id = mydeletedmarkets
Trigger 4
action: delete market
condition: flag = 1
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.

  • Élite
  • Posts: 111
  • Gender: Male
*
Re: Delete a market if another market does not exist
« Reply #10 on: 14 Sep 2012, 11:31 »
Hi Rubold
in a remember trigger you cannot set individually for each market.
you mean, your delete_market_parent_id remember variable is by default set for each market?
Or, you have to setup before a "delete" uservariable?
how can we do it?

Regards,

Theodore

  • All members
  • Posts: 905
Re: Delete a market if another market does not exist
« Reply #11 on: 15 Sep 2012, 08:55 »
Hi Rubold
in a remember trigger you cannot set individually for each market.
you mean, your delete_market_parent_id remember variable is by default set for each market?
Or, you have to setup before a "delete" uservariable?
how can we do it?

Regards,

Theodore

Sorry, I meant "Create a new list every time",  has the same effect in remembered variables as individually for each market, does in user variables.  So for each market where you remember your delete_market_parent_id variable, you can then use a delete market trigger to delete all markets with a matching parent_id using Global User Variables............... are set.

 

Please note, BetFair is seems to be currently OFFLINE