Hey woodsync, Your logic seems sound and I have it working here. In what way is it not working? Do you have any errors . As far as the Yen is concerned, you will need to do a check for the Yen and adjust the decimal places such as: // Check if Yen yen = str.endswith(syminfo.currency,'JPY') // Detect...