I am very new to programming and would like to set my strategy to trade between the hours of 11 GMT to 20:30 GMT and 22 GMT to 5 GMT the next day.
I tried setting my time zone to GMT using:
Calendar time = Calendar.getInstance();
time.setTimeZone(TimeZone.getTimeZone("GMT");
then used the following to try and get todays starting value in millis:
startTime = calendar.getTimeInMillis(calendar.DAY_OF_YEAR);
however i am getting a compiler error:
[Syntax error on token "setTimeZone", Identifier expected after this token
Syntax error on tokens, AnnotationName expected instead
Syntax error, insert "Type VariableDeclaratorId" to complete FormalParameterList
The method getTimeInMillis() in the type Calendar is not applicable for the arguments (int)
i was hoping to subtract the value of the time in millis of the current day at time 0:00 from the bidBar.getTime() value. however i have been unable to find a way to do that. any help is greatly appreciated