Trend Higher highs and Lower High


Category:
0
0

Hi, Im kinda new, Im trying to build a scanner, that the stock  open lower than previous day. This is for a Short Strategy.

I would like to find a stock that after making a Higher High… after that get rejected and makes a Lower High. and the price started to get under EMA.

All I have is this

close crosses below SimpleMovingAvg().”SMA” and high is greater than close and close is less than close from 1 bars ago

But  I only want stocks that are in a downtrend.  I tried to set a condition and the close if less that the High of the day…. but I cannot find it  a High of the Day function. I was doing it with the wizard, im just learning….any help I will appreciate it.  Also I want to comment i found a Study that shows me the reversal…. but I tried to copy and put into a scanner and of course it doesn’t work on the scanner https://tos.mx/rNBdj3, its just to complicated for me.

thanks

arlette

Marked as spam
Posted by (Questions: 4, Answers: 1)
Asked on October 9, 2019 10:45 pm
795 views
0
Private answer

I encourage folks in the Q&A forum not to use those shared links. They can be revoked or can even expire. So please post the full code in the future.

Here is the code you linked to that has been converted to work as a scan. Screenshot below shows the results of the scan for the "up arrow" signal.

# Regular Trading Hours High and Low Reversals
# Mobius
# V01.08.20.2018 Chat Room Request
def h = high;
def l = low;
def c = close;
def x = barNumber();
def nan = double.nan;
def rth = getTime() >= RegularTradingStart(getYYYYMMDD()) and getTime() <= RegularTradingEnd(getYYYYMMDD());
def LOD = if rth and !rth[1] then l else if rth and l < LOD[1] then l else LOD[1]; def LOD_x = if l == LOD and rth then x else nan; def LOD_h = if l == LOD then h else LOD_h[1]; def LOD_h_line = if x >= highestAll(LOD_x) then highestAll(if isNaN(c[-1]) then LOD_h else nan) else nan;
def upBar = if c crosses above LOD_H_line and RTH then x else upBar[1];
def HOD = if rth and !rth[1] then h else if rth and h > HOD[1] then h else HOD[1];
def HOD_x = if h == HOD and rth then x else nan;
def HOD_l = if h == HOD then l else HOD_l[1];
def HOD_l_line = if x >= highestAll(HOD_x) then highestAll(if isNaN(c[-1]) then HOD_l else nan) else nan;
def dnBar = if c crosses below HOD_l_line then x else dnBar[1];
# scan signals
plot ArrowUP = x == highestAll(upBar) ;
#plot ArrowDN = x == highestAll(dnBar);

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4086)
Answered on October 11, 2019 8:38 am