Here is the professional Pine Script (v5) for TradingView, written entirely in English. This script identifies Buy and Sell zones based on the RSI indicator for OGUSDT.
OGUSDT Trading Strategy Script//@version=5
strategy("OGUSDT Advanced RSI Strategy", overlay=true, initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// --- Input Settings ---
rsiLength = input.int(14, title="RSI Length")
overboughtLevel = input.int(70, title="Overbought Level (Sell)")
oversoldLevel = input.int(30, title="Oversold Level (Buy)")
// --- Calculations ---
rsiValue = ta.rsi(close, rsiLength)
// --- Logic ---
buySignal = ta.crossover(rsiValue, oversoldLevel)
sellSignal = ta.crossunder(rsiValue, overboughtLevel)
// --- Visuals (Plotting on Chart) ---
plotshape(buySignal, title="Buy Label", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY", textcolor=color.white)
plotshape(sellSignal, title="Sell Label", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL", textcolor=color.white)
// --- Execution ---
if (buySignal)
strategy.entry("Long Position", strategy.long, comment="Enter Buy")
if (sellSignal)
strategy.close("Long Position", comment="Exit Buy")
// Color the RSI background for visual aid
plot(rsiValue, "RSI Value", color=color.purple)
hline(overboughtLevel, "Overbought", color=color.red)
hline(oversoldLevel, "Oversold", color=color.green)
How to use this script:
Open TradingView and select the OG/USDT chart.
Click on the "Pine Editor" tab at the bottom of the screen.
Delete any existing code and paste the English code provided above.
Click "Save" and then click "Add to Chart".
You will now see green BUY and red SELL labels directly on your chart.
#OGNUSDT #WriteToEarnUpgrade #GoldSilverAtRecordHighs #USJobsData #BTCVSGOLD