Pivot Point Scan-Close crosses weekly pivot


Hello, i set up a custom scanner to get informed if the close (daily) crosses above the weekly pivot point.
The scanner is set up as custom study in ToS "Scan"
But in TOS i get the error message "Secondary period not allowed:weekly". The scanner contains a calculation of the weekly pivot.
The scan only works when i switch to "wk" in the main scanner, but this is not what i want, because now i get informed if the weekly closing price moves
above the weekly pivot. Thanks for your help


Well-known member
Unfortunately the scanner does not allow secondary aggregations. This is why in your example, it is not until you changed the aggregation of the scanner to WEEK that the scanner started working because your base scan code was based on a weekly aggregation.

Similarly if the base code for your scan is written for a 15-minute aggregation, then it will work only if 15 minute aggregation is selected. Otherwise you'll see the same message that secondary aggregation is not permitted.


Well-known member
In that case use another pivot study that may work for lower aggregations. There are easily 5-6 different pivot studies that TOS offers you. You really have to research which one suits you better.


New member
am trying to scan for stocks that have crossed persons pivot lines ( or regular pivots ) in 5 min time frame. when i try to use
open crosses PersonsPivots().R2 i get "Secondary period not allowed: DAY." is there any workaround for the scan to work ?

Similar threads