TradingView
RicardoSantos
15 Mei 2019 pukul 12.39

[RS]Function - Minkowski_distance 

Euro Fx/U.S. DollarFXCM

Huraian

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.

Nota Keluaran

added more examples and a bug with valuewhen().

Nota Keluaran

fixed, now it calculates accurately.

Nota Keluaran

update for v5, function is imported from a library now
Komen
OutsourcE
@RicardoSantos , can you or, maybe, someone do a simple price cases script?
It's finite set of the price cases.Its as follows:

High>high(1) - translation up
Low<low(1) - translation down
High>high(1) and low<low(1) - outside bar
High<high(1) and low>low(1) - inside bar
High<high(1) and low == low(1) - flat bottom pennant
High == high(1) and low>low(1) - flat top pennant
Low == low(1) and high>high(1) - stitch up
High == high(1) and low<low(1) - stitch down
High == high(1) and low == low(1) - harmonic bar
And there's a case Which consists of 2-3-4 etc consecutive inside bars and is called - congestion,(which i have no absolutely clue how to implement, hence my request) that ends either with the bar closure or high or low(as an option)

There could also be an option to color the outside bar,in regard its closure.

It's very useful script that helps to identify and utilize the guys participating in the market moves

Of course it can be done by hand, but would be very neat thing to have around.

Cheers 🥂
OutsourcE
@OutsourcE, btw, there's no such thing still on TV , in an era lol,which is amazing!
OutsourcE
@OutsourcE, Hint:
When within the Congestion case, start counting cases again AFTER the bar#3, not ending the Congestion, as it ends with breakout, but in this way you be doing micro stuff,vwhen and if you have a prolonged Congestion.

Stuff should be an optional arrow in a traders quiver... Thanks in advance!
OutsourcE
@OutsourcE, Hint2(sorry, forgot to add it):
It's when the secondary inside bar established,And so it turns into congestion and is being redrawn(remarked, resgaped, etc ... whatever method is implemented, I'm for just colouring) into a color that's being assigned to congestion (that's for keeping a chart cleaner).For the Congestion a box with area could be added, optionally.

Cmon, guys! Who wants to be featured and rewarded with even more coins!!lol
OutsourcE
Guys, who'd update this guy? I'm using it.
RicardoSantos
@OutsourcE, its updated to V5
OutsourcE
@RicardoSantos, 🙏👍🥂
OutsourcE
@RicardoSantos, is there a way to normalize the scale, as it varies for different instruments.For BTC it's through the Manhattan roof?)
TransitMan
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
RicardoSantos
@TransitMan,
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
Lebih