FX:GBPUSD   British Pound / U.S. Dollar
Here is an example of an RSI trading script for TradingView:

scss
Copy code
//@version=4
strategy("RSI Trading", overlay=true)

// RSI parameters
rsiLength = input(title="RSI Length", type=input.integer, defval=14)
overbought = input(title="Overbought Level", type=input.integer, defval=70)
oversold = input(title="Oversold Level", type=input.integer, defval=30)

// Define long and short conditions
longCondition = crossover(rsi(close, rsiLength), oversold)
shortCondition = crossunder(rsi(close, rsiLength), overbought)

// Plot RSI
plot(rsi(close, rsiLength), color=color.blue, title="RSI")

// Execute long and short trades
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.