Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Williams Alligator not matching the one in trading view. Is it production ready? #10

Open
dsp1589 opened this issue Jul 22, 2024 · 2 comments

Comments

@dsp1589
Copy link

dsp1589 commented Jul 22, 2024

I pulled out some day level data and run the Williams alligator and the result does not match the TradingView. I tried both hl2 and close values as input and both did not yield the correct results.

Pine script used by TradingView.

//@Version=5
indicator(title="Williams Alligator", shorttitle="Alligator", overlay=true, timeframe="", timeframe_gaps=true)
smma(src, length) =>
smma = 0.0
smma := na(smma[1]) ? ta.sma(src, length) : (smma[1] * (length - 1) + src) / length
smma
jawLength = input.int(13, minval=1, title="Jaw Length")
teethLength = input.int(8, minval=1, title="Teeth Length")
lipsLength = input.int(5, minval=1, title="Lips Length")
jawOffset = input(8, title="Jaw Offset")
teethOffset = input(5, title="Teeth Offset")
lipsOffset = input(3, title="Lips Offset")
jaw = smma(hl2, jawLength)
teeth = smma(hl2, teethLength)
lips = smma(hl2, lipsLength)
plot(jaw, "Jaw", offset = jawOffset, color=#2962FF)
plot(teeth, "Teeth", offset = teethOffset, color=#E91E63)
plot(lips, "Lips", offset = lipsOffset, color=#66BB6A)

@dsp1589
Copy link
Author

dsp1589 commented Jul 22, 2024

I tried both 13,8,5(8,5,3) and 21,13,8(13,8,5) as inputs

@Vultwo
Copy link
Member

Vultwo commented Jul 22, 2024

Hi, could you provide some raw input and output data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants