2 years ago

#43568

test-img

Hara

% distance between SMA and RSI lines, how to I code this in pinescript

Looking for advice from an advanced tradeview specialist: I have difficulty in finding a way to create a condition where :

When RSI(14) and SMA(14) have =< 5% distance from each other, dont make a deal. So a % distance between 2 variable lines.

When the 2 lines cross = value: 0, when the 2 lines are max distance away = 100. (not sure if this is useful but this reflect how I see the reading of the values)

How can I make this into a pine script as an indicator? I am very experienced with signals and indicators but never made my own, I think in this case I really have to start making my own if I ever want to have my example. (or if anyone knows a similar indicator please tell me) So anyone pointing me towards the right direction would be amazing!

pine-script

indicator

0 Answers

Your Answer

Accepted video resources