[RS]Function - Minkowski_distance

copy pasted description..
Minkowski distance is a metric in a normed vector space. Minkowski distance is used for distance similarity of vector. Given two or more vectors, find distance similarity of these vectors.
May 16
Release Notes: added more examples and a bug with valuewhen().
May 16
Release Notes: fixed, now it calculates accurately.
Remove from Favorite Scripts Add to Favorite Scripts


Yes this is super interesting! Does anyone know why this maxes and reverses most often when prices are hitting lows? On equities anyway... I have yet to study this on futures/commodities
h = valuewhen(high >= highest(10), high, 0)
b = valuewhen(high >= highest(10), n, 0)
mdn = f_minkowski_distance(h, b, close, n, p)

its checking the distance to the last high/pivot/resistance point
TransitMan RicardoSantos
@RicardoSantos, Thanks Ricardo I can't thank you enough for sharing so much of your intelligence, hard work and creative talent which reminds me I need to share some funds to you and others who I have come to rely on Do you have pay-pal share link?
Interesting! With EMA length = 2, the curve is very close to historical volatility. When replacing the EMA expression with close, it seems to be virtually the same curve (but different values of course).
"Replacing the EMA expression with close(t-1)..." (TV seems to filter the 1 in brackets that I typed.)
@Epi_, Yep, I was playing with values 8 and 55 and it looks like it can be a useful volatility indicator.
This is interesting, thanks for sharing!
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out