- Topics: 5
- Replies: 366
- Posts: 371
Regarding referencing previous days values, the second script in my original reply shows how best to do this. You setup a variable (V1 for the ROC in this case) then use square brackets for the Offset.
V1 = Current Bar
V1 = Previous Bar
V1 = 3rd last bar
With regards to your specific example, below is how i would script the top criteria:
COV = (Close() - Open());
V1 = COV >= 0.90;
V2 = VOL() > 100000;
V3 = COV > COV ;
V4 = (CLOSE() / CLOSE(1)) <= 1.02 ;
//All Rules Pass
V1 and V2 and V3 and V4
Because we are dealing with a specific value range (rather than a %) the results are limited (37 results on the ASX exchange over the last quarter). I’ve attached a sample workbook with a list of the 37 codes that passed in the last quarter, with a Show Bar highlighting the bars that passed (red arrows) and the Analysis Cluster below with each rule broken into individual scripts.
You can see the red arrows (the trigger) pass when all 4 rules are met.
You must be logged in to access attached files.