Hi,
I’m trying to emulate some screening code originally written for another platform.
Using something like this: MAXH15.4
The other platform interprets this as give the Maximum Value of the High of the bar(s) over 15 bars, starting 4 bars ago.Or …
MINL21.3
Give the Minimum Value of the Low of the bar(s) over 21 bars, starting 3 bars ago.
I appreciate that there are MIN/MAX functions available in PRT but the documents suggest they accept as lists of literal values. To have to iterate in loops to arrive at values like this would be very cumbersome when you want (and I want) to replicate filters like this:
((L1 = MINL4) OR (L2 = MINL4) OR (L3 = MINL4) ) AND
( (MAXC3 < MAXC4.3)) AND
( (H3 = MAXH15.4) OR (H4 = MAXH15.4) OR (H5 = MAXH15.4) OR (H6 = MAXH15.4) OR (H7 = MAXH15.4) ) AND (((MAXH4.3 – MINL4) / (MAXH4.3 – MINL21.3) > .23) AND ((MAXH4.3 – MINL4) / (MAXH4.3 – MINL21.3) < .62) ) AND
((AVGH3.5) > (AVGH3.8 ) AND (AVGH3.8 ) > (AVGH3.13) AND (AVGH3.13) > (AVGH3.18 ))
Any ideas as to the best approach to combine bar sequences with functions as expressions?
Many thanks.