FXCM Forex Trading

Need a quote to help with the script to set ActivateDateTime

If you need your own private indicator, signal or strategy, or any kind of development using various trading APIs - please visit this forum.

Moderator: admin

Need a quote to help with the script to set ActivateDateTime

Postby sztracyh » Wed Nov 02, 2016 5:46 am

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
sztracyh
 
Posts: 7
Joined: Wed Dec 16, 2015 4:42 pm

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

Postby Georgiy » Mon Nov 07, 2016 4:57 am

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.
Georgiy
FXCodeBase: Initiate
 
Posts: 151
Joined: Tue Jul 29, 2014 4:49 am

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

Postby Alexander.Gettinger » Mon Nov 14, 2016 3:12 pm

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);
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 2713
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk


Return to Premium Development Services

Who is online

Users browsing this forum: No registered users and 2 guests