πStep 5: Start building
Alright, the warm-up is done β now itβs time to get your hands dirty (figuratively).
This is where we actually start writing code for your custom indicator.
Before we dive into coding, make sure your setup is ready to roll. Youβll need access to the FTO Indicator API to make things work smoothly.
Not there yet? No problem β check out the setup guide first, get your environment prepped, and then come back here. Itβs a quick read and will save you a ton of head-scratching later.
For this example, weβll let Cursor do some of the heavy lifting: weβll ask it to create the On Balance Volume (OBV) indicator for us. Weβll start simple β with a completely empty file β so you can see the process from scratch. Later, when youβre more comfortable, you can speed things up by using some of our pre-built indicator foundations (youβll find them in this section).
Think of this as baking your first cake from flour and sugar β once youβve got the hang of it, you can use ready-made mixes to save time.
When we asked Cursor to create the OBV indicator, we didnβt just say βdo it.β We gave it some context β included the FTO Indicator documentation and the Rules we set up earlier. In the screenshot (Picture #1), you can see exactly which parts of the documentation Cursor decided to use. Itβs like watching your AI buddy flip through the manual before giving you the best answer.

In the result, we got code below
Time for a Quick Fix
The current logic looks solid so far, but thereβs a catch: itβs locked to using the Close price only. Thatβs a bit limiting, right? What if someone wants to use the High, Low, or Open price instead?
No worries β letβs get Cursor to step up its game. Weβll ask it to tweak the code so users can pick their preferred price type. (See Picture #2 to follow along.)

Cursorβs Updated Code
After we asked Cursor to improve the OBV indicator, hereβs what it came up with in its second response.
This version lets users choose the price type instead of being stuck with the Close price β nice upgrade! (See below.)
A Little Upgrade Goes a Long Way
With that new parameter and internal method added, Cursor gives us a neat bonus: a dropdown menu for choosing the price type.
No more hardcoded Close price β now you can pick what you need right from the list. (See Picture #3 β thatβs your shiny new option selector!)

Wrapping Up
And thatβs it β with just two simple requests, Cursor delivered a fully working OBV indicator.
All it took was a proper setup, some clear Rules, and a bit of documentation magic to give it the right context.
Not bad for a few clicks, right? Less typing, more building.
Last updated