Writing scripts
Style, debugging, performance, publishing and sharing.
- Style guideHow to name, declare, lay out, comment and color ChartScript code so it reads well, works in every chart theme and is ready to share.
- Designing your script's settingsSections, rows and color roles that make your script's settings dialog easy to use, with presets and label sizes that just work.
- DebuggingFind and fix ChartScript problems with the Problems tab, quick fixes, the Console, log messages, inspection plots and runtime error codes.
- PerformanceThe limits a ChartScript run works within, and how to write loops, drawings and requests that stay fast on every chart and every plan.
- ProfilingFind the slow part of a ChartScript script with the editor's profiler, and with compile times, time-limit messages, work counters and switches.
- Script screensRank the markets of a watchlist by what one of your scripts computes - how a script screen runs, which outputs become columns, and its limits.
- Publishing and licensesPublish a ChartScript script, choose its license and the version others run, update or unpublish it, and copy open-source scripts the right way.
- Visibility and protectionThe four ways to publish a script (Public or Invite-only, Open or Protected source), how protected scripts run, and managing invite-only access.
- Selling accessSell access to an invite-only script, in ChartDeck with Stripe or on your own site with the vendor API, access codes and signed webhooks.
- Sell with what you already haveKeep your customers, your payment setup and all of your revenue. Connect Discord, Whop, Patreon, Telegram or your own Stripe to an invite-only script.
- Discord rolesGive the members of your Discord server access to an invite-only script by their roles, using your own Discord bot.
- Whop membersGive the members of your Whop products and plans access to an invite-only script, with an API key and a webhook of your own.
- Patreon membersGive your Patreon members access to an invite-only script by tier, with an API client and a webhook of your own.
- Telegram membersGive the members of your private Telegram channel or group access to an invite-only script, with a bot of your own.
- Community rulesWhat you may publish as a ChartScript script, how reports and moderation work, and the rules for likes, boosts and comments on scripts.
- Your own Stripe checkoutAlready sell with Stripe Payment Links or subscriptions? Give buyers access to an invite-only script from your own Stripe account's webhook.