Since updating to latest MC 9, build 10013, 32bit and starting this Sunday I could not get the CurrentSession function to return a value for QMZ4 or ZB Dec 14. Still works for NQZ4.
The return value for CurrentSession does not print -1 using NumToStr, so I don't know if it is even initialized properly. Maybe only works for positive integers?
Local or Exchange Time does not have an effect.
CurrentSession Function
- arnie
- Posts: 1594
- Joined: Feb 11 2009
- Location: Portugal
- Has thanked: 481 times
- Been thanked: 514 times
US change their time this Sunday.Since updating to latest MC 9, build 10013, 32bit and starting this Sunday I could not get the CurrentSession function to return a value for QMZ4 or ZB Dec 14. Still works for NQZ4.
The return value for CurrentSession does not print -1 using NumToStr, so I don't know if it is even initialized properly. Maybe only works for positive integers?
Local or Exchange Time does not have an effect.
Are you using a custom session template?
Check your computer time settings.
When will we see all countries change their time at the same day so we don't have this time related issues?
Every year is the same, for a week or two everything gets off
When we see no time adjustments at all ? Nobody needs it and everybody knows it.When will we see all countries change their time at the same day so we don't have this time related issues? Every year is the same, for a week or two everything gets off
Regards.
Ben
- rrams
- Posts: 129
- Joined: Feb 10 2011
- Location: USA
- Has thanked: 8 times
- Been thanked: 70 times
- Contact:
Thanks for the reply Arnie. I use the standard futures templates.
I forgot about the daylight savings time change. Arizona does not observe DST, so maybe there was an hour where the exchange fell back and this created a negative time difference in the CurrentSession function?
If that is the case: it seems to me that the CurrentSession function code could be fixed by simply changing line 34 from
var2 = MinutesIntoWeek( DayOfWeek( Date ), Time ) ;
to
var2 = MinutesIntoWeek( DayOfWeek( q_date ), q_time ) ;
Could someone verify? How do I unlock in the editor for making changes?
I forgot about the daylight savings time change. Arizona does not observe DST, so maybe there was an hour where the exchange fell back and this created a negative time difference in the CurrentSession function?
If that is the case: it seems to me that the CurrentSession function code could be fixed by simply changing line 34 from
var2 = MinutesIntoWeek( DayOfWeek( Date ), Time ) ;
to
var2 = MinutesIntoWeek( DayOfWeek( q_date ), q_time ) ;
Could someone verify? How do I unlock in the editor for making changes?
CurrentSession can't be modified because it is a "BuildIn-Function". You have to copy the code and implement & verify it in a new function (pls find attached). Not tested.Could someone verify? How do I unlock in the editor for making changes?
Regards.
Ben
- Attachments
-
- CurrentSession_mod.pla
- (4.1 KiB) Downloaded 431 times
- Henry MultiСharts
- Posts: 9165
- Joined: Aug 25 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Hello rrams,
Please send us (support@multicharts.com) the following information for further analysis:
- workspace you are using;
- in QuoteManager select the symbols you are using, make a right click on it->Export data->Export instrument (with data). Send us the QMD export file for analysis;
-in Power Language editor->File->Export->Export with dependent functions the study you are backtesting. Send us the study export file;
- attach a detailed description of the issue and highlight the incorrect values on the screenshots / in an output file.
Please send us (support@multicharts.com) the following information for further analysis:
- workspace you are using;
- in QuoteManager select the symbols you are using, make a right click on it->Export data->Export instrument (with data). Send us the QMD export file for analysis;
-in Power Language editor->File->Export->Export with dependent functions the study you are backtesting. Send us the study export file;
- attach a detailed description of the issue and highlight the incorrect values on the screenshots / in an output file.