Author Topic: Rerunning the write to csv file trigger at regular intervals  (Read 13239 times)

Tags:
  • All members
  • Posts: 151
Morning Guys

I've tweaked the write to csv file trigger so that I can import all the current back prices into my spreadsheet to compare to tissue prices but I wondered what the best way is to run the trigger every say 10 minutes so that the csv file is updated accordingly and therefore my tissue spreadsheet.

Thanks  


  • All members
  • Posts: 151
OK, so I've partly solved my issue. I can get the triggers to update the csv file by executing no more often than say 30 seconds BUT what that does is put the new pricing information underneath the previous one, in other words the file jsut keeps getting bigger. To manipulate the prices where I want them I use VLOOKUP in excel which doesn't do well with multiple entries.

If I change the trigger to overwrite then it only provides info for one race.

Any ideas?

Thanks

  • Administrator
  • Posts: 8820
  • Gender: Female
*
Hello!

Do you mean you need a separate CSV file for each market?
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 151
Morning Oxa

No, all the info written to the csv file is exactly what I want which is perfect when I run the trigger first time out. All the horses in each market are listed with their current back price. I then link my pricing spreadsheet to the csv and it puts the prices exactly where I want them. This is perfect in the first instance for me to find the early value. 

The problem I have now is that when I set the triggers to run a number of times using the execute no more often than 1 minute each export of the data to the csv file is underneath the one before so I end up with multiple instances of the horses pricing data when all i want is the current data. The csv file just gets bigger and bigger. I've tried ticking the re-write box but that only seems to export one race and not a list of all the races. 

  • All members
  • Posts: 151
Well I've tried it every which way and I can't get it to play ball. 

All I really need to do is somehow automate the reload function within the active triggers dialogue box. Manually refreshing this is the only way I can get the prices to update accordingly without duplicating.

Any ideas?

  • Moderator
  • Posts: 3656
*
Hi
do you have several triggers which you are repeating? if so it might be better to execute the triggers once per market, and repeat the block of triggers
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: 151
Morning Mark

I tried repeating the block "no more often than 30 sec" but no dice I'm afraid. Once the writing to file trigger has initially run the active triggers dialogue box gives the message:

"The trigger has already been executed once per each qualifying selection". 

The block won't repeat then for some reason.

If I hit reload then it starts again and does what I need it to do I just don't want to be hitting reload manually if I can help it.

Thanks

  • Administrator
  • Posts: 8820
  • Gender: Female
*
I'm not sure I understand why you can't just export the current prices directly into your spreadsheet using various ways available in MF Pro.

Either do it via custom cells, or via a "write to excel" trigger and skip the intermediate writing to the file completely.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 151
Hi Oxa

Plain old ignorance is the likely reason and I am looking at other methods I'm just not seeing an easy way to get what I want. 

The beauty of the write to file method for me is the simple column list which I can use VLOOKUP in excel which is just about the only formula I understand :)

If I can help it I don't want to import all the markets into my sheet I just want a list of all the days selections and the prices (in 2 excel columns) which will refresh on a regularly basis. 

Any suggestions? 

  • Administrator
  • Posts: 8820
  • Gender: Female
*
X-posting the link to your new trigger example here:

Feeding all markets' prices to Excel
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 234
  • Gender: Male
Hi Oxa,

I have understood all of the above, and have downloaded the trigger successfully.

Can you tell me how I can include conditions to download the race winner onto the same sheet please.

It can be either of "sel_place" for each runner or "winner_name" for each race, as I just want to show the winner somewhere on the sheet.

Thanks,

bobh 

  • Administrator
  • Posts: 8820
  • Gender: Female
*
You will need to write that variable alongside back_price. In the triggers that write to Excel, add another action to write into column C. You can even clone the action where it write to column B. Use the same syntax, except replace B with C and put the "market_winner" variable in the "Text" field (make sure to enclose it in double quotes).
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 234
  • Gender: Male
Thanks Oxa,

I missed that variable - market_winner.

I shall try it asap.

Much appreciated as usual.

bobh

  • All members
  • Posts: 151
Hi Oxa

I have tweaked this trigger slightly for the football markets and in essence I have it doing what I want it to do. 

I am however having the age old problem of importing prices from Betfair where the team names are spelt different from how they are in my spreadsheet. I get around this by making a lookup table which is fine for home and away teams as obviously they are unique but not so simple for the draw. 

I think I might be able to fashion some formula if the trigger outputs were listed in index order as in home, away and draw in that order. At the moment they are outputted in rank order so the prices could be in any order depending on the prices of a particular match.

Any chance this could be done?

Thanks

  • Administrator
  • Posts: 8820
  • Gender: Female
*
To arrange your selections in an order different from the default one (by rank), add the following condition to the trigger that does the writing:

and Selection's Sorting Order is defined by sel_index

As you can see, sel_index is the index (from top to bottom) of the selection in question, so in case of a football match 1 will be for the Home Team, 2 -- for the Away Team and 3 -- for the Draw.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

 

Please note, BetFair is seems to be currently OFFLINE