👉START HERE

🚀 Hey! Start Here!

Welcome to FXR Script! 🎉 First of all, THIS IS NOT PINESCRIPT. This is your new playground for building trading indicators and strategies. Don’t worry if you’ve never coded before — the structure is super simple, and you’ll pick it up quickly.

Step-by-step: Create a Custom Indicator

1) Open the Code Editor

  1. Go to the top-left of the platform.

  2. Click the Editor button.

  3. The Code Editor will slide in from the right side of your screen.

2) Create a new Custom Indicator

  1. When the editor opens, you’ll land on a Welcome page with two options:

    • New: create a brand-new Custom Indicator

    • Repository: view and manage indicators you’ve already created

  2. Click New.

  3. A new window will appear—type a name for your indicator (pick something memorable).

  4. Click to save—and that’s it. Your Custom Indicator is created and ready to edit.

3) Run the template example

  1. After creating it, you’ll see a code template. This is a quick example showing what you can build.

  2. Want to see what the script does?

  3. Click the Run button.

  4. A confirmation window will pop up asking you to select/confirm the indicator—click Proceed anyway.

  5. Boom ✅ The indicator will run and you’ll see it plot shapes on the chart.

How Scripts Work

Every script has two main parts:

  1. init → runs once at the beginning (setup).

  2. onTick → runs on every new candle or tick (your logic goes here).

That’s it! Just two places where you write your ideas.

Basic Structure

Here’s the skeleton of every script:

  • indicator() tells the platform what your script is and where to show it.

  • Inside onTick, you can calculate values, draw lines, color bars, and more.

Example 1: Adding an Input

Let’s create a FVG indicator that you can customize with an input box.

Example 2: Drawing Something Simple

Let’s draw a line connecting the previous close with the current close.

Each candle will draw a line that follows the price movement.

💡 Tips to Get Started

  • Always start with init and onTick — keep it simple.

  • Use inputs to make your script flexible.

  • Use plot functions (line, barColorer, filledArea) to bring your ideas to life on the chart.

  • Don’t try to build something huge at first — start small (like moving averages or coloring bars).


✨ That’s it — you’re ready to start experimenting! Your first scripts might be super simple, and that’s perfect. Step by step, you’ll grow into more advanced logic.

Last updated