Hello Guest

help with stop/start in script

  • 2 Replies
  • 120 Views
*

bobwood

  • **
  • 8
  • +0/-0
    • View Profile
help with stop/start in script
« on: November 18, 2018, 11:32:22 am »
i have got this far after :

function dobet()

stop_if_balance_less = balance - stop_loss_value


but i want it to stop then restart script.
can someone please help


*

Seuntjie

  • *****
  • 138
  • +0/-1
    • View Profile
Re: help with stop/start in script
« Reply #1 on: November 18, 2018, 04:12:41 pm »
Once a script has been stopped, it cannot automatically be restarted/started. You have to type in start() to start the bot again. This is by design (See the process tutorial in the link below)

If you want to reset your script, you do not need to stop the script and start it again, you just need to reset your variables to their original values. The easiest way to do this is usually just to have a function that copies the where you define your variables and call that function when you need to reset.

You can use an if statement to determine when to reset. See the Programmer mode tutorials for help with variables and if statements.

*

ak47

  • **
  • 26
  • +0/-0
    • View Profile
Re: help with stop/start in script
« Reply #2 on: December 05, 2018, 03:18:24 pm »
CREATE START/STOP BUTTON IN NEW UPDATE PLEASE IT'S ANNOYING TYPING EVERYTIME!  :-\