Build your own trading indicator

To build a custom trading indicator, you write a short script that runs once per bar, reads price and volume, and plots a result on the chart. Most charting platforms have their own scripting language for this, and Obelion's is OmegaScript. Start with something simple, like a moving average, then add one rule at a time and test each change.

Read the OmegaScript documentation

How indicator scripts work

Indicator languages treat every value as a series indexed by bar. The script runs once for each bar from the oldest to the newest, so close means this bar's close and close one bar back means the previous one. Early bars, before a 20 bar average has enough history, return an empty value that the script has to handle.

A script usually has three parts: a header that names it and says whether it draws on the price pane or in its own pane, inputs that show up as settings, and plots that draw lines, histograms, shapes or labels.

Testing an indicator without fooling yourself

Repainting is the most common trap. An indicator that uses future bars, or that changes past values when a new bar arrives, looks perfect on history and fails live. Check how each signal looked on the bar where it first appeared.

Overfitting is the second. Tuning ten inputs until the past looks good fits noise. Keep inputs few, test on periods you did not tune on, and judge results over many trades.

Choosing a platform to script on

Look at what the language can do, what the platform lets you share, and whether your indicator can run next to the data you care about. A script that needs options or gamma data has to run where that data lives.

OmegaScript on Obelion

OmegaScript is Obelion's language for custom indicators. It uses the same per bar series model that Pine Script and thinkScript users know, and it imports most Pine indicator scripts automatically, with a report of any lines it could not convert. Scripts run sandboxed with no network or file access, and the same bars and script always give the same output.

OmegaScript is in private development. Authoring is currently open to Omega members, a plan offered by invitation, and to approved trial accounts. The documentation is public.

Questions

Do I need to know how to code to build an indicator?
Basic scripting helps, but indicator languages are small. If you can describe the rule in a sentence, like close above the 20 bar average, you can usually write it in a few lines after reading the examples.
Can I import Pine Script indicators into Obelion?
OmegaScript imports most Pine indicator scripts. Advanced ones may need small changes, and the importer lists exactly which lines it could not convert.
What is repainting?
An indicator repaints when its past values change after new bars arrive. It makes history look better than live trading will be.
Who can use OmegaScript?
Anyone can read the documentation. Writing and publishing scripts is currently limited to Omega members and approved trial accounts.

Related

For education only, not financial advice. See the disclaimer.

Build Your Own Trading Indicator: Custom Indicator Scripting Explained | Obelion