Hi,
I am working on a bot that bets in play. When my horse is in the green I want to fire a "CANCEL_ALL" followed by a "GREEN" as individual commands (ie only for the one horse).
My VBA code looks like this:
ActiveSheet.Range("L" & betrow).Value = "CANCEL_ALL"
ActiveSheet.Range("L" & betrow).Value = "GREEN"
Should this work? or will "CANCEL_ALL" be replaced with "GREEN" before Betfair has a chance to process it? Is the any way of combining individual commands for example "CANCEL_ALL_GREEN"? Is there a better way of doing this?
Thanks for any help!
Can you combine individual commands?
Thanks for your reply, I now have GREEN working as I would like. However as I do not want to use GREEN if my position goes against me I need to use CLOSE_TRADE to exit my position which does not do a CANCEL_ALL. What is the best way of performing a CANCEL_ALL followed by a CLOSE_TRADE when running in play?
I have tried:
ActiveSheet.Range("L" & betrow).Value = "CANCEL_ALL"
ActiveSheet.Range("L" & betrow).Value = "CLOSE_TRADE"
which correctly closes the trade but the cancel all is not executed.
I have tried using:
Application.Wait Time + TimeSerial(0, 0, 2)
to pause for 2 seconds after doing the cancel all but this doesn't seem to help.
Any help is very much appriciated!
I have tried:
ActiveSheet.Range("L" & betrow).Value = "CANCEL_ALL"
ActiveSheet.Range("L" & betrow).Value = "CLOSE_TRADE"
which correctly closes the trade but the cancel all is not executed.
I have tried using:
Application.Wait Time + TimeSerial(0, 0, 2)
to pause for 2 seconds after doing the cancel all but this doesn't seem to help.
Any help is very much appriciated!