Hi there,
If one were to use below code :
If not onmarket then
MyDate = undefined
elsif not onmarket[1] and onmarket then
MyDate = Date
Endif
would below kind of line work as a counter of days or will it give an error? :
Date - MyDate = X (number of days?)
Cheers,
The 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/.
PaulParticipant
Master
in barhunter strategy there’s a code that counts the days when on market, so you can set a limit & exit.
@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…
PaulParticipant
Master
yes it’s inside at the bottom of the itf
for help you can open a different topic or have a look in the manual.
I read in the manual about DAYS.
I think that command is enough for what I want to achieve.
I’ll give it a try and come back to you guys should it prove not to be the case…