MFI或RSI hline突破时如何标注bar [英] Inquiries on how to label bar when MFI or RSI hline is breakthrough

查看:62
本文介绍了MFI或RSI hline突破时如何标注bar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果 MFI 或 RSI 超过 hline(80) 或 hline(20),我想标记柱线.有谁能告诉我剧本吗?谢谢^^

If MFI or RSI exceeds hline(80) or hline(20), I want to label the bar. Is there anyone who can tell me the script? Thank you ^^

推荐答案

示例

//@version=4
study("My Script",overlay=true)
length = input(14),src = input(close)
//----
mfi = mfi(src,length)
rsi = rsi(src,length)
cnd = crossover(mfi,80) or crossover(rsi,80) or crossover(mfi,20) or crossover(rsi,20)
plotshape(cnd ? close : na,location=location.belowbar,text="Text")

您也可以在 if 语句中使用 label.new,但 plotshape 可能更适合您的情况.

You could also use label.new within an if statement but plotshape might be more appropriate in your case.

这篇关于MFI或RSI hline突破时如何标注bar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆