Breaking News

ChatGPT Strategy for TradingView

This is the simple trading strategy that ChatGPT created for me!

TradingView keeps removing it, so here is a way to get around that.

First, go into TradingView and on the bottom right you need to click this arrow to pop up the editor.

Then, look at the bottom left for “Pine Editor” click on it and if there is already code there you delete it.

Then you copy this code and paste it there:

Copy & Paste is not allowed on my website, so I put it in a google doc for you. Just click this link to open the google doc.

//@version=4

strategy(“ChatGPT Strategy by Trade with Pat”, overlay=true)

// Inputs

fastLength = input(12, minval=1)

slowLength = input(26, minval=1)

signalLength = input(9, minval=1)

// Compute MACD

macd = ema(close, fastLength) ema(close, slowLength)

signal = sma(macd, signalLength)

// Plot MACD and signal line

plot(macd, color=color.blue, linewidth=1)

plot(signal, color=color.orange, linewidth=1)

// Buy/Sell Signals

buy = crossover(macd, signal)

sell = crossunder(macd, signal)

// Plot Buy/Sell Signals

plotshape(buy, color=color.green, style=shape.triangleup, location=location.belowbar)

plotshape(sell, color=color.red, style=shape.triangledown, location=location.abovebar)

Then click on “Add to chart” and there you have the indicator that plots red and green arrow for buy/sell signals.

Full video

I hope you enjoy the video, the strategy, and that you use it properly. That means you backtest it, learn it and add in proper price action to increase your chances of winning.

Much love!

About Patrick Ryan

Patrick is a Forex enthusiast, with over 10 years of experience in finance, and market analysis. He's eager to help traders achieve their goals, whether they are short or long-term. Patrick's penned thousands of reviews, and is always available to discuss trading with anyone who's interested.

14 comments

  1. Hi, I’ve copied and pasted the updated code from the Google doc but it’s still not working on the trading view. Please what’s the best solution

  2. at least make a video is possible so everyone can understand how its really works

  3. The chart view becomes completely flat when i enter the code. Must be doing something wrong but i cant figure it out. I’m fairly new to Forex trading

  4. The pine editor shows error in script

  5. hey bro the indicator still dissapears when I hit add to chart it appears for a second then its auto removes ?

  6. Maybe a stupid quesiton, but how can we copy the text on the site? Can’t highlight it!?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Download My Free Robot

Get your Robot Now!






Free Robot!