Pine v5 Indicator for Forex and Commodities

Job ID: 39747876

Budget: £10 – £20 GBP

Build a Pine v6 indicator for XAUUSD, USD FX majors, and liquid commodities that prints one GK BUY/SELL per session using a time-anchored Opening Range Breakout. Sessions: 09:00 and 13:30 (Europe/London). Range windows: 08:00–08:59 and 13:00–13:29 on 5m. Breakout = close beyond ORH/ORL + buffer where buffer = max(ATR(14)0.1, 4syminfo.mintick). Trend filter = EMA13 vs EMA55 (bullish if EMA13>EMA55; bearish if EMA13<EMA55). SL = opposite side of opening range ± buffer. TP1 = 1× opening-range size. Plot label (“GK BUY/SELL”) and TP/SL boxes. Inputs: enable sessions (09:00/13:30), EMA lengths, ATR buffer multiplier, TP multiple (default 1.0), timeframe lock = 5m (user can change). Enforce one print per session per day. Must compile error-free.

A bit more detail (still brief)

Scope: Works on XAUUSD, USD FX pairs (e.g., EURUSD, GBPUSD, USDJPY, USDCAD), and commodities (e.g., WTI/Brent, SILVER). No symbol hardcoding; use syminfo.mintick for buffers so it adapts to tick sizes.

Sessions (Europe/London):

09:00 print → build range from 08:00–08:59 (5m, 12 bars).

13:30 print → build range from 13:00–13:29 (5m, 6 bars).


Signal logic:

BUY if close > ORH + buffer and EMA bias bullish.

SELL if close < ORL - buffer and EMA bias bearish.

After one signal in a session, lock out further prints until next session/day.


Risk levels:

SL at opposite side of range ± buffer.

TP1 at 1× range (make TP multiple input; default 1.0).


Plots/UX:

Labels “GK BUY”/“GK SELL” on the breakout bar.

TP/SL horizontal lines or shaded boxes.

Toggle on/off each session; toggle EMA vs VWAP (optional).


Engineering notes:

Use hour(time, "Europe/London")/minute() for session control.

Use ta.highest/ta.lowest for ORH/ORL over fixed bar counts.

Use var flags + dayofyear() to enforce one-print rule.

Keep code minimal; no repainting; use barstate.isconfirmed for signals.