Trendline Investor
Trendline Investor

@dmdsplyinvestor

15 Tweets 34 reads Jun 29, 2023
⏲️In just under 30 SECONDS...⏲️
CHATGPT can CODE any trading strategy in any language!
I put it to the test on different complexity levels...
Here's how CHATGPT responded with strategies...🤖
A thread...🧵
#Repost
1⃣ Test 1: Simple Strategy with few conditions
So, I asked CHATGPT to write pinescript for the RSI Double decker strategy shared by Vivek Gadodia!
Here's what I asked👇
1.1 -> Chatgpt responded in just a matter of seconds
You can find a copy of the script here - pastebin.com
So, did it work on Tradingview?🤓
Read on...
1.2 -> Tradingview results
Yes, it did work!🎉😅
This is not a thread to test if the strategy is good or not. It is more to show the capabilities of CHATGPT!
Please test the strategy yourself before deciding to follow it!
Time to up the complexity further...
If you don't know how to copy paste the code, watch this video where I explain everything😃
youtu.be
2⃣ Test 2: Three different ema strategies
I took the complexity slightly further and asked GPT to write 3 ema strategies based on the conditions I provided.
Here's what I asked...
Ignore my bad prompt writing!🙈
2.1 -> Did GPT write the code in the first attempt?
Yes, it did in just a few seconds with proper syntax & comments!
But, did the code work in Tradingview?😅
Check the complete code here - pastebin.com
2.2 -> Testing code in Tradingview
3 diff ema strategy pinescript worked beautifully🎉
The code gave the ability to choose the strategy you want to plot & use as well!
Try it out by copy pasting the code from the previous tweet.
3⃣ Test 3: Time to up the complexity further & test the ADX Strategy from this site tradingblox.com
This is a pseudocode & here is what I asked GPT👇
3.1 -> How did GPT do? Let's see
While GPT produced the code, the code terribly failed when I pasted in tradingview😂
So, I tried to dig further...
3.2 -> GPT failed continuously to write a perfect pinescript code.
But, I kept pasting the errors tradingview threw in GPT and it kept correcting every time with a small improvement
Here are the first 4 failures & re-attempts👇
3.3 -> It failed 1 more time before it got the pinescript correct 😃
The correct script is the image on the right!
Code here - pastebin.com
So, what did it do?
It started writing the functions itself because it could not figure out the functions pinescript has!
4⃣ Finally, I asked GPT to explain the strategy & what it does!
I must say it did a pretty good job!
Fun! Isn't it?😃
If you want to see how I did this live...
Watch this video!👇
youtu.be
Learnt something? If yes, please👇
1. Retweet the first tweet
2. Follow @dmdsplyinvestor
3. Subscribe to my YouTube channel for more content! youtube.com

Loading suggestions...