简体   繁体   中英

Pine Script - Conditional plot based on horizontal line

Just wondering if anyone knows if it's possible to plot a shape only IF it passes through a horizontal line.

For example, if I want to say something is a hanging man only IF it meets the normal hanging man criteria AND the candle has passed through a horizontal line I've plotted.

eg on the image below the left hand one didn't touch the purple horizontal line so I don't want that to be labelled a hanging man. The candle on the right however did interact with the line, so should show (as it is) as a hanging man.

Any help kindly appreciated.

Thank you!

在此处输入图片说明

你只需要把这个添加到你的吊人条件中

high >= purple_line and low <= purple_line

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM