Zig Zag High Low

Zig Zag script that uses local minimums and maximums as pivot points . It can be used as a source for pattern recognition.
從常用腳本中移除 新增至常用腳本


Does it account for different timeframes?
+4 回覆
Tr0sT Virking_online
@Virking_online, it uses only "current" timeframe
Will this change the final leg after price moves?
+3 回覆
Tr0sT colibribull
@colibribull, yes, it can
+2 回覆
Here's the Enhancement I made based on your ZigZag Script.

Thanks again for your help! I love the community... Strength in numbers!

Trade well, and trade Long!

+1 回覆
Hey, Tr0st! Great indicator...

I'm trying to get the RSI to appear at the Pivot highs, but I can't figure out how to do it... it's always offset... I'm trying to use the code:

rsiVal = rsi(close, 14)

to get the RSI and, na, text=tostring(rsiVal),, textcolor=color.white, style=label.style_label_up, yloc=yloc.belowbar)

to add the label.

Can you help me with the final piece to this puzzle?

Tr0sT ocaptain
@ocaptain, use this line as a guidance
timeHigh - length, lastHigh,
timeLow - length, lastLow,
xloc.bar_index, color=_li_color, width=2

It contains coordinates of pivot points
@Tr0sT, Thanks for your response! Yep, I figured out the offset problem with that very line of code you pointed out... Now I just have a problem displaying the right value... I'm trying to make a running variable asking "if the current high is greater than the recorded high, get the RSI. Then when your code prints the line, I print the value of the RSI (14 close) above it but it never matches the value of the built-in indicator.

After your declaration of the 6 var's, I added:

var rsiVal = 0.0
if high > lastHigh
rsiVal := round(rsi(close, 14))

Then under the 'if dirup' line I added this to display the label:, na, text=tostring(rsiVal),, textcolor=color.white, style=label.style_label_down, yloc=yloc.abovebar)

It's weird because the value displayed in the label isn't even an RSI value anywhere within the vicinity of the pivot high - I don't know where that value is coming from.

Again, I appreciate your help! -Anthony
Tr0sT ocaptain
@ocaptain, you prints current bar's rsi value to previous bar's pivot point
you need to change rsiVal calculation to somethink like this
rsiVal := (rsi(close, 14))(length)
use square brackets around length (TV does not allow to use them in comment)
@Tr0sT, Thanks, man! That did it... I also had to move the label line to the next code block because each pivot high was displaying the value of the *previous* pivot high. A few more tweaks to the code and I'll publish it to the community. Take care!
首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 如何運作 圖表功能 價格 推薦朋友 網站規則 幫助中心 網站 & 經紀商解決方案 小工具 圖表解決方案 輕量圖表庫 部落格 & 新聞 推特
概覽 個人資料設定 賬戶和賬單 推薦朋友 代幣 我的客服工單 幫助中心 發表的想法 粉絲 正在關注 私人訊息 在線聊天 登出