Author Topic: Stake calculation  (Read 494 times)

Tags:
  • All members
  • Posts: 118
  • Karma: +2/-0
Stake calculation
« on: Tue, 03 April, 2018, 16:40 »
Hi
Trying to get this to work.
The constants and variables are set, basically I want the calculated loss to be divided by 4 then stake calculated to recover that 1/4 and add initial bet

IF((current_loss/(back_price-1))/(1-commission)+init_bet>max_bet,max_bet,

IF(current_loss=0,init_bet,

((current_loss/4)/(back_price-1)+init_bet)/(1-commission)))

I have split it to show the if stages of the calculation.
Doesn't seem to want to play the game.
Any help?
Mike

  • Moderator
  • Posts: 4120
  • Karma: +241/-9
  • Gender: Male
*
Re: Stake calculation
« Reply #1 on: Tue, 03 April, 2018, 20:04 »
hi
sorry , if you include the trigger , i will test and will be able to help with the error .
please include your trigger here so that i can work out what the problem is.

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: 118
  • Karma: +2/-0
Re: Stake calculation
« Reply #2 on: Tue, 03 April, 2018, 20:13 »
Hi
Ok thanks I attach it
Mike

  • Moderator
  • Posts: 4120
  • Karma: +241/-9
  • Gender: Male
*
Re: Stake calculation
« Reply #3 on: Tue, 03 April, 2018, 20:44 »
hi
whoop''s.
sorry i had to laugh about this one , i have done the same mistake many times .
you have set currentloss variable ok.
BUT you the use in the win market   IF((current_loss/(back_price-1))/(1-commission)>max_bet,max_bet,IF(current_loss=0,init_bet,((current_loss/4)/(back_price-1))/(1-commission)))

notice the error   ,  SET  currentloss            
you now use in the win trigger   current_loss  , so  current_loss has no value because you set the variable currentloss  without the  _  .
done that , bin there got the tee shirt .
you are learning and that is what we are here to help with  , ok we do triggers for those that do not have the time to learn because of work , i learned the hard way so i understand .

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: 118
  • Karma: +2/-0
Re: Stake calculation
« Reply #4 on: Tue, 03 April, 2018, 20:53 »
Oh dear
Many thanks for that
I am getting there, but so obvious I will now
stand in the corner and kick myself.
Once again thanks for the help
Mike