Reply

“elsystem.DateTime.Now.Hour” in MC’s PL language

3 replies

eastpeace

Customer, bbp_participant, community, sq-ultimate, 305 replies.

Visit profile

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.

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

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

0

eastpeace

Customer, bbp_participant, community, sq-ultimate, 305 replies.

Visit profile

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”.

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

9 years ago #129377

DateTime.Now.Hour15 compares only hour, so the equivalent condition in MC should probably be: (time=1600)

Mark
StrategyQuant architect

0

Viewing 3 replies - 1 through 3 (of 3 total)