144 bar scan/number searcher

I ran this 144 bar scan and decided to test it against the numbersearcher tool. The results are quite different. I would have thought the numbersearcher tool would off confirmed the scan result. Is someone able to explain the different outcomes.

Thanks Peter

//This finds 144 trading days from pivots. Charts must be bars only, no filters for Cal days or holidays etc //Calc pivots PivotHi = PIVOT(MIN=20, DIR=Both, TYPE=High) > 0; PivotLo = PIVOT(MIN=20, TYPE=Low, DIR=Both) < 0; TSignalH = IF(PivotHi > 0, 1, 0); TSignalL = IF(PivotLo > 0, 1, 0); //Offset 144 bars FindH = TsignalH[144]; FindL = TsignalL[144]; FindH or FindL

Hi Peter,

Your scan will mark 144 bars after any pivot high or low on the chart, regardless of whether the count occurs close to another pivot label.

The number searcher will only display results where (in this instance) two pivots are 144 bars apart. As a result your script will produce many more results than the number searcher…

Ex20

 

Hi Peter,

Your script is finds the Bar that is 144 bars from the Pivot= 20 , whereas the Number Searcher finds 2 Pivots (set to Pivot = 20) that are 144 Bars apart.

The following chart shows the Pivot = 20 Labels, the Number Search set for 144 Bars/Pivot 20 and the ShowBars from your script and.

Note: that on the market displayed there are no results from the Number Searcher.

20190708 144 Bar Scan - Number Seacher Ticket #53967

The next screenshot shows the Pivot Labels =11, the Number Searcher Pivot Label Properties > Min Pivot = 11 and your script set for Pivot = 11:

20190708 144 Bar Scan - Number Seacher, Pivot 11 Ticket #53967

Make sure that your Script, the Number Searcher and Pivot Label tools are all set to the same Pivot value.

Cheers

Trevor

 

 

 

Thanks for the explaination