Reputation: 985
I want to get SRSI junction. I can receive SRSI crossing event in tradingview but I can't get junction.
I want to get these numbers and crossing status. 85:short, 20:long: 90:short something like that. Is this possible on tradingview or any other platform like metatrader etc.
Upvotes: 0
Views: 119
Reputation: 21219
You can use crossover()
and crossunder()
functions for that.
crossover()
The
x
-series is defined as having crossed overy
-series if the value ofx
is greater than the value ofy
and the value ofx
was less than the value ofy
on the bar immediately preceding the current bar.crossunder()
The
x
-series is defined as having crossed undery
-series if the value ofx
is less than the value ofy
and the value ofx
was greater than the value ofy
on the bar immediately preceding the current bar.
Then you can combine these with simple logic operations.
short = (line1 > 85) and (crossunder(line1, line2))
long = (line1 < 20) and (crossover(line1, line2))
Upvotes: 1