Author Topic: Linking two conditions from an excel sheet.  (Read 6779 times)

Tags:
  • All members
  • Posts: 12
Linking two conditions from an excel sheet.
« on: 01 May 2013, 11:38 »
Hi,

Was hoping some legend from the forum could help me with this. I have a trigger which will (hopefully) make bets based on the name and a corresponding value. Both the name and the value are derived in the same Row on the excel sheet. Lets say Column A & B.

I need a user variable to establish that the name of the market is on the excel list. And once that is confirmed, then to check if the value in Column B is appropriate.

However I have about 20 selections on the sheet, so I set up the variable to check if the market name corresponds to the excel sheet and if it does it returns a value of 1. The only way I can think of to add the other 20 Markets is by using the OR function, so for example the first 3 conditions of the user variable would be:

1. Market name contains cell_help_A1
OR
2. Market name contains cell_help_A2;
OR
3. Market name contains cell_help_A3.
OR

So on and so fourth.

The second condition is a figure derived from Column B. The problem I am facing is that I can't add the following line to the above condition:

Trigger expression cell_help_B1 is equal or greater than X.

If this condition is added then I cannot use the OR function for the rest of the list on the Excel sheet.

I know that I can do an individual trigger for each line, but guess I am looking for some advice on keeping it to one trigger, or even if there was a way of expressing the excel formula differently.

Any advice, observations would be appreciated.

Regards,

O In



  • Moderator
  • Posts: 3597
*
Re: Linking two conditions from an excel sheet.
« Reply #1 on: 01 May 2013, 12:20 »
Hi
I think you need to import selections from your sheet. See this topic as an example:
http://community.welldonesoft.com/triggered-betting-10/a-list-with-semi-automatic-strategy/msg19238/#msg19238

The syntax for trigger expressions on imported data will be something like this:
cell_querymarket_id_O(sel_index*3+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.

  • All members
  • Posts: 12
Re: Linking two conditions from an excel sheet.
« Reply #2 on: 01 May 2013, 14:15 »
Hi Mark,

Thanks for the reply. The problem is I can't get my selections to import. It always says 0 imported when I try and I have followed the manual instructions and videos. Besides that I was hoping to do it  another way without overloading on excel.

My only real issue is getting all the list on the excel sheet into one set of conditions for the trigger. Is there another way of expressing the formula that would allow me to check both conditions and use the OR?

Would something like this as a condition work :

(triggerexpression_Market_Name) = cell_help_a1 & triggerexpression cell_help_b1 is greater than X?  If this could be expressed in the one line then I could use the Or function for the rest?

Thanks again.

O In

  • Moderator
  • Posts: 3597
*
Re: Linking two conditions from an excel sheet.
« Reply #3 on: 01 May 2013, 14:54 »
Hi
I'm not clear on what you are wanting to do.
Column A contains names of markets or selections?
Column B is a piece of data related to the market or selection in column A?

Ideally please could you attach a small example excel file showing some markets / selections and related data. I will then look further at it.

You need 5 posts on the forum to be able to attach files. Just reply OK twice or something and you should be able to attach.
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: 12
Re: Linking two conditions from an excel sheet.
« Reply #4 on: 01 May 2013, 15:11 »
ok

  • All members
  • Posts: 12
Re: Linking two conditions from an excel sheet.
« Reply #5 on: 02 May 2013, 09:12 »
ok

  • All members
  • Posts: 12
Re: Linking two conditions from an excel sheet.
« Reply #6 on: 02 May 2013, 14:18 »
Hi Mark

Sorry for the delay. Sample spreadsheet attached. I know there is a way to import this into MFP via excel but I'm looking for an alternative route, if there is one. I simply cannot get the import function to work, it constantly says 0 imported and I have followed the manual etc. I also want to avoid having MFP load 100's of markets into excel.

Anyway, the trigger will check if the horse name is there, then will check the third Column of data which is coming from a database I have created . If this data is a certain amount then it will set a flag and a trigger will be fired.

My question is do I have to create a seperate flag for each line of the excel sheet or is there another way it can be expressed in one user variable that will allow for all A2:b2,A3:B3,A4:B4 to be checked and the appropriate flags set so that the trigger will know when to fire and on which markets/horses.

I have been using this:

Market_Name contains cell_sample_A1
and
Selections Trigger Expression cell_sample B1 is equal to X


I have gotten it to work one by one but if there is more then 20 horse/market names, then the trigger would be absolutely huge.

If needs be i can obviously create a trigger for each line...

Any help appreciated,

Thanks again.

O In

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Linking two conditions from an excel sheet.
« Reply #7 on: 02 May 2013, 14:48 »
hi
you have put
Market_Name contains cell_sample_A1
and
Selections Trigger Expression cell_sample B1 is equal to X
but if you are using the sheet that you included, the above should be.
Market_Name contains cell_Sheet1_A1
and
Selections Trigger Expression cell_Sheet1_B1 is equal to X


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: 12
Re: Linking two conditions from an excel sheet.
« Reply #8 on: 02 May 2013, 14:51 »
Hi McBee,

Yes I have been using exactly that, my bad I incorrectly entered the formula above.

O In

  • Moderator
  • Posts: 3597
*
Re: Linking two conditions from an excel sheet.
« Reply #9 on: 02 May 2013, 18:26 »
Hi
I am going to demonstrate the import of selection data because I think it is the best way to do it for your requirement. In the link above Maddox suggests another method which does not require a separate market sheet which may be better, but I have no experience of using that, so can’t advise on it.

I think your original problem with importing data stems from you having market name at the top of the selections column. Now you do not have to worry about the market name, because that is done automatically by the import procedure. All you need is to have the selection names (exactly spelt as the Betfair selection names) in the leftmost column starting at any column you like. Plus your related data.
 
I have slightly modified your Sheet1 and put some real selection names in there.
The import procedure worked fine and you will see your selection data imported to the appropriate rows for each imported selection in  column P on the market sheet.

So now the condition for your trigger is:
selections trigger expression cell_querymarket_id_P(sel_index*3+2) is equal to X

And if you wanted to use your imported price data an example condition is:
selections trigger expression cell_querymarket_id_P(sel_index*3+1) is less than lay_price
 
See your modified workbook attached.

I hope this helps a bit.
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