o3-2025-04-16· OpenAI
LMArena Human Preference 140K
pinescript, in chart.point.new time, index, price does index is back from current of…
- User
pinescript, in chart.point.new time, index, price does index is back from current of from 0 to current which is newest
- Assistant
chart.point.new()accepts two possible X-coordinates:- A UNIX
timevalue (milliseconds). - A bar index (exactly the same scale used by the built-in
bar_index).
When you pass an index, it is the absolute bar index on the chart—not a negative/relative offset.
Counting starts at the very first (oldest) bar:• index 0 → oldest bar on the chart
• index 1 → second-oldest bar
• …
• indexbar_index→ current (newest) barSo:
//@version=5 indicator("chart.point index demo", overlay = true) // 1) Point on the current bar chart.point.new(bar_index, high, text = "Now") // 2) Point 5 bars back int offset = 5 chart.point.new(bar_index - offset, high[offset], text = "5-ago") - A UNIX
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.