Scan for failed Previous Day High followed by failed Pre-Market High

JakeD

New member
I am wondering if it's possible to create this particular scan.

Here is the setup for the criteria I am trying to scan. This is a SHORT I execute:

"A failed attempt to reach or break Previous Day High (1st check), followed by a failed attempt to reach or break Pre-Market High (2nd check)"
I already have those 2 levels coded into my platform. PDH and PMH

Is it within the realm of possibility to scan for something approximating this set up.. ie proximity to Pre Market High after the aforementioned Previous Day High failure?

lQ7Fg82.jpg
 

XeoNoX

Well-known member
VIP
it sure is possible if you can better define what the following means:

failed attempt to reach or break Previous Day High (1st check), followed by a failed attempt to reach or break Pre-Market High (2nd check)"

what do you call a failed attempt and what do mean by failure to reach. you will have to define these conditions
 

JakeD

New member
Thanks for replying! Hmmmm, I suppose by "failed attempt" Ii am referring to some sort of price action as is depicted in the illustration: in this case, how would the condition be defined exactly? Would I assign a percentage range within the actual level?

If anyone is interested in creating this script... ;-)
 

XeoNoX

Well-known member
VIP
if your interested in writing the rules and conditions.. "failed attempt" cant be coded..
" referring to some sort of price action as is depicted in the illustration" must be thoroughly described to code.
people can look at that and come up with 100's of interpretations and rules of why it "failed" these rules must be defined to be coded.
 

JakeD

New member
The first condition is that the
PDH -previous day high
Is above the
PMH- premarket high
Secondly, Price must open below both.
(I’m not sure how to specify this next part)
Third, Price must pass above PMH
Fourth, price must close below PDH and no subsequent candles can close above that closest closing candle (the one closing below the PDH)
Fifth, price must go below the PMH
I think if I was alerted to a chart having done that I could begin to watch for what I want
(Confirmation of weakness upon retesting the PMH)
 

BenTen

Administrative
Staff
VIP
Some of the conditions you've outlined are subjective and too general. It would be impossible to have a fully working scanner for this concept.

We can do something basic like creating a scanner to help you find stocks that cross above PMH, and then you can monitor from there.
 

JakeD

New member
Understood. Well how specific would I be able to get? For example, would a condition of crossing above the PMH and back below it be feasible ?
Thanks in advance.
 

XeoNoX

Well-known member
VIP
Price must open below both.
Third, Price must pass above PMH

This now cancels out your scan you want below PMH in step 2 and then your saying must pass above PMH in step 3
 

JakeD

New member
Right, I suppose I was wondering if a condition could be:
at live market open, price must be below both PDH and PMH,
subsequently
Price passes above PMH (the lower of the two)

Ultimately I’m attempting a lower high trade using these two levels as my inflection points as it were
 

XeoNoX

Well-known member
VIP
live market open
----live market open as in 4:00AM EST (yes people wake up at this time) or did you mean regular trading hours 9:30AM EST?

Price passes above PMH (the lower of the two)
--- what two? PMH is just one variable
 

JakeD

New member
live market open
----live market open as in 4:00AM EST (yes people wake up at this time) or did you mean regular trading hours 9:30AM EST?

Price passes above PMH (the lower of the two)
--- what two? PMH is just one variable
I mean 9:30 EST
The two are PDH(previous days high) and PMH (premarket high)

In the photo the 1st check corresponds to the PDH and the 2nd to the PMH
 

XeoNoX

Well-known member
VIP
so lets make sure we got this right... you want a scan for:
price must be below both PDH and PMH in premarket,
in regular trading hours the Price passes above PMH or the PDH (the lower price value of the two)

is that correct?
 

JakeD

New member
Almost!
Price (by necessity) passes above PMH on its way to PDH (but doesn’t reach it-weakness)
Then falls below the PMH (and upon a retest of the PMH fails it - real weakness - and I short )

My back testing for this demonstrates that it works when the PMH is lower than the PDH.
The stock is already not showing strength.
 

XeoNoX

Well-known member
VIP
1st) in regular trading hours the Price passes above PMH or the PDH (the lower price value of the two)

2nd) Price (by necessity) passes above PMH on its way to PDH (but doesn’t reach it-weakness)


that means you cancel PMH out of the 1st rule, since you want to to pass PMH that cancels it out of rule #1

-------- which one do you want?

on its way to PDH (but doesn’t reach it-weakness)
-----you must also define WEAKNESS


upon a retest of the PMH fails it
----- you must define RETEST and FAILS

you should write it down on paper, then look back and see if you contradict yourself.
 

JakeD

New member
The price only oases through the PMH.
Not the PDH
The PDH which is above the PMH is merely approached but not reached.
As per the photo.
The set up begins with the PDH above the PMH.
When the stock rises up past the PMH it approaches but doesn’t reach the PDH.
It then falls, back below the PMH
But Before “tanking” I will watch to see it come back up to test the PMH where I will look for price action to confirm weakness before entering short.
 

XeoNoX

Well-known member
VIP
the way the code is wrote is by data points, you are going to have to give values to "doesn’t reach the PDH. and It then falls"

if you cant then you will have to settle for the following interpretation coded as:

PMH it approaches but doesn’t reach PDH --- which will be defined as price is between PMH and PDH
 

JakeD

New member
I personally wouldn’t know where to begin w that. As Ben was saying above, it seems that the most I could hope for with creating a script to scan these conditions is a simple scan for the initial PMH cross, which I would then monitor.

Is it possible for either of you to write that code?
 

Similar threads

Top