Hi all,
I'm trying to create an event that is triggered at an exact time. However, either my code is faulty or I can only assume that the EFS code is only run when a new tick comes in and unless a new tick comes in right at the exact second I'm trying to hit, my code doesn't get executed.
My example code below:
var now = new Date();
var tMinute = now.getMinutes();
var tSecond = now.getSeconds();
if (tMinute == 15 && tSecond == 50) {
Alert.playSound("chime down.wav")
}
Please let me know if there's any way to circumvent this issue, or if you can offer any hints or help at all it would be much appreciated.
PS. I'm planning to get the time issue correct with an alert, but I want to eventually add a strategy buy, then eventually a market order if all goes well.
Cheers,
Scott
I'm trying to create an event that is triggered at an exact time. However, either my code is faulty or I can only assume that the EFS code is only run when a new tick comes in and unless a new tick comes in right at the exact second I'm trying to hit, my code doesn't get executed.
My example code below:
var now = new Date();
var tMinute = now.getMinutes();
var tSecond = now.getSeconds();
if (tMinute == 15 && tSecond == 50) {
Alert.playSound("chime down.wav")
}
Please let me know if there's any way to circumvent this issue, or if you can offer any hints or help at all it would be much appreciated.
PS. I'm planning to get the time issue correct with an alert, but I want to eventually add a strategy buy, then eventually a market order if all goes well.
Cheers,
Scott
Comment