最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

pine script - heikin ashi multi timeframe issue, unsolved for long time - Stack Overflow

programmeradmin4浏览0评论

//@version=5

indicator(title="Relative Strength Index", shorttitle="RSI", format=format.price)

// User inputs for timeframes

tf1 = input.string("1", title="Timeframe 1", options=["1", "3", "5", "15", "30", "45", "60", "120", "180", "240", "D", "W", "M", "3M", "6M", "12M"])

tf2 = input.string("3", title="Timeframe 2", options=["1", "3", "5", "15", "30", "45", "60", "120", "180", "240", "D", "W", "M", "3M", "6M", "12M"])

tf3 = input.string("5", title="Timeframe 3", options=["1", "3", "5", "15", "30", "45", "60", "120", "180", "240", "D", "W", "M", "3M", "6M", "12M"])

tf4 = input.string("15", title="Timeframe 4", options=["1", "3", "5", "15", "30", "45", "60", "120", "180", "240", "D", "W", "M", "3M", "6M", "12M"])

tf5 = input.string("30", title="Timeframe 5", options=["1", "3", "5", "15", "30", "45", "60", "120", "180", "240", "D", "W", "M", "3M", "6M", "12M"])

tf6 = input.string("60", title="Timeframe 5", options=["1", "3", "5", "15", "30", "45", "60", "120", "180", "240", "D", "W", "M", "3M", "6M", "12M"])

tf7 = input.string("D", title="Timeframe 5", options=["1", "3", "5", "15", "30", "45", "60", "120", "180", "240", "D", "W", "M", "3M", "6M", "12M"])

ha_open = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, open)

ha_high = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, high)

ha_low = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, low)

ha_close = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, close)

cal_ha(ha_open,ha_high,ha_low,ha_close) =>

ha0 = ha_open < ha_close ? "

发布评论

评论列表(0)

  1. 暂无评论