Impliment CANCEL Excel command but within Guardian

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
azgmb87
Posts: 8
Joined: Wed Jun 22, 2022 9:47 pm

Morning all,

I have a decent working automation file, that needs a slight tweek. In short, I place a trade with an offset trade. If an event happens, I place a second trade with second offset. If a second event happens, I want to cancel the first offset trade only. In Excel, I can use the CANCEL command with the Bet ID in column R. I cannot find a way to do this in Guardian; I get cancel all on selection - I don't want this as I will have two trades on the same selection. I do record the Bet ID as the trade is placed. Does anyone have any idea how to achieve this?

MTIA.
eightbo
Posts: 2263
Joined: Sun May 17, 2015 8:19 pm

It's a bit tedious but if you want a surefire way you could always split apart each section of the offset trades to give you more flexibility. For example I made a bot to enter on price breakout, add if it continued or dump trade if it reversed. In the case of adding multiple times – only 1 stop or take profit was ever required. You can also manipulate a stake size stored value if you want a partial hedge i.e. 50% instead of 100%. I recall also having to check lay bets vs back bets to determine whether the exit should be a lay or a bac rule (include both with binary logic so either lay exit or back exit fires)

If it's just an experimental script you might not find this a worthwhile spend of time (stick with the excel file) as it'll probs take you ~2 days to complete but if it really needs that upgrade and has to be a .baf, you may find it's worthwhile to recreate the entire execution process so you have exactly what you want.
User avatar
Dabbla
Posts: 826
Joined: Wed Apr 15, 2009 1:50 pm

When you place the bet, store the price taken, then adjust that in line with your offset.
EG. SV= OFFSET1. 2.00 – 2 ticks = 1.98
You can then set a rule called (Cancel unmatched bets on the selection, Price dependant). In that rule, set the parameters to, place at (stored value price ) name = OFFSET1 for the Selection.
Then the action will be = (Equal sign). That will cancel bets at that price only.

It will require a bit more logic if the 2 offsets are on the price.
Post Reply

Return to “Bet Angel - Automation”