My Funded Perpetuals · Help center rule change, detected November 27, 2026
Scripts Page
Rule Radar reads My Funded Perpetuals’s help center every day. This page shows one change we caught: what the article said before, what it says now, and what it means for traders.
| What changed | Before Nov 26, 2026 | After Nov 27, 2026 | |
|---|---|---|---|
| Problems · What it shows | Compile errors, warnings, lint hints, runtime errors with the bar they happened on, and the script's \log.info\, \log.warning\, and \log.error\ lines (the newest 200). Select one to go to its line. | → | Compile errors, warnings, lint hints, runtime errors with the bar they happened on, and the script's log.info, log.warning, and log.error lines (the newest 200). Select one to go to its line. |
| Share code, such as | \MFP-7K2Q-9XWD\ | → | MFP-7K2Q-9XWD |
Read the live article ↗All My Funded Perpetuals changesVersion historyVisit My Funded Perpetuals ↗My Funded Perpetuals
▸ View exact changes
The change in place, line by line
Before Nov 26, 2026
shared.
How the engine runs a script, what it can draw, and why values can differ
from TradingView is covered in Pine Scripts.
Open your scripts
On the trade page, select Scripts in the chart toolbar, beside Alerts. The
Scripts window opens over the trade page with three tabs:
| Tab | What it shows |
|---|---|
| My Scripts | Your saved scripts and the editor. |
| Public Library | Scripts other traders listed. See Public Library. |
| Top Indicators | Listed scripts ranked by how many traders added them. See Top Indicators. |
The window also has a share code field and Open Full Page, which opens
My Scripts and the editor as a full page at
− myfundedperpetuals.com/scripts. The
− Public Library, Top Indicators, and the share code field are only in the
− window over the trade page.
My Scripts
My Scripts lists your saved scripts with their Type (Indicator or
Strategy), Status (Compiles or Has Errors), and whether they show
On Trade. Use Columns to show Latest Version, Version On Trade,
Last Edited, and Created, and Filters to narrow the list by type,
status, or On Trade. The header shows how many On /trade slots are in use.
To add a script:
- New Script opens a new indicator or strategy in the editor.
− - Import takes a pasted script or a \.pine\ or \.txt\ file. The script is
checked before you save it: Ready, Library, Needs A Library, or
Won't Compile. A script that won't compile can still be saved and fixed
in the editor, but it doesn't run on a chart until it compiles.
- With no scripts yet, choose a template: Moving Average Cross, **RSI
With Levels, Session VWAP Bands, or Daily Loss Guard**.
− A script's name is the title in its \indicator()\ or \strategy()
declaration, so a script needs a title to be saved. Each script's actions
menu has Open, Share, and Duplicate. Select scripts with their
checkboxes to delete several at once. Deleting a script deletes all its
versions, removes it from your trade charts, and stops its share links and
codes. It can't be undone.
Libraries opens your saved Pine libraries. See
Libraries.
Edit a script
The editor shows the code beside a preview chart. Choose the preview's
Market and Timeframe above the chart. The preview runs your unsaved
draft as you type; while the draft has errors, it shows the last draft that
compiled.
The panels under the code are:
| Panel | What it shows |
|---|
− Problems | Compile errors, warnings, lint hints, runtime errors with the bar they happened on, and the script's \log.info\, \log.warning\, and \log.error\ lines (the newest 200). Select one to go to its line.
Inputs | The script's inputs, with the same fields as the chart's settings.
Inspector | Every variable's value on a bar you click on the preview chart, plus up to 5 watch expressions.
Trades | A strategy's simulated trades on the preview, up to 500 rows, with Export CSV.
References | Where a name is declared and used, after Find All References.
The editor also has a Command Palette, formatting (with **Format On
Save), Quick Fix, and Keyboard Shortcuts, all in the Script
Actions** menu. You can keep up to 8 scripts and libraries open as tabs.
Unsaved changes are kept as a draft in this browser, not on your account. If
the script was saved somewhere else since your draft started, the editor
offers Keep Draft or loading the newer version.
Other actions:
- Copy Code copies the editor's code.
Input values you set in the Inputs panel are saved to the script when
the preview runs the saved version, and show Preview only until you save
while it runs a draft. They belong to one version: if a new version's inputs
don't match the previous version's, saved input values go back to the
script's defaults and a message says so.
Show scripts on your trade charts
Turn on Show On /trade in the editor, or the On Trade switch in My
Scripts, to run a script on every trade chart, in every market. Up to 4
scripts can be on at once, and only a saved script that compiles can be
turned on. The chart runs the script's current saved version: saving a new
version updates your trade charts.
On the trade chart, a script that's on:
− - Draws on the price chart or in its own pane, as its \overlay\ setting
declares.
- Counts toward the 4 Pine scripts one chart runs, and runs before scripts
you pasted into the chart's own indicators.
- Keeps input changes you make in its chart settings. They're saved to the
script and apply on every trade chart and in the editor.
- Can't have its code changed from the chart. Edit it on the Scripts page;
chart changes to its code are put back.
Right-click the script's name in the chart legend for **Open In Script
Editor, Remove From All Trade Charts, and Report a Problem**.
Removing the script from the chart also turns it off on all trade charts.
Backtest a strategy
The preview runs a strategy as a simulated backtest on the preview's market
and timeframe. Strategy Results above the preview show Net P\&L,
Win Rate, Max Drawdown, Profit Factor, and Trades, and **Show
Strategy Report** under the preview opens the full report. Results fill at
bar prices, with fees as the script sets them, and no funding or slippage, so
real fills differ.
Backtest in the Script Actions menu runs the draft beyond the
preview, one run at a time in your browser:
- Markets runs the draft on up to 10 markets, including the preview's,
on the preview's timeframe with the current inputs, and lists each
market's results. A script that reads other symbols with
− \request.security()\ runs without that data in a backtest, and those
markets are marked because their results may be off.
− - Sweep varies up to 2 number inputs (\input.int\ or \input.float\) over
a From, To, and Step you choose, up to 100 combinations, on the
preview market's bars. Two inputs show a Net P\&L Heatmap. Apply
sets a combination on the draft's preview only; saved inputs and your
trade charts don't change.
[!WARNING]
Backtests and sweeps are simulations on past data. They never place orders,
don't use your account balance, and don't affect your challenge, rules, or
statistics. A combination tuned on past data can fit noise, so check other
markets and periods before relying on it.
Share a script
Select Share in the editor or in a script's actions menu, then **Create
− Share Code**. Sharing creates a share code, such as \MFP-7K2Q-9XWD\, and a
share link for the script's current saved version. Unsaved changes aren't
included.
| How it's shared | Who can use it |
|---|---|
| Share link | Anyone with the link can view the source, even without signing in. Signed-in traders can select Copy To My Scripts. |
| Share code | Signed-in traders paste it into the share code field in the Scripts window and select Add. |
| Public Library listing | Turn on Also List It in the Public Library in the share dialog. Every trader with Scripts can find it and add a copy. |
Each share shows one version. Saving new versions doesn't change what it
shows or what traders who added it run; publish an update when you want to
offer them a newer version. Traders who add it get their own copy in My
Scripts, starting from the script's default inputs and switched off for
trade charts, and they can't change your original.
Turn Code Off stops the link and code and removes the listing. Copies
Script Data
Script Data, in the More Actions menu on My Scripts, holds the text
values your scripts read with request.data("key") (see
Your own data in a script).
1. Open More Actions and choose Script Data.
2. Choose Add Key, enter a key and a value, and choose Save. To change
a value, choose Edit next to its key.
3. Choose Copy API Example to copy a curl command that sets the same
key from your own program with an API key that has trade scope.
Charts and editor previews running a script that reads a key update as soon
as you save it. Delete removes a key; scripts that read it show na
until you add it again.
− Script data belongs to your account, not to a script. Other traders never
− see it, and a script someone shares with you reads your values, not theirs.
− A shared script's page and Import show the keys a script reads, and any
− links in its text, before you add it.
Report a Problem
Use Report a Problem when something on the Scripts pages or the chart
doesn't work, a script compiles on TradingView but not here, or a script
plots or behaves differently from TradingView. It's in the **Script
Actions menu in the editor, the More Actions** menu on My Scripts, and a
saved script's legend menu on the trade chart.
Describe what you expected and what happened instead, in up to 4,000
characters. What's Attached lists what's sent with the report: the
script's name and version, the source of your draft or saved version, the
problems the editor showed, the chart's market and timeframe, and your
browser, window size, and language. You can send up to 10 reports an hour
and 30 a day.
Limits
| Limit | Value |
|---|---|
| Saved scripts | 100 |
| Saved versions per script | 20 (the oldest are deleted) |
| Scripts on your trade charts at once | 4 |
| Open editor tabs | 8 |
| Share links you keep at once | 50 |
| Added scripts checked for updates | 50 most recently edited |
| Markets in one backtest | 10 |
| Inputs in one sweep | 2 |
| Combinations in one sweep | 100 |
| Watch expressions per script | 5 |
| Report description | 4,000 characters |
| Script Data keys | 20 |
| Script Data value length | 65,536 characters |
−
| Script length | 256,000 characters |
|---|---|
| Script Data changes | 30 a minute, 1,440 a day |
At 100 saved scripts, delete one to add another. Script length, run time,
and drawing limits are in Pine Scripts.
After Nov 27, 2026
shared.
How the engine runs a script, what it can draw, and why values can differ
from TradingView is covered in Pine Scripts.
Open your scripts
On the trade page, select Scripts in the chart toolbar, beside Alerts. The
Scripts window opens over the trade page with three tabs:
| Tab | What it shows |
|---|---|
| My Scripts | Your saved scripts and the editor. |
| Public Library | Scripts other traders listed. See Public Library. |
| Top Indicators | Listed scripts ranked by how many traders added them. See Top Indicators. |
The window also has a share code field and Open Full Page, which opens
My Scripts and the editor as a full page at
+ myfundedperpetuals.com/scripts. On
+ a computer, the Public Library, Top Indicators, and the share code field are
+ only in the window over the trade page. On a phone they are also on the
+ Scripts page.
+ On a phone or in the iOS app
+ On a phone, open the menu and select Scripts under Trading. The same
+ item is in the iOS app's sidebar. The phone layout is also used in a narrow
+ browser window. It has the same three tabs (My Scripts, **Public
+ Library, and Top Indicators**), with the share code field on the Public
+ Library and Top Indicators tabs.
+ - My Scripts lists your scripts with a search field. Each script has its
+ On Trade switch, and its actions menu has Rename and **Delete
+ Script. Paste Script** adds a script from pasted source. It is checked
+ as you paste, and one that won't compile can still be saved and fixed
+ later.
+ - Select a script to open it. Inputs sets its input values without
+ editing the code. Changes save to the script after a moment and apply on
+ every trade chart that shows it.
+ - Code shows the saved source, read-only, with Copy Source. **Edit
+ Code** opens a plain editor that checks the script as you type and shows
+ the first error. Save is available once it compiles and saves the next
+ version.
+ Backtests, the inspector, version history, libraries, sharing, and Script
+ Data are only in the editor on a computer.
My Scripts
My Scripts lists your saved scripts with their Type (Indicator or
Strategy), Status (Compiles or Has Errors), and whether they show
On Trade. Use Columns to show Latest Version, Version On Trade,
Last Edited, and Created, and Filters to narrow the list by type,
status, or On Trade. The header shows how many On /trade slots are in use.
To add a script:
- New Script opens a new indicator or strategy in the editor.
+ - Import takes a pasted script or a .pine or .txt file. The script is
checked before you save it: Ready, Library, Needs A Library, or
Won't Compile. A script that won't compile can still be saved and fixed
in the editor, but it doesn't run on a chart until it compiles.
- With no scripts yet, choose a template: Moving Average Cross, **RSI
With Levels, Session VWAP Bands, or Daily Loss Guard**.
+ A script's name is the title in its indicator() or strategy()
declaration, so a script needs a title to be saved. Each script's actions
menu has Open, Share, and Duplicate. Select scripts with their
checkboxes to delete several at once. Deleting a script deletes all its
versions, removes it from your trade charts, and stops its share links and
codes. It can't be undone.
Libraries opens your saved Pine libraries. See
Libraries.
Edit a script
The editor shows the code beside a preview chart. Choose the preview's
Market and Timeframe above the chart. The preview runs your unsaved
draft as you type; while the draft has errors, it shows the last draft that
compiled.
The panels under the code are:
| Panel | What it shows |
|---|
+ Problems | Compile errors, warnings, lint hints, runtime errors with the bar they happened on, and the script's log.info, log.warning, and log.error lines (the newest 200). Select one to go to its line.
Inputs | The script's inputs, with the same fields as the chart's settings.
Inspector | Every variable's value on a bar you click on the preview chart, plus up to 5 watch expressions.
Trades | A strategy's simulated trades on the preview, up to 500 rows, with Export CSV.
References | Where a name is declared and used, after Find All References.
The editor also has a Command Palette, formatting (with **Format On
Save), Quick Fix, and Keyboard Shortcuts, all in the Script
Actions** menu. You can keep up to 8 scripts and libraries open as tabs.
Unsaved changes are kept as a draft in this browser, not on your account. If
the script was saved somewhere else since your draft started, the editor
offers Keep Draft or loading the newer version.
Other actions:
- Copy Code copies the editor's code.
Input values you set in the Inputs panel are saved to the script when
the preview runs the saved version, and show Preview only until you save
while it runs a draft. They belong to one version: if a new version's inputs
don't match the previous version's, saved input values go back to the
script's defaults and a message says so.
Show scripts on your trade charts
Turn on Show On /trade in the editor, or the On Trade switch in My
Scripts, to run a script on every trade chart, in every market. Up to 4
scripts can be on at once, and only a saved script that compiles can be
turned on. The chart runs the script's current saved version: saving a new
version updates your trade charts.
On the trade chart, a script that's on:
+ - Draws on the price chart or in its own pane, as its overlay setting
declares.
- Counts toward the 4 Pine scripts one chart runs, and runs before scripts
you pasted into the chart's own indicators.
- Keeps input changes you make in its chart settings. They're saved to the
script and apply on every trade chart and in the editor.
- Can't have its code changed from the chart. Edit it on the Scripts page;
chart changes to its code are put back.
Right-click the script's name in the chart legend for **Open In Script
Editor, Remove From All Trade Charts, and Report a Problem**.
Removing the script from the chart also turns it off on all trade charts.
Backtest a strategy
The preview runs a strategy as a simulated backtest on the preview's market
and timeframe. Strategy Results above the preview show Net P\&L,
Win Rate, Max Drawdown, Profit Factor, and Trades, and **Show
Strategy Report** under the preview opens the full report. Results fill at
bar prices, with fees as the script sets them, and no funding or slippage, so
real fills differ.
Backtest in the Script Actions menu runs the draft beyond the
preview, one run at a time in your browser:
- Markets runs the draft on up to 10 markets, including the preview's,
on the preview's timeframe with the current inputs, and lists each
market's results. A script that reads other symbols with
+ request.security() runs without that data in a backtest, and those
markets are marked because their results may be off.
+ - Sweep varies up to 2 number inputs (input.int or input.float) over
a From, To, and Step you choose, up to 100 combinations, on the
preview market's bars. Two inputs show a Net P\&L Heatmap. Apply
sets a combination on the draft's preview only; saved inputs and your
trade charts don't change.
[!WARNING]
Backtests and sweeps are simulations on past data. They never place orders,
don't use your account balance, and don't affect your challenge, rules, or
statistics. A combination tuned on past data can fit noise, so check other
markets and periods before relying on it.
Share a script
Select Share in the editor or in a script's actions menu, then **Create
+ Share Code**. Sharing creates a share code, such as MFP-7K2Q-9XWD, and a
share link for the script's current saved version. Unsaved changes aren't
included.
| How it's shared | Who can use it |
|---|---|
| Share link | Anyone with the link can view the source, even without signing in. Signed-in traders can select Copy To My Scripts. |
| Share code | Signed-in traders paste it into the share code field in the Scripts window and select Add. |
| Public Library listing | Turn on Also List It in the Public Library in the share dialog. Every trader with Scripts can find it and add a copy. |
Each share shows one version. Saving new versions doesn't change what it
shows or what traders who added it run; publish an update when you want to
offer them a newer version. Traders who add it get their own copy in My
Scripts, starting from the script's default inputs and switched off for
trade charts, and they can't change your original.
Turn Code Off stops the link and code and removes the listing. Copies
Script Data
Script Data, in the More Actions menu on My Scripts, holds the text
values your scripts read with request.data("key") (see
Your own data in a script).
1. Open More Actions and choose Script Data.
2. Choose Add Key, enter a key and a value, and choose Save. To change
a value, choose Edit next to its key.
3. Choose Copy API Example to copy a curl command that sets the same
key from your own program with an API key that has trade scope.
Charts and editor previews running a script that reads a key update as soon
as you save it. Delete removes a key; scripts that read it show na
until you add it again.
+ Script data belongs to your account, not to a script, and stays private by
+ default. If a shared version reads keys with request.data(), you can
+ explicitly opt specific keys in under Share Live Script Data in the
+ Share dialog:
+ - Only keys read by that shared version's code can be opted in; your other
+ keys stay private.
+ - New copies added while live data is on receive your updates automatically,
+ usually within a few minutes. Copies added before you turned live data on
+ keep reading the trader's own Script Data until they switch **Use Author's
+ Data** on in the editor, and any trader can switch back to their own Script
+ Data at any time.
+ - Keys currently shared live show a Shared live badge in Script Data.
+ - Shared values must be standard ASCII text of at most 8,192 characters with
+ no links, domains, invite URLs, @ handles, email addresses, chat app
+ names, or crypto wallet addresses.
+ - Shared keys have a calmer update limit: up to 2 updates per 5 minutes and
+ 144 a day per shared key. If you push a key from the API more often than
+ that, those writes start getting rate-limited once the key is shared.
+ - Turning off the share code, unchecking a key, or deleting the script stops
+ your live data: traders running the script stop receiving it at once, and
+ the shared feed itself stops within about two minutes.
+ - An older shared version that still serves live data shows its keys under
+ the version, with Stop Live Data.
+ - If staff stop live data on a share, the Share dialog says so, and you can't
+ turn its keys back on.
+ A shared script's page, update review, and Import list which keys read
+ live author data, which read your own Script Data, and any links in the script
+ text before you add it.
Report a Problem
Use Report a Problem when something on the Scripts pages or the chart
doesn't work, a script compiles on TradingView but not here, or a script
plots or behaves differently from TradingView. It's in the **Script
Actions menu in the editor, the More Actions** menu on My Scripts, and a
saved script's legend menu on the trade chart.
Describe what you expected and what happened instead, in up to 4,000
characters. What's Attached lists what's sent with the report: the
script's name and version, the source of your draft or saved version, the
problems the editor showed, the chart's market and timeframe, and your
browser, window size, and language. You can send up to 10 reports an hour
and 30 a day.
Limits
| Limit | Value |
|---|---|
| Saved scripts | 100 |
+
| Script length | 256,000 characters |
|---|
| Saved versions per script | 20 (the oldest are deleted) |
| Scripts on your trade charts at once | 4 |
| Open editor tabs | 8 |
| Share links you keep at once | 50 |
| Added scripts checked for updates | 50 most recently edited |
| Markets in one backtest | 10 |
| Inputs in one sweep | 2 |
| Combinations in one sweep | 100 |
| Watch expressions per script | 5 |
| Report description | 4,000 characters |
| Script Data keys | 20 |
| Script Data value length | 65,536 characters |
+
| Script length | 256,000 characters |
|---|---|
| Script Data changes (private) | 30 a minute, 1,440 a day |
| Script Data changes (per shared key) | 2 per 5 minutes, 144 a day (updates viewers \~every 60s) |
At 100 saved scripts, delete one to add another. Script length, run time,
and drawing limits are in Pine Scripts.
shared.
How the engine runs a script, what it can draw, and why values can differ
from TradingView is covered in Pine Scripts.
Open your scripts
On the trade page, select Scripts in the chart toolbar, beside Alerts. The
Scripts window opens over the trade page with three tabs:
| Tab | What it shows |
|---|---|
| My Scripts | Your saved scripts and the editor. |
| Public Library | Scripts other traders listed. See Public Library. |
| Top Indicators | Listed scripts ranked by how many traders added them. See Top Indicators. |
The window also has a share code field and Open Full Page, which opens
My Scripts and the editor as a full page at
− myfundedperpetuals.com/scripts. The
− Public Library, Top Indicators, and the share code field are only in the
− window over the trade page.
+ myfundedperpetuals.com/scripts. On
+ a computer, the Public Library, Top Indicators, and the share code field are
+ only in the window over the trade page. On a phone they are also on the
+ Scripts page.
+ On a phone or in the iOS app
+ On a phone, open the menu and select Scripts under Trading. The same
+ item is in the iOS app's sidebar. The phone layout is also used in a narrow
+ browser window. It has the same three tabs (My Scripts, **Public
+ Library, and Top Indicators**), with the share code field on the Public
+ Library and Top Indicators tabs.
+ - My Scripts lists your scripts with a search field. Each script has its
+ On Trade switch, and its actions menu has Rename and **Delete
+ Script. Paste Script** adds a script from pasted source. It is checked
+ as you paste, and one that won't compile can still be saved and fixed
+ later.
+ - Select a script to open it. Inputs sets its input values without
+ editing the code. Changes save to the script after a moment and apply on
+ every trade chart that shows it.
+ - Code shows the saved source, read-only, with Copy Source. **Edit
+ Code** opens a plain editor that checks the script as you type and shows
+ the first error. Save is available once it compiles and saves the next
+ version.
+ Backtests, the inspector, version history, libraries, sharing, and Script
+ Data are only in the editor on a computer.
My Scripts
My Scripts lists your saved scripts with their Type (Indicator or
Strategy), Status (Compiles or Has Errors), and whether they show
On Trade. Use Columns to show Latest Version, Version On Trade,
Last Edited, and Created, and Filters to narrow the list by type,
status, or On Trade. The header shows how many On /trade slots are in use.
To add a script:
- New Script opens a new indicator or strategy in the editor.
− - Import takes a pasted script or a \.pine\ or \.txt\ file. The script is
+ - Import takes a pasted script or a .pine or .txt file. The script is
checked before you save it: Ready, Library, Needs A Library, or
Won't Compile. A script that won't compile can still be saved and fixed
in the editor, but it doesn't run on a chart until it compiles.
- With no scripts yet, choose a template: Moving Average Cross, **RSI
With Levels, Session VWAP Bands, or Daily Loss Guard**.
− A script's name is the title in its \indicator()\ or \strategy()
+ A script's name is the title in its indicator() or strategy()
declaration, so a script needs a title to be saved. Each script's actions
menu has Open, Share, and Duplicate. Select scripts with their
checkboxes to delete several at once. Deleting a script deletes all its
versions, removes it from your trade charts, and stops its share links and
codes. It can't be undone.
Libraries opens your saved Pine libraries. See
Libraries.
Edit a script
The editor shows the code beside a preview chart. Choose the preview's
Market and Timeframe above the chart. The preview runs your unsaved
draft as you type; while the draft has errors, it shows the last draft that
compiled.
The panels under the code are:
| Panel | What it shows |
|---|
− Problems | Compile errors, warnings, lint hints, runtime errors with the bar they happened on, and the script's \log.info\, \log.warning\, and \log.error\ lines (the newest 200). Select one to go to its line.
+ Problems | Compile errors, warnings, lint hints, runtime errors with the bar they happened on, and the script's log.info, log.warning, and log.error lines (the newest 200). Select one to go to its line.
Inputs | The script's inputs, with the same fields as the chart's settings.
Inspector | Every variable's value on a bar you click on the preview chart, plus up to 5 watch expressions.
Trades | A strategy's simulated trades on the preview, up to 500 rows, with Export CSV.
References | Where a name is declared and used, after Find All References.
The editor also has a Command Palette, formatting (with **Format On
Save), Quick Fix, and Keyboard Shortcuts, all in the Script
Actions** menu. You can keep up to 8 scripts and libraries open as tabs.
Unsaved changes are kept as a draft in this browser, not on your account. If
the script was saved somewhere else since your draft started, the editor
offers Keep Draft or loading the newer version.
Other actions:
- Copy Code copies the editor's code.
Input values you set in the Inputs panel are saved to the script when
the preview runs the saved version, and show Preview only until you save
while it runs a draft. They belong to one version: if a new version's inputs
don't match the previous version's, saved input values go back to the
script's defaults and a message says so.
Show scripts on your trade charts
Turn on Show On /trade in the editor, or the On Trade switch in My
Scripts, to run a script on every trade chart, in every market. Up to 4
scripts can be on at once, and only a saved script that compiles can be
turned on. The chart runs the script's current saved version: saving a new
version updates your trade charts.
On the trade chart, a script that's on:
− - Draws on the price chart or in its own pane, as its \overlay\ setting
+ - Draws on the price chart or in its own pane, as its overlay setting
declares.
- Counts toward the 4 Pine scripts one chart runs, and runs before scripts
you pasted into the chart's own indicators.
- Keeps input changes you make in its chart settings. They're saved to the
script and apply on every trade chart and in the editor.
- Can't have its code changed from the chart. Edit it on the Scripts page;
chart changes to its code are put back.
Right-click the script's name in the chart legend for **Open In Script
Editor, Remove From All Trade Charts, and Report a Problem**.
Removing the script from the chart also turns it off on all trade charts.
Backtest a strategy
The preview runs a strategy as a simulated backtest on the preview's market
and timeframe. Strategy Results above the preview show Net P\&L,
Win Rate, Max Drawdown, Profit Factor, and Trades, and **Show
Strategy Report** under the preview opens the full report. Results fill at
bar prices, with fees as the script sets them, and no funding or slippage, so
real fills differ.
Backtest in the Script Actions menu runs the draft beyond the
preview, one run at a time in your browser:
- Markets runs the draft on up to 10 markets, including the preview's,
on the preview's timeframe with the current inputs, and lists each
market's results. A script that reads other symbols with
− \request.security()\ runs without that data in a backtest, and those
+ request.security() runs without that data in a backtest, and those
markets are marked because their results may be off.
− - Sweep varies up to 2 number inputs (\input.int\ or \input.float\) over
+ - Sweep varies up to 2 number inputs (input.int or input.float) over
a From, To, and Step you choose, up to 100 combinations, on the
preview market's bars. Two inputs show a Net P\&L Heatmap. Apply
sets a combination on the draft's preview only; saved inputs and your
trade charts don't change.
[!WARNING]
Backtests and sweeps are simulations on past data. They never place orders,
don't use your account balance, and don't affect your challenge, rules, or
statistics. A combination tuned on past data can fit noise, so check other
markets and periods before relying on it.
Share a script
Select Share in the editor or in a script's actions menu, then **Create
− Share Code**. Sharing creates a share code, such as \MFP-7K2Q-9XWD\, and a
+ Share Code**. Sharing creates a share code, such as MFP-7K2Q-9XWD, and a
share link for the script's current saved version. Unsaved changes aren't
included.
| How it's shared | Who can use it |
|---|---|
| Share link | Anyone with the link can view the source, even without signing in. Signed-in traders can select Copy To My Scripts. |
| Share code | Signed-in traders paste it into the share code field in the Scripts window and select Add. |
| Public Library listing | Turn on Also List It in the Public Library in the share dialog. Every trader with Scripts can find it and add a copy. |
Each share shows one version. Saving new versions doesn't change what it
shows or what traders who added it run; publish an update when you want to
offer them a newer version. Traders who add it get their own copy in My
Scripts, starting from the script's default inputs and switched off for
trade charts, and they can't change your original.
Turn Code Off stops the link and code and removes the listing. Copies
Script Data
Script Data, in the More Actions menu on My Scripts, holds the text
values your scripts read with request.data("key") (see
Your own data in a script).
1. Open More Actions and choose Script Data.
2. Choose Add Key, enter a key and a value, and choose Save. To change
a value, choose Edit next to its key.
3. Choose Copy API Example to copy a curl command that sets the same
key from your own program with an API key that has trade scope.
Charts and editor previews running a script that reads a key update as soon
as you save it. Delete removes a key; scripts that read it show na
until you add it again.
− Script data belongs to your account, not to a script. Other traders never
− see it, and a script someone shares with you reads your values, not theirs.
− A shared script's page and Import show the keys a script reads, and any
− links in its text, before you add it.
+ Script data belongs to your account, not to a script, and stays private by
+ default. If a shared version reads keys with request.data(), you can
+ explicitly opt specific keys in under Share Live Script Data in the
+ Share dialog:
+ - Only keys read by that shared version's code can be opted in; your other
+ keys stay private.
+ - New copies added while live data is on receive your updates automatically,
+ usually within a few minutes. Copies added before you turned live data on
+ keep reading the trader's own Script Data until they switch **Use Author's
+ Data** on in the editor, and any trader can switch back to their own Script
+ Data at any time.
+ - Keys currently shared live show a Shared live badge in Script Data.
+ - Shared values must be standard ASCII text of at most 8,192 characters with
+ no links, domains, invite URLs, @ handles, email addresses, chat app
+ names, or crypto wallet addresses.
+ - Shared keys have a calmer update limit: up to 2 updates per 5 minutes and
+ 144 a day per shared key. If you push a key from the API more often than
+ that, those writes start getting rate-limited once the key is shared.
+ - Turning off the share code, unchecking a key, or deleting the script stops
+ your live data: traders running the script stop receiving it at once, and
+ the shared feed itself stops within about two minutes.
+ - An older shared version that still serves live data shows its keys under
+ the version, with Stop Live Data.
+ - If staff stop live data on a share, the Share dialog says so, and you can't
+ turn its keys back on.
+ A shared script's page, update review, and Import list which keys read
+ live author data, which read your own Script Data, and any links in the script
+ text before you add it.
Report a Problem
Use Report a Problem when something on the Scripts pages or the chart
doesn't work, a script compiles on TradingView but not here, or a script
plots or behaves differently from TradingView. It's in the **Script
Actions menu in the editor, the More Actions** menu on My Scripts, and a
saved script's legend menu on the trade chart.
Describe what you expected and what happened instead, in up to 4,000
characters. What's Attached lists what's sent with the report: the
script's name and version, the source of your draft or saved version, the
problems the editor showed, the chart's market and timeframe, and your
browser, window size, and language. You can send up to 10 reports an hour
and 30 a day.
Limits
| Limit | Value |
|---|---|
| Saved scripts | 100 |
+
| Limit | Value |
|---|---|
| Script length | 256,000 characters |
| Saved versions per script | 20 (the oldest are deleted) |
| Scripts on your trade charts at once | 4 |
| Open editor tabs | 8 |
| Share links you keep at once | 50 |
| Added scripts checked for updates | 50 most recently edited |
| Markets in one backtest | 10 |
| Inputs in one sweep | 2 |
| Combinations in one sweep | 100 |
| Watch expressions per script | 5 |
| Report description | 4,000 characters |
| Script Data keys | 20 |
| Script Data value length | 65,536 characters |
−
| Limit | Value |
|---|---|
| Script Data changes | 30 a minute, 1,440 a day |
+
| Limit | Value |
|---|---|
| Script Data changes (private) | 30 a minute, 1,440 a day |
| Script Data changes (per shared key) | 2 per 5 minutes, 144 a day (updates viewers \~every 60s) |
At 100 saved scripts, delete one to add another. Script length, run time,
and drawing limits are in Pine Scripts.