Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
- // © ZenAndTheArtOfTrading.com
- // @version=4
- study("HLine Labels", overlay=true)
- // Plot HLine
- hlPrice = 1.00
- hl = hline(hlPrice)
- // Check if candle touches HLine
- touchesHL = low <= hlPrice and high >= hlPrice
- // Draw label only if candle touches HLine
- myLabel = touchesHL ? label.new(bar_index, high, text="Touch!", tooltip="Touches " + tostring(hlPrice), style=label.style_label_down, color=color.blue, textcolor=color.white, size=size.small) : na
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement