TradingView
DevLucem
12 กุมภา 2020 เวลา 8 นาฬิกา 31 นาที

ZigZag++ 

คำอธิบาย

Hey Awesome Traders

I noticed people were so happy with my ZigZag lucemanb script and so I made one that is more user-friendly and customizable

Please note the original one is dedicated to developers, The code is very minimal for fast understanding when anyone wants to use it in their development

In this script, I have included several features like multi-timeframe and alerts. Do take a look and enjoy


If you are using the indicator, please comment down the link to your script


If you would love to support my work through donations, Am so happy to receive them


ADDITIONAL FEATURES

Do u have an idea or a feature that you want to be added,
You can ping me or ask about it here, I can always update



Check out some of the best works i have done with this script


1. Angle trading


2. Harmonic Patterns

เอกสารเผยแพร่

Requests from users update

++ Remove repainting ✔️
++ Improved Background Visual ✔️
++ Efficient Code ✔️

เอกสารเผยแพร่

Request Updates
++Seperate Alerts
++StreamLine Multi-Timeframe Setting
++Updated Defaults
++Added Black Color

เอกสารเผยแพร่

Requests Updates
++ Lows and Highs Labels ✔️
++ ZigZag Tips Prices Tool Tip ✔️

เอกสารเผยแพร่

Bug Fix

เอกสารเผยแพร่

2021 Swift Update
++ Code Reduced by 50% For Faster Processing ✔️
++ Bugs Fix On Some Pairs ✔️
++ Condensed Function For Easier Implementation ✔️

เอกสารเผยแพร่

Improvements for the new algorithm
++ Drawing Bug Fix ✔️
++ Added Backstep ✔️

เอกสารเผยแพร่

Clean up
++ Version 5 Update ✔️
++ Added alert function call ✔️

เอกสารเผยแพร่

Happy New Year
++ Updated Scanning Algorithm ✔️
++ Control Label size and color ✔️
++ Hide & Show Various Drawings ✔️
++ Fixed Overlapping ZigZag ✔️
++ Added Alerts to HH, LL, HL and LH labels ✔️
++ Advanced repainting control! ✔️
ความคิดเห็น
sharpie0319
Hey chief, great ZigZag implementation. Do you mind to include Fibo Retracement? Thanks
DevLucem
@sharpie0319, Hi, This is a good idea. So many people have mentioned this. Consider it done.
arpbsr
@DevLucem, Just wondering of this was done
DevLucem
udayb
Great work Dev Lucem. Can you add code to get the line slope (in degrees) and price traversed by each zigzag line.
DevLucem
@udayb, Thank you so much.
I have had a tedious time working with degrees as charts are not static like the real world. They are relative. However, this is what excites me, could you illustrate more on your concept?
lesacrevnar
@DevLucem, nope Dev. You shouldn't have hard time.
Hear me out here.
angles hav nothing to do with chart not being VISUALLY static because of scaling.
Angles never change. Scaling and your eyes are tricking you.
Use this method.
Let's have a bullish zigzag leg AC and consider it the hypothenuse.
To find the angle, we have cos sin or tan.
But we can only use tan because theres no hypothenuse in its formula.
Tan angle = (PRICE LEVEL C - PRICE LEVEL A) / (TIME LEVEL C - TIME LEVEL A)
So the angle will arctan

If the zigzag leg is bearish, we have to put minus at the beginning
lesacrevnar
@lesacrevnar,
To get the angle, you think in terms of right angle triangle with the hypothenuse being the zigzag leg AC.
But we cannot get an expression for AC 'distance' used by sin(angle) and cos(angle).

So only tan(angle) = BC / AB can be used, because
-AB is expressed in terms of days difference = TIME LEVEL C - TIME LEVEL A
-BC is expressed in terms of points or pips difference = PRICE LEVEL C - PRICE LEVEL A

I hope it helps.
My previous message was written in a rush.

If you need more explanation, don't hesitate
DevLucem
@lesacrevnar, I see your idea. How do you intend to use it in your trading?
lesacrevnar
@DevLucem, it was not my idea.
I was just trying to contribute to the exchange between you and udayb, since you mention having "a tedious time working with degrees as charts are not static like the real world".
but the thing is chart s are static. scaling is tricking our visual into seeing a changeable chart in terms of angle and distance.
indeed the number of candles (or periods) between 2 points does not change.
similarly the number of pips or points between 2 points does not change either.
You could google search "angle cos sin tan".
Considering the hypothenuse as the zigzag leg, you will see that the only practicable formula is the tan because:
-as hypothenuse or zigzag leg itself can not be expressed in its distance; so cos and sin formulas should be avoided;
-tan is the only way around as its formula does not involve hypothenuse
เพิ่มเติม