Optuma Forums › Optuma Scripting › Bullish Combination Scan › Reply To: Bullish Combination Scan
- Topics: 5
- Replies: 670
- Posts: 675
Hi,
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[1] = Previous Bar
V1[2] = 3rd last bar
etc
With regards to your specific example, below is how i would script the top criteria:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
//Rule 1 COV = (Close() - Open()); V1 = COV >= 0.90; //Rule 2 V2 = VOL() > 100000; //Rule 3 V3 = COV[1] > COV ; //Rule 4 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.