TradingView
xyse
Jan 29, 2021 11:31 PM

Benford's Law Deviation 

Bitcoin Cash / U. S. DollarKraken

Description

This Study uses Benford's Law, which states that unmanipulated numerical real-life data sets should contain a certain distribution of leading digits. This Mathematical Law may be useful to identify whether there is market-manipulation going on and to which degree. The higher the value the script outputs, the higher the deviation from the expected leading-digit distribution - indicating a possibly higher probability of market manipulation going on. The script fetches the leading digits of the volume and percentage price change and calculates their distribution to compute the deviation from the expected distribution according to Benford's Law.
Comments
chillcrypto
Very interesting. Thank you for this. Possible correlation to look for here is an indicator of shorts building a position with the assumption of a downward trend? Maybe an overlay with breadth-thrust or some other indicator would be interesting as well.
xyse
@conradkz, Yeah, on its own the indicator seems not to be all that useful. Feel free to use the code in one of your projects if you have some idea in mind. If I come across some good use for it I'll publish it on my TV.
jeno_
Getting some warning when recompile the script:

line 43: The function 'anonym_function_3' should be called on each calculation for consistency. It is recommended to extract the call from this scope.
line 43: The function 'anonym_function_4' should be called on each calculation for consistency. It is recommended to extract the call from this scope.
line 45: The function 'anonym_function_2' should be called on each calculation for consistency. It is recommended to extract the call from this scope.
line 45: The function 'anonym_function_3' should be called on each calculation for consistency. It is recommended to extract the call from this scope.
jeno_
It will be interesting to see if we can plot the actual / expected volume as well.
More