OPEN-SOURCE SCRIPT
已更新 Zig Zag Pips

How does this zigzag indicator work? First of all, I would like to clarify that the original code is belong to TradingView. I only edit and add my personal touch to suit my style of trading.
1. This indicator is best use for Forex due to the calculation of pips.
2. Unfortunately, this indicator is not suitable to use in any Japanese pair due to the nature of the currency. " Japanese yen only has 2 decimals"
3. I change the input of "deviation" into "pips" so it will be much easier for me to calculate the distance between high and low.
4. U can change the source of price, let say, u prefer the indicator to draw at close price for both high and low, u can simply change the setting.
The purpose of this indicator is to draw high and low of the price. Thank you.
1. This indicator is best use for Forex due to the calculation of pips.
2. Unfortunately, this indicator is not suitable to use in any Japanese pair due to the nature of the currency. " Japanese yen only has 2 decimals"
3. I change the input of "deviation" into "pips" so it will be much easier for me to calculate the distance between high and low.
4. U can change the source of price, let say, u prefer the indicator to draw at close price for both high and low, u can simply change the setting.
The purpose of this indicator is to draw high and low of the price. Thank you.
版本注释
An alternate ZigZag indicator of a preset indicator. I just change the calculation of from percentage to pips valueMar 25
Release Notes: Update version of zigzag in pips instead of the percentage. The original code belongs to TradingView and I only add a few lines of code to suit my style of trading. The setting of a decimal is for the calculation of pips in the instrument u are trading. Let's say if u are trading USDJPY, change the decimal to 1, and if u are trading EURUSD, change the setting to 100.
The logic behind this setting is, EURUSD has 5 decimal places (example = 1.43542).
1. 0.43 is sen
2. 0.0054 is the pip
3. 0.00002 is the tick.
Therefore we use 100
In the case of the Japanese pair (example = 111.161).
1. 0.161 is the pips so we set it to 1
I hope my explanation is understandable. Cheers
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。