TradingView Creating a New Strategy
Using ChatGPT Canvas makes editing Pine Script easier. While the responses may not always be accurate, they can serve as helpful references for writing scripts.
Steps
Click on “Pine Editor” at the Bottom of the Screen
Click Next to the File Name and Select “New” → “Strategy”

Copy & Paste the Script and Save
You can view my strategy here.
Click “Add to Chart” at the Top Right

Official TradingView Help
How to create new script