theheirophant

Nth-Occurrence Custom barssince() Function by Cryptorhythms [CR]

Nth-Occurrence Custom barssince() Function by Cryptorhythms

Description
The vanilla barssince() function in pine only finds the number of bars since the most recent occurrence of the condition. This version allows you to specify an Nth occurrence back to check the bars since! Its also a nice little one liner.

I really hope you enjoy it and if you're looking for more, this is our 79th script on TV, so there is plenty to choose from!

Let me know in the comments if you create anything useful from this or think of anyway to improve it!
從常用腳本中移除 新增至常用腳本

評論

This is a crazy good gem. Love it! Elegant, simple, brilliant and raw beauty. Thanks for this.
+2 回覆
amazing stuff. always so helpful!
+1 回覆
This publication will be featured in our "Best Scripts of The Month" selection. Thank you for your valuable contribution to the TradingView community, and congrats!
+1 回覆
Amazing and elegant implementation! Thanks for sharing ;)
+1 回覆
what is the usage of this?
回覆
theheirophant alirezakaj
@alirezakaj, you would use it in the same places that you would use barssince(). But with this version you can choose the barssince the third occurrence, or the 12th. In terms of trading there are tons of places you can use something like this. It simply counts how many bars have passed since the specified condition occurred.
回覆
首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 如何運作 圖表功能 價格 推薦朋友 網站規則 幫助中心 網站 & 經紀商解決方案 小工具 圖表解決方案 輕量圖表庫 部落格 & 新聞 推特
概覽 個人資料設定 賬戶和賬單 推薦朋友 代幣 我的客服工單 幫助中心 發表的想法 粉絲 正在關注 私人訊息 在線聊天 登出