Copy an open-source indicator from TradingView, paste it in the editor and add it to your chart.
strategy(...)
The article Differences from TradingView lists the rest, including symbol names and how many bars are loaded.
Only paste code you are allowed to use. Many authors publish under an open-source licence that asks you to keep their name and licence line at the top of the script: leave those comments in place.