How to update your indicator for your Plug&Play trading scripts
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
Moving Averages Cross
buy_signal = crossover(MA1, MA2)
sell_sigal = crossunder(MA1, MA2)
bullish_div = ....
bearish_div = ....
macd_isAbove = macd >= signal
macd_isBelow = macd < signal
Step 2. Update your indicator
Code template to be inserted at the end of your indicator source code
Signal = YOUR_BUY_CONDITION ? 2 : YOUR_SELL_CONDITION ? -2 : 0
plot(Signal, title="🔌&🕹️", transp=100)
Last Step. Save your indicator and add it to your chart
A. Click on Pine Editor at the very bottom of your TradingView.
B. Click on Pine Editor at the very bottom of your TradingView.
Configure the Autosave
What if the indicator displays a red error
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
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).