“elsystem.DateTime.Now.Hour” in MC’s PL language
3 replies
eastpeace
9 years ago #113445
Hi, Mark!
I get a strategy today. There is a function that MC can’t recognize.
LongEntryCondition = … and (elsystem.DateTime.Now.Hour<>15));
I guess it means bar’s time <> 1500 ?
And I want to know the right answer from you.
Thanks.
Mark Fric
9 years ago #129255
the condition means hour 15.
It seems MultiCharts doesn’t support this function, it works in Tradestation.
Unfortunately I cannot test it in MultiCharts, but from the documentation I browsed it seems it should work if you’ll edit the code and remove the elsystem. part.
So it will look like:
LongEntryCondition = … and (DateTime.Now.Hour15));
Mark
StrategyQuant architect
eastpeace
9 years ago #129297
DateTime.Now.Hour is still unknown in Mc8.8.
According to your description, I think “time1500” is to “DateTime.Now.Hour15”.
Mark Fric
9 years ago #129377
DateTime.Now.Hour15 compares only hour, so the equivalent condition in MC should probably be: (time=1600)
Mark
StrategyQuant architect
Viewing 3 replies - 1 through 3 (of 3 total)