Author Topic: Error in trigger expression of price or amount when IF statement evaluates to 0 in repeating trigger  (Read 1614 times)

Tags:
  • All members
  • Posts: 47
Hi,

I have a trigger set to repeat every 30 seconds with this statement in the amount field

IF(current_bet > s_1_profit_loss, current_bet - s_1_profit_loss, 0)

If the current_bet value (a user variable set when there is a settled market) is greater than the profit_loss on the market being monitored, it places a bet, either the full amount of current_bet, or enough to make up the amount so the profit_loss matches the current_bet value.

That works fine, until the two amounts match or profit_loss is greater and it then should just stop and do nothing, which it does but in the log it says 'error in trigger expression of price or amount' , and the trigger doesn't then place bets if the current_bet value is increased?

What I want to happen is if the current_bet value is increased (by a loss in another market), the trigger will then place bets again to bring the profit_loss up to match the current_bet value.

  • Élite
  • Posts: 3698
  • Gender: Male
*
hi
sometimes you could have a bet amount less than .01, so it will give an error.
so you need to add your formula as a condition to make sure that the bet amount is .01 or greater.

and selections trigger expression IF(current_bet > s_1_profit_loss, current_bet - s_1_profit_loss, 0) is equal or greater than .01

so the trigger wil only bet if the bet amount is eqaul or greater than .01


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.

 

Please note, BetFair is seems to be currently OFFLINE