TrendSpider Software Update: JavaScript Custom Indicator Scripting Added | TrendSpider Blog Skip to Main Content

TrendSpider Software Update: JavaScript Custom Indicator Scripting Added

|
Share on social media

Hello, traders, and welcome to another software update from your friends here at TrendSpider! In this update, we are pleased to announce the introduction of custom scripting to the platform. Details after the jump!

If you’re a developer or coder, this update is for you! We now offer a robust environment to build your own custom indicators on TrendSpider using the JavaScript language.

Watch the Intro to Scripting Video

New Feature! Introducing JavaScript Custom Indicator Scripting | TrendSpider Software Updates

Why JavaScript?

JavaScript is a widely used general-purpose programming language that is utilized in numerous applications, including almost every website on the web.

“General purpose” means that it was not explicitly invented for finance, investing, or trading. Rather, it is a versatile programming language that can be applied across various industries and for diverse purposes.

If you know JS already, you’re ready to go: Any developer experienced in JavaScript can write sophisticated scripts on TrendSpider with a minimal learning curve. If you are a beginner, or familiar with other languages like Pine Script™, MQL or Think Script™, you should be able to adapt to JavaScript pretty easily by reading the documentation.

Built For Developers

Our scripting is packed with developer-centric features and capabilities, including:

  1. Example scripts included with the platform to learn off. Even more examples available right in the Code Editor within the platform.
  2. Integrated auto-complete and syntax highlighting.
  3. Integrated help and documentation (control+click on a command to open the documentation panel.)
  4. Browser-based debugging with your browsers debugging tools (JavaScript Console.)
  5. Support for select open source NPM packages.
  6. Ability to use your own IDE with the Code Editor to synchronize code you write in your preferred environment
  7. Dozens of helper functions to compute indicators, detect trendlines, find chart patterns and formations, and perform mathematical functions, transformations or operations.

Enabling the Code Editor

In order to access the scripting environment, click on the ‘Code Editor’ button in the top right corner of your platform view.

Code Editor Button Location

The Code Editor panel will appear at the bottom of your screen, similar to the Market Scanner or Strategy Tester, and it will come preloaded with a sample script.

In the image below, you can see the sample script and the corresponding indicator the script has built. In the top left corner of your chart, note the ‘Current Script’ indicator in the indicator list.

Examples of Custom Scripts

Inside of the platform, there are dozens of examples. Just click on Example Scripts in the Code Editor window to load them. You are free to copy these examples and base your own indicators on them. Here are a few samples to get you going:

Coloring candles basing on RSI value

The example below colors candles depending on what’s the corresponding RSI value. Color is blue when RSI is around 50, red when it’s around 100 and bright blue when it’s around 0.

const tinycolor = library('tinycolor2');

const colors = rsi(close, 14).
	map(value => {
		return tinycolor('blue').spin(3 * (value - 50)).toHexString()
	});

color_candles(colors);
Code language: JavaScript (javascript)

Double SMA colored clouds

color_cloud(sma(close, 10), sma(close, 30), 'red', 'green');
color_cloud(sma(close, 30), sma(close, 50), 'black', 'lime');
Code language: JavaScript (javascript)

Other Example Scripts of Custom Scripting in Action

Start Exploring Now

For a more in-depth view of how custom scripting works on the platform, please take time to read through the documentation provided here.

Our marketing department has demanded us mentioning docs. But we’re developers too. We know that nobody wants to read the docs. Go play with it!

Stay up-to-date: Subscribe to posts like this!

Receive automated updates from the Software Updates category
This site is protected by reCAPTCHA and the Google Privacy Policy and Google Terms of Service apply. Don't worry, we hate spam, too! See TrendSpider Privacy Policy for details.

Latest posts

|

Qualcomm Stock Surges on $60B Amazon AI Chip Deal

Qualcomm (QCOM) stock shares jumped sharply on September 8, rising toward the $180 level after the company announced a landmark multi-generation AI chip collaboration with Amazon Web Services, with one analyst labeling it a “net-net huge QCOM win.” The deal includes Qualcomm issuing Amazon warrants for up to 25 million shares at $161.26 per share, […]
|

NBIS Stock Surges on Palantir AI Partnership

Nebius Group (NBIS) stock jumped as much as 7% on September 8 after announcing a strategic partnership with Palantir Technologies (PLTR), which named Nebius its preferred sovereign AI infrastructure partner and will integrate Nebius compute and inference endpoints directly into the Palantir platform for commercial customers. The move followed a separate catalyst from late August, […]
|

Market Update Into September 7th: Inflation Data Incoming

Markets whipsawed last week as a wave of strong AI earnings hit the tape, crypto caught a bid, and Friday’s jobs report came in far hotter than expected, with 162,000 jobs added against estimates of just 53,000. AI and memory names led the charge as $AVGO, $DELL, and $HPE all crushed earnings, with $SNDK and […]
|

Uber Stock Faces AV Reckoning as Tesla Cybercab Launches

Uber Technologies (UBER) stock kicked off September with a double blow: a 3,300-person layoff (roughly 10% of its workforce) announced on September 2 to flatten management layers, immediately followed by the launch of Tesla’s Cybercab robotaxi service in Austin on September 4. Shares sold off heading into the Tesla event but have stabilized near $75-$76, […]