Thank you Andrew AMD, I have added the commands to the script. Just by starting the script, there is no Warning or Error. I will see what happens by opening a new position. I appreciate your help, I will be back, thank you