Counter of days
Forums › ProRealTime English forum › ProOrder support › Counter of days
- This topic has 5 replies, 3 voices, and was last updated 4 years ago by
Albaran.
-
-
05/21/2021 at 4:10 PM #170131
Hi there,
If one were to use below code :
12345If not onmarket thenMyDate = undefinedelsif not onmarket[1] and onmarket thenMyDate = DateEndifwould below kind of line work as a counter of days or will it give an error? :
1Date - MyDate = X (number of days?)Cheers,
05/21/2021 at 4:55 PM #170146The only data type supported is floating point NUMERIC, no text (strings), nor dates/time, no integers.
So there’s no date/time math available.
You can do with tricks and extra coding by thinking of them as numbers, but you will have to account for max days for months, leap years, etc… yourself.
You may want to read this https://www.prorealcode.com/reply/94795/.
05/21/2021 at 6:54 PM #170151in barhunter strategy there’s a code that counts the days when on market, so you can set a limit & exit.
1 user thanked author for this post.
05/21/2021 at 10:50 PM #170158@Robertogozzi: thanks, I’ll have a look at it!
@Paul : I haven’t seen the piece of code you’re talking of, is it one of the itf files attached? If so, the more basic question is => with what do I open ITF files? I’ve tried File Viewer Plus but doesn’t seem to be working so I’m at a loss…05/22/2021 at 12:19 AM #17015905/24/2021 at 11:30 AM #170254 -
AuthorPosts
