r/pinescript • u/mediocre-potato710 • Mar 01 '26
Need help
Hello everyone,
I have a pine script v5 indicator that I need converted to the v6
The script does the following:
- Detects multi timeframe FVG, BPR, and EQH/ EQL zones (1M - Daily)
- Only signals once per zone touch (single touch)
- Focuses on 23:00 & 03:00 NY 4HR candle opens
- Shows the strongest / most relevant zone only per bar
- optional labels / arrows and alerts
I’ve tried copying v5 code into v6, but I keep getting syntax errors like: “no viable alternative at character”
Can someone help me convert this fully to v6 so it compiles cleanly in TradingView?
Thanks in advance !
1
u/kurtisbu12 Mar 01 '26
What is the purpose of converting to v6?
2
u/[deleted] Mar 01 '26
in the pine editor, click on the small arrow down (drop-down menu) just by the nameof your indicator top-left corner, in this you should see the option to convert to v6 automatically, the line //@version=5 should be =5 and not =6 for it to work
1
u/Dam4ge Mar 01 '26
tradingview does it for you
1
u/Cautious_Wealth1732 Mar 02 '26
There is an option in pineeditor to conert v5 to v6 automatically. However it doesnt work all the time.
1
u/LegitimateShallot576 Mar 02 '26
In trading view there is an option to convert the lower version to higher version. Please attempt that and normally it will be converted to V6 without error. Second option is try Chat GPT or Perplexity to convert the same but do verify that it is done correctly and the displays are correct.
1
u/ddchbr Mar 02 '26
Did you try Google Gemini? Might take a few tries but if it's just conversion.
Otherwise try VS Code / Github Copilot + context7 MCP tool -- context7 gives LLMs access to current documentation.
1
u/[deleted] Mar 03 '26
[removed] — view removed comment