# Pine Script development from your written rules

URL: https://fincodelabs.com/en/services/pine-script-development · Publisher: Fincode (Fincode Yazılım ve Teknoloji A.Ş.), Istanbul, Turkey · Updated: 2026-11-06

Fincode codes indicators and strategy backtests in Pine Script for TradingView, from rules you have written. You get version 6 source, the inputs you chose and a plain note on how the script behaves on historical and live bars. This service stops at the chart: it does not connect alerts or webhooks to orders.

## TradingView's terms on alerts and webhooks

Section 3 of TradingView's [Terms of Use](https://www.tradingview.com/policies/), read on 5 November 2026, licenses its charts, alerts and webhooks for display use only. It prohibits using them for automated trading, automated order generation and other machine-driven processes, directly or through third-party products or services. The [Help Center](https://www.tradingview.com/support/solutions/43000481026-how-to-autotrade-using-pine-script-strategies/), read the same day, says strategy trading is limited to backtesting and that automated strategy trading with a brokerage account is not available on TradingView yet.

So this service stays on the chart. We write indicators, strategy backtests and alerts for you to read. We do not connect alerts or webhooks to orders as part of this work, and we do not suggest it as a next step. It is your agreement with TradingView: read the terms, and take legal advice before relying on anything else.

If you want written rules to run on a live account, [trading software built from those rules](https://fincodelabs.com/en/services/algorithmic-trading) can work directly from exchange data, with no TradingView link.

### What a Pine script can do

- Draw an indicator on your chart
- Simulate your rules in the strategy report
- Raise alerts that you read and act on yourself

It cannot place live orders by itself, and it is the wrong tool for order book or tick-level decisions.

## Who this suits

### Traders with written rules who do not code

Every condition is on paper, and you want to see it on a chart and in the strategy report.

### People with an older script

A version 4 or 5 script that needs to move to version 6, with an explanation of every trade that changes.

### People moving from MetaTrader

An MQ4 indicator you want on TradingView charts. You have the .mq4 source and the right to share it, and you accept that the logic is rewritten in Pine, not translated line by line.

### People with a script they do not trust

An indicator that looks different after a reload, or a backtest that seems too good. You have the source and the right to share it, and you want to know what it actually does.

### Users of AI-generated code

ChatGPT or a Pine Script generator gave you code that compiles. You want to know whether it does what you asked, on the version you need.

## Where Pine scripts go wrong

A script that compiles can still mislead you. Each of these is checked and written up. Facts below come from TradingView's manual, read on 5 November 2026.

### Repainting

The [manual](https://www.tradingview.com/pine-script-docs/concepts/repainting/) defines repainting as historical and realtime bars behaving differently, and estimates that more than 95% of indicators show some form of it. So the useful question is which form, and whether it matters to your rules. Your note says what changes on the open bar, and markers and alerts wait for the bar to close where your rules say so.

### Future data in higher-timeframe values

A `request.security()` call with lookahead on and no offset returns values on historical bars that nobody had at that moment. Higher-timeframe values are offset and confirmed, and any exception is documented.

### A backtest with no costs

Unless the script sets them, a strategy applies no commission and no slippage. Your fee and your slippage figure are written into the code, so the report opens with them.

### Fills nobody agreed on

By default an order created at a bar's close fills at the next bar's open, and on historical bars TradingView's [broker emulator](https://www.tradingview.com/pine-script-docs/concepts/strategies/) assumes a path inside each bar from the distance of the open to the high and low. If a stop and a target both sit inside one bar, that assumption picks the winner. Your rule sheet says which fills you accept.

### A version 6 conversion that changes behavior

The [migration guide](https://www.tradingview.com/pine-script-docs/migration-guides/to-pine-version-6/) says the default margin percentage is now 100, so entries that need more money than is available are not opened. Lazy evaluation of `and` and `or` can stop a function such as `ta.rsi()` from updating on every bar. Both versions run on the same symbol and dates, and every difference in the trade list is explained.

### A strategy on a Heikin Ashi or Renko chart

The manual says results on non-standard charts do not reflect actual market conditions by default, because trades are simulated on synthetic prices. The script says which chart type it is meant for.

### Limits that change the result

The [limits](https://www.tradingview.com/pine-script-docs/writing/limitations/) include 40 unique `request.*()` calls per script (64 on the Ultimate plan), 64 plot counts and 9,000 backtest orders (1,000,000 in Deep Backtesting), after which the earliest orders are trimmed. If your rules come near a limit, the note says so.

### Settings that override the code

Values in the settings dialog replace the defaults in the code, so a report can stop matching the brief without anyone noticing. The inputs list states the values your brief fixed.

## What you receive

- Your rules restated as testable statements, approved by you before coding
- Pine Script version 6 source, which you add to your own TradingView account
- An inputs list: each input, what it does and the default you chose
- Test notes against bars you marked, where a condition must fire and where it must not
- A repainting note: what changes on the open bar and what does not
- For strategies: your commission, slippage, margin and fill settings written into the code, with the exported report as a record
- For conversions: a before-and-after trade comparison

Acceptance describes how the script behaves. A return, a win rate or a backtest result is never an acceptance criterion. See [how we work](https://fincodelabs.com/en/how-we-work).

### What Fincode does not do

- Suggest rules, inputs or parameter values
- Tune settings to improve a backtest
- Connect alerts or webhooks to orders under this service
- Publish scripts on TradingView, sell invite-only access or build scripts for selling signals
- Open or copy protected and invite-only scripts

## What a rule sheet looks like

Every rule and every number on this sheet comes from you. It is what the script is coded and tested against.

**Sample rule sheet, not a real project. Brackets mark what you fill in.**

| Item | Sample entry |
| --- | --- |
| Script type | [indicator or strategy] |
| Symbol and timeframe | [symbol and data source], [timeframe], [session and time zone] |
| Entry condition | R1: [your condition], evaluated [at bar close or within the bar] |
| Exit condition | R2: [your condition] |
| What blocks an entry | R3: [your condition] |
| Inputs | [input name], default [your value] |
| Must fire | R1 on [bars you marked] |
| Must not fire | R1 on [bars you marked] |
| Strategy properties | Commission [your fee]; slippage [your ticks]; margin [your figure]; fill at [next bar open or bar close] |
| Alert text | [the message you want to read] |
| Rights in the code | [agreed in the contract] |

## What is checked first

### Whether the rules can be coded

Every condition, each input and its default, the order in which conditions are checked and what blocks an entry. A phrase like “strong trend” needs a number from you. We check that rules are precise enough; we do not supply them.

### Whether Pine is the right tool

Pine runs per bar on TradingView's data. Logic across many venues or a whole portfolio runs into script limits, and order book logic does not belong here. If that is your case, we say so before quoting.

### Indicator or strategy

An indicator draws and can raise alerts. In Pine's terms, a strategy is a script type that adds simulated orders and the strategy report; the rules in it are still yours. We explain what each gives you, and you decide.

### Your plan and your data

Bars on the chart and Deep Backtesting depend on your TradingView plan, as our [Strategy Tester guide](https://fincodelabs.com/en/blog/tradingview-strategy-tester) shows. A symbol's data also differs between venues, so the rule sheet names the data source.

### What the script is for

Your own use. Section 3 of TradingView's Terms of Use limits its license to personal or internal business purposes. Section 23 prohibits commercial use of invite-only scripts, which it defines widely, including use on behalf of a business, and says scripts for commercial use may be distributed only through its Marketplace. Selling signals can also be regulated, depending on where you and your customers are, and we decline that work.

## When you do not need us

Check first whether a built-in indicator or an open-source community script already does it, and read its license. A price crossing a line can be alerted from TradingView's alert dialog with no code at all. An AI tool may be enough for a personal indicator, if you check its output against the list above.

For a small one-off change, TradingView keeps a [list of Pine programmers](https://www.tradingview.com/support/solutions/43000601677-where-can-i-find-a-reliable-pine-programmer-to-hire/), and our guide to [hiring a Pine Script developer](https://fincodelabs.com/en/blog/pine-script-developer) says what to specify. If your rules need order book data, several venues or portfolio-level testing, Pine is the wrong tool: see [Pine Script to Python](https://fincodelabs.com/en/blog/pine-script-to-python).

### Rules not written yet?

Write them first. Fincode does not recommend strategies; strategy and investment decisions are yours. Once you have rules, we can check that they are precise enough to code and test.

## Questions about Pine Script development

### Can you write a TradingView strategy that places trades automatically?

No. Pine alone cannot place live orders: TradingView's Help Center limits strategy trading to backtesting. Its Terms of Use also prohibit using alerts and webhooks for automated trading, including through third-party products or services. This service does not offer that route.

### Can ChatGPT or a Pine Script generator do this instead?

Often, for a simple personal script. A clean compile says nothing about repainting, fills or costs, though, and generated code can target an older version. Check those points yourself, or send us the code and your rules and we can review it.

### Will you tell me whether my rules are any good?

No. Fincode does not recommend strategies. A backtest shows how your rules would have behaved on past data under the settings you chose. It does not predict results, and trades can lose money.

### Can you convert my script to Pine Script v6?

Yes, if you have the source and the right to share it. Conversion can change behavior, so you get a comparison of both versions on the same symbol and dates.

### Can you convert an MQ4 script to Pine Script?

If you have the .mq4 source, not only a compiled file, and the right to share it. It is a rewrite: MetaTrader and TradingView run on different data and bar models, so results will differ, and you get a comparison on the same symbol and dates with the differences explained.

### Can you fix a script that repaints?

Often, if you have the source. Some forms of repainting are acceptable, and some cannot be removed without changing what the script does. The note says which is which, and you decide.

### Can you copy or open a protected or invite-only script?

No. The author closed that code on purpose. If you have written rules of your own, we can code those from scratch.

### Is Fincode on TradingView's list of Pine programmers?

No. That list asks for verifiable references from previous customers, among other things, and Fincode has no client references to show. Fincode has no relationship with TradingView.

### Do you need my TradingView login?

No. You add the script to your own Pine Editor. Do not send passwords.

### Can I publish or sell the script?

Publishing is between you and TradingView, under its rules. Section 23 of its Terms of Use prohibits commercial use of invite-only scripts and points commercial scripts to its Marketplace. Read those terms first. We decline work meant for selling signals.

### How is the price set?

You get a written proposal with work items, dates and cost before work starts. Fees depend on scope and effort, not on trading volume or results.

## Read before you send a brief

- [Pine Script developer: what to specify](https://fincodelabs.com/en/blog/pine-script-developer): The brief, repainting questions and strategy settings to fix in writing.
- [TradingView Strategy Tester](https://fincodelabs.com/en/blog/tradingview-strategy-tester): Settings, metrics, plan limits and why a report can stay empty.
- [Backtesting pitfalls](https://fincodelabs.com/en/blog/backtesting-trading-strategy-pitfalls): The biases that make a backtest look better than it is.

---

Published by Fincode (Fincode Yazılım ve Teknoloji A.Ş.), a software company in Istanbul, Turkey: https://fincodelabs.com/en/services/pine-script-development
