KVSParticipant
New
Hi all,
I am just starting out with PRT. I can see in the Glossary of the Trading Systems programming guide that DOpen, DHigh, DLow, DClose functions are available to these metrics from the n-th day before the current one; however, if the n value is not specified (or if it’s [0]) does these functions provide the Open/High/Low of the current day, so far?
I’d much appreciate if anyone can confirm this.
Cheers
KVS
DOpen, DHigh, DLow, DClose require parentheses “()” not brackets.
In addition they do not assume default values, so (0) is required for the current day or you’ll get an error.
KVSParticipant
New
Thanks Robert. So I can use DHigh(0), for example, to call the high of the current day before the daily bar is closed?
Better to try it out, right?
test=dhigh(0)
if intradaybarindex=0 then
maxToday=high
drawvline(barindex)
else
maxToday=max(high,maxToday)
endif
return test coloured("blue"), maxToday coloured("red")
KVSParticipant
New
Thanks Ivan. I will try it out.