How to update your indicators for your Plug and Play trading scripts

Request Your Trial

(⬇️ Please click on the banner below ⬇️)

Introduction

TLDR; you'll have to update your indicator with only 2 lines of code.
You must own the indicator source code and have it available (i.e. you can see it on PineEditor).
The Plug and Play won't work with the indicator you have in mind has been made by another author, and published as a protected or invite-only script.

PS
You could always ask the author for his source code access, or find an open-source alternative.

You'll find some useful info about our plug and play technology here

How to update your indicator in less than 5 minutes

It might not take less than 5 minutes the first time you'll do it as it's a new skill to acquire.
But for all the next indicators you'll upgrade, it will surely take less than 5 minutes as you'll finally get used to the few steps explained below.

Step 1. Look for the buy and sell variables

Somewhere in your indicator code you'll have a LONG/BUY and a SHORT/SELL conditions.
They might not have those exact variable names, but there are inevitably conditions to capture those 2 events.
Those events are saved in variables.

We'll give a few examples below using different kinds of indicators.

Most of the time, those variables have self-explanatory names like buy/bull/buy_signal/long/go_long/is_above/... or sell/bear/sell_signal/short/go_short/is_below/...
They won't necessarily be named like that, but hopefully they'll have an explicit name identifier for a LONG and a SHORT event.
So in total, two variables events to identify.

Moving Averages Cross

buy_signal = crossover(MA1, MA2)
sell_sigal = crossunder(MA1, MA2)

Here, the variable for the LONG/BUY condition is called buy_signal.
And, the variable for the SHORT/SELL condition is named sell_signal.

RSI Divergence

bullish_div = ....
bearish_div = ....

Here, the variable for the LONG/BUY condition is called bullish_div.
And, the variable for the SHORT/SELL condition is named bearish_div.

MACD

macd_isAbove = macd >= signal
macd_isBelow = macd < signal

Here, the variable for the LONG/BUY condition is called macd_isAbove.
And, the variable for the SHORT/SELL condition is named macd_isBelow.

Step 2. Update your indicator

What you will need to add at the very end of your script to:

1. insert 2 new empty line after the last line of code.
After this step, you'll notice your source having 2 extra empty lines. 2. insert the piece of code below replacing the variables names

Code template to be inserted at the end of your indicator source code

Only the Two variables have to be updated with the names you identified at the previous steps.
Nothing more, nothing less.

Signal = YOUR_BUY_CONDITION ? 2 : YOUR_SELL_CONDITION ? -2 : 0
plot(Signal, title="🔌&🕹️", transp=100)

- YOUR_BUY_CONDITION is the LONG/BUY variable you recognized at the previous step.
- YOUR_SELL_CONDITION is the SHORT/SELL variable you also identified before.

Last Step. Save your indicator and add it to your chart

A. Click on Pine Editor at the very bottom of your TradingView.

Click on PineEditor

B. Click on Pine Editor at the very bottom of your TradingView.

Save and Add to chart

Configure the Autosave

AutoSave ON

Each time a chart is updated (indicator added/deleted) or indicator inputs updated, you have to save your chart.
To not be bothered doing it every time, I recommend turning ON the autosave mode..

Troubleshooting

If the content below doesn't help, please let me directly and I'll help you out quickly.
I get that updating a script for the first time might not be obvious for many - that's why we'll be happy to provide some technical support to our customers whenever needed.

Scaling issues

There is nothing we can do to prevent that but we know that TradingView could release a feature soon to prevent this scaling "issue" from happening.
It might only happen the first time you add the indicator to your chart.
The good news 👍: it could be solved in 2 clicks only. We provide below some guidance to solve this side-effect

Issue Scaling TradingView Step 1

Scaling issue TradingView Step 2

What if the indicator displays a red error

Issue when indicator is loading

Many of our scripts contain thousands of lines of codes and might take a bit of time to get executed the first time you'll add them to your chart(s).
If your internet network is not fast enough or there are some latencies, you might get the issue as shown on the left image.

To work around that on both Desktop and Mobile, you'll either need to :
- Click on the 👁️‍🗨️ (eye icon)
- or refresh the whole page (F5/Refresh icon on Desktop and the usual way to refresh a page on your mobile device)

What if the indicator displays a calcul timeout error

TradingView timeout

Same as described just above.
Click on the 👁️‍🗨️ (eye icon)
If the eye icon is not working after a few trials, move to the second alternative below .i.e refreshing. - Alternatively, refresh the whole page (F5/Refresh icon on Desktop and the usual way to refresh a page on your mobile device).

Request Your Trial

(⬇️ Please click on the banner below ⬇️)

Request your trial for 10 euros only
CONTENTS