#### Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

# P&F Scanning + Trix using EMA overlay alerts

I have a little difficulty with scanning P&F charting. These charting methods which are pre-defined include (Triple Top breakout) (Double Top breakout) And however, they would only define those scans of which breakout has already appeared. I want to define a scan where x=x, and therefore it could breakout or it could reverse. In order not to miss a breakout opportunity which returns are greater.

Another question is that, I need to utilise the TRIX index for a X amount of period lets say 30. And I would live to overlay and EMA 9 period.
Therefore, I am looking to Sell when the TRIX goes below the 9 EMA and buy When TRIX goes above 9 EMA .

How would you compute that ?

• mod
edited March 2016
Hi @JayKhanna ,

It appears the scan engine only allows for testing whether a pre-defined P&F pattern exists. It does not seem to allow testing for the number or status of x's and o's. Maybe @gord can shed more light on this.

For TRIX, it appears this indicator has a built in EMA Signal line.

You can set up this scan by selecting TRIX and TRIX Signal from the Technical Indicators drop down on the advanced scan page and then doing some editing.

Assuming you want down-side crosses above zero and up-side crosses below zero, you might set up the scans like this:

// begin TRIX cross up below zero

[group is sp500] // change to your preference

// TRIX below zero,

and [TRIX(15,9) < 0.0]

// TRIX crosses above Signal
and [TRIX (15,9) x TRIX Signal (15,9) ]

// end scan

NOTE: the "x" is the "cross above" operator; it means the term that precedes it crosses above the term that follows it.

The cross below scan would have a similar form, but you would test for TRIX > 0, and you would reverse the terms in the cross above statement, so Signal would be first and TRIX second.

If you want all crosses up or all crosses down, erase the line that tests for TRIX < 0 or TRIX > 0, or put two slash marks // in front of it so the scan engine doesn't see it.

Take a look at the "Instructions" link at the bottom of the advanced scan page for A LOT of helpful information on the details of scan writing. Once you get the mechanics of scan writing, the rest is logic - not that that makes it easy. It takes some practice to get used to combining the two.
edited March 2016
Not sure if this will help you but there are a few P&F conditions you can use in scans, in addition or in combination with the predefined scans.

Tech indicator dropdown:
and [P&F Box Count > 10]

P&F patterns
and [PnF Chart In Xs is true]
and [PnF Chart in Os is true]

Note you can also modify these to some extent;

and [P&F Box Count > yesterdays P&F Box Count]

and [P&F Box Count = 5 days ago P&F Box Count]

From the predefined scans;

and [PnF Double Top Breakout is true]

or modify to;

and [PnF Double Top Breakout is false]

Just a few other ideas to think about, in addition you could add rank by box count at the end of your scan, although that probably works best if you have already specified that the chart is in either X's or O's previously in the scan.

rank by [P&F Box Count]