How do you know that your script should open a trade?