- Topics: 5
- Replies: 430
- Posts: 435
Thank you for your post.
Rather than using Offsets i would suggest using the ACC() function. I’ve included an example of the adjusted buy script below:
//Find 3 Closes greater than Opens in a row
V1 = CLOSE() > OPEN() ;
V2 = ACC(V1, RANGE=Look Back Period, BARS=3) == 3;
//Find 3 Closes and Opens greater than DMPA POC in a row
V3 = DMPA(DEFAULT=PointOfControl, BARS=20) ;
V4 = CLOSE() > V3 and OPEN() > V3 ;
V5 = ACC(V4, RANGE=Look Back Period, BARS=3) == 3;
//Find both setups at the same time
V2 and V5
The shaded green vertical zones show bars that pass the above criteria:
You can use the ACC() function to create a similar Sell script.