How to find the most similar profiles ? Let's start with an example:

I would like to know what alternative for euclidean distance could be use to distinguish if orange or blue plot is "closer" to red one. In which situations I should apply euclidean distance and when Bayesian approach can be used ? 
 A: If your curves are in fact probability densities (i.e., integrate to 1), or can meaningfully be scaled to be so, you could look at the Earth mover distance, AKA the Wasserstein metric. We have a couple of posts on this. In R, you can take a look at the emdist package.
A: If you look for same shapes (meaning you don't care about shifting or amplitude scaling) then you can preform Pearson correlation and take the maximum of the shifts. Eventualy it comes down to this:
$ similiarity = max_{\tau} |\frac{\int_{-\infty}^{\infty}x(t)y(t+\tau) dt}{||x||\cdot||y||}| $
I don't really understand what you meant in your comment since my biology knowledge is bad, but it sounds like you want the shape (but again, as said above, you should ask yourself what is "similiar")
A: Well, you could try out the Minkowski distance (which can be interpreted as the generalisation of the euclid distance). It is defined as:
$$
\textrm{Minkowski}(X, Y, \lambda)=
\left(\sum_{i=1}^n |x_i-y_i|^\lambda\right)^{\frac{1}{\lambda}}
$$
Try to vary $\lambda \in \mathbb{R}^{+}$, but pay attention that $\lambda < 1$ violates the triangle inequality and thus, the resulting function is not a true distance function anymore.
From my own experience, I've observed in many situations a peak in $\lambda =1$ which, when plugged into to above formula, results in the Manhatten distance.
