........................................................................
HeekeeHas an optimized length standard deviation channel that I like to use 
https://zewp.com/cwont.php
........................................................................
SpankyCan you plot which weekend I have to buy BTC until it hits $120?
https://www.campidiot.com/viewtopic.php?id=1453674
........................................................................
Heekee wrote:
Has an optimized length standard deviation channel that I like to use
https://zewp.com/cwont.php
link to source code?
details on prompts used?
........................................................................
HeekeeSpanky wrote:
Can you plot which weekend I have to buy BTC until it hits $120?
https://www.campidiot.com/viewtopic.php?id=1453674


........................................................................
Heekeewrote:
link to source code?
details on prompts used?
Below is the initial prompt I used with Claude Opus 4.5 then for a bunch of refinements I used the Raptor mini model:
Build a self-contained PHP page stock.php that renders an interactive stock price chart using Chart.js and only native JavaScript (no frameworks). Follow these requirements exactly:
Server-side behavior (PHP):
Accept query param ticker (default "AAPL") and append (default append current quote; append=0 disables).
Fetch historical price CSV from: http://draco.jaroffiles.com/dat.php?yhoo=[TICKER]. Parse robustly (handle optional header row, CSV lines, different column orders). Use cURL.
Optionally append one "now" data point by fetching http://draco.jaroffiles.com/dat.php?quote=[TICKER]. If fetching/parsing the quote fails, continue without it and set a non-fatal flag so frontend shows a small note ("current quote unavailable — showing historical data only.").
Sort history ascending by date (best effort); produce two arrays for JS: labels (dates) and values (close prices). Gracefully handle empty/no-history (show a friendly message; do not render the chart).
No external server-side libraries required. Write safe, small, well-structured code and use atomic writes if persisting anything.
Frontend/UI:
Use Chart.js from a CDN (single script include). Render a responsive line chart of price vs date that matches the app's simple retro theme (use the same limited CSS variables used in other pages).
Provide checkboxes to toggle overlays: SMA-20, SMA-50, SMA-200, EMA-20, and a "Show Points" toggle. Compute SMA/EMA in native JS (no libraries).
If append was attempted but failed, show a muted note under the chart: "Note: current quote unavailable — showing historical data only."
If there is no history, show: "No price history available for <TICKER>."
Add a simple header with ticker input so user can load another ticker.
Behavior and UX:
Chart loads and toggles should be snappy; recompute overlays client-side on toggle.
SMA/EMA computations should handle missing or small datasets gracefully (no NaN/JS errors).
Provide example usage: stock.php?ticker=QQQ, stock.php?ticker=AAPL&append=0.
Keep code self-contained, single file, minimal CSS inline to match site look.
Acceptance criteria:
Visiting stock.php?ticker=AAPL displays a Chart.js chart of historical closes + appended quote (if fetch works).
Toggling SMA/EMA overlays works and updates chart without reload.
If quote endpoint fails, the chart still shows historical data and displays the non-fatal note.
If no historical data, the page shows the friendly "No price history" message and no errors.
Extras (optional, list as extras):
Add CSV or PNG export buttons.
Add volume bars when the CSV includes volume.
Add simple range selector (last 30/90/365/All).
Return:
A single file stock.php ready to drop into the app.
Short usage instructions and examples in a one-paragraph README comment at top of file.
If anything from the endpoints looks inconsistent, make conservative, robust parsing choices and prefer failing gracefully over throwing errors.
Put the css right in the php file along with an embedded favicon that is the letter C. I like kind of a retro theme, these are some colors I have liked in the past:
--font-main: 'Terminus','Courier New',monospace
--bg: #000 — black (page background)
--panel: #080808 — very dark panel/background
--muted: #808080 — gray (muted text)
--accent: #00aaff — cyan/blue accent
--accent2: #ffd700 — gold/yellow accent
........................................................................
HeekeeThe php source is a single file, the only other dependency is the chart.js
Message me and I can get it for you, I tried pasting it here but just got:
DAS TOO MANY EMOTICONS! SPREAD DEM EMOTICONS OUT MO!
........................................................................
Heekee wrote:
The php source is a single file, the only other dependency is the chart.js
Message me and I can get it for you, I tried pasting it here but just got:
DAS TOO MANY EMOTICONS! SPREAD DEM EMOTICONS OUT MO!
That's pretty impressive. Could a human being write better code? What would be the differentiators?
How many lines in the php file?
........................................................................
.,Spanky wrote:
Can you plot which weekend I have to buy BTC until it hits $120?
https://www.campidiot.com/viewtopic.php?id=1453674
you have to buy this weekend - trust me bro
........................................................................
Heekeewrote:
That's pretty impressive. Could a human being write better code? What would be the differentiators?
How many lines in the php file?
The php program is 1300 lines, Clude Opus 4.5 is crazy good, the code it writes is excellent.
Software devs are very close to being completely obsolete 
........................................................................
Previous | First | 1 | Last | Next