TradingView
Zorro-astrian
30 Th05 2016 21:04

ALERT: Passed Yesterday's High/Low 

Alphabet Inc.NASDAQ

Mô tả

This is just a simple script to show if the current price passed yesterday's high or low price. It will create an alert if so (which can be set up to notify you via email or text).

blog.tradingview.com/?p=1633
Bình luận
HTVH
Mind asking what function if I change from "yesterday" to "Monday" high / low?
P11811
hi zorro, Very Good Morning I having issue with above code when using in stock it's using closing price day before close as high kindly could you please help in code expecting your help thanks in advance
BB3
Thank you for posting
Would it be possible to adapt your code to plot the previous x days high/low? ( eg 20 and 55 day high/low as in the turtle system)
If so would you mind showing me?
Cheers Bert
accidentje
Hi Zorro-Astrian, thanks for the script. I was wondering if you could adapt the script to the following conditions (regardless of the timeframe):
> The plotted high (or resistance level) = the high, after 4 previous lower highs and before 2 lower highs
> The plotted low (or support level) = the low, after 4 previous higher lows and before 2 highers lows
Zorro-astrian
Possibly--could you give me an example?
Zorro-astrian
I think you're saying to look back 7 previous highs (all of which are lower than the current one) and plot the value of the 5th high. (And then do the opposite for the lows)?
accidentje
No; the high that needs to be plotted should be confirmed when 1. it's higher than the 4 prior (lower) highs AND 2. higher than the 2 following (lower) highs.
The low that needs to be plotted should be confirmed when 1. it's lower than the 4 prior (higher) lows AND 2. lower than the 2 following (higher) lows.
accidentje
Zorro-astrian
Ok so you included today's high (and the previous 6 highs). You did h0 through h6 (which is 7 highs), and you stipulated that h2 (the 5th high) should be plotted. The only real difference is you meant the 5th high should be the highest, and the 6th the second highest.

By including today's high (which changes as new data arrives), you could get thrown off a bit.
You might want to stipulate opening price of today rather than the high of today (and keep the other highs the same)... As far as I understand, but i'm a noob...
Thêm nữa