Page 1 of 1

Need a quote to help with the script to set ActivateDateTime

PostPosted: Wed Nov 02, 2016 5:46 am
by sztracyh
Here is what I want:
The specified Activate DateTime (call it ActivateDateTime) to be entered in the Parameter input when loading the Strategy.
Use Now() to check against the ActivateDateTime.
Only move on to the strategy routine script after the ActivateDateTime reaches.

I use below in the Parameter:

strategy.parameters:addGroup("Activate DateTime Parameters");
strategy.parameters:addInteger("ActivateYear", "Activate Year", "Specify the Year", 2016);
strategy.parameters:addInteger("ActivateMonth", "Activate Month", "Specify the Month", 10);
strategy.parameters:addInteger("ActivateDay", "Activate Day", "Specify the Day", 1);
strategy.parameters:addInteger("ActivateHour", "Activate Hour", "Specify the Hour", 0);
strategy.parameters:addInteger("ActivateMinute", "Activate Minute", "Specify the Minute", 0);
strategy.parameters:addInteger("ActivateSecond", "Activate Second", "Specify the Second", 0);

And I use below to try to pass-on the above parameters to get the ActivateDateTime:
ActivateDateTime = core.datetime (ActivateYear, ActivateMonth, ActivateDay, ActivateHour, ActivateMinute, ActivateSecond);

But it does not work – the error message is “The first parameter must be a number”.

If I directly enter the number in the assignment (like below), it works:
ActivateDateTime = core.datetime (2016, 10, 1, 0, 0, 0);

Can I get a quote for helping me with the script on how to use Parameter to assign a DateTime to the ActivateDatetime?

Many thanks.
Tracy Huang

Re: Need a quote to help with the script to set ActivateDate

PostPosted: Mon Nov 07, 2016 4:57 am
by Georgiy
Hello Tracy,

Thank you for being interested in our service.
We need one or two days to analyze your request and estimate it. I will get back to you to clarify questions, if any, or to name the price as soon as possible.

Re: Need a quote to help with the script to set ActivateDate

PostPosted: Mon Nov 14, 2016 3:12 pm
by Alexander.Gettinger
You need to use:
ActivateDateTime = core.datetime (instance.parameters.ActivateYear, instance.parameters.ActivateMonth, instance.parameters.ActivateDay, instance.parameters.ActivateHour, instance.parameters.ActivateMinute, instance.parameters.ActivateSecond);