Trendline Investor
Trendline Investor

@dmdsplyinvestor

12 Tweets 17 reads Jun 12, 2023
This is Insane, CHATGPT!
CHATGPT just CODED MY STRATEGY with CCI & RS!🀯
So, you can now code any strategy (in any language) on the internet with this crazy app!
Ready to see how CHATGPT coded Pinescript for me?
Let's go..🧡
1⃣Why Pinescript, though? πŸ€”
Because I have always used Pinescript, and it is the easiest language to learn for someone without a coding background like me.
With GPT-4, it becomes even easier! πŸ˜ƒ Let's see how!
I believe GPT-4 can generate code in any language!
2⃣ Time for the test! πŸ€“πŸͺ§
Okay, so what did I test?
I started off with a simple moving average-based strategy, and here is what I asked GPT-4:
3⃣ Time to check the results!
I copied the code it provided & pasted it into Tradingview, here are the results!
Unfortunately, Tradingview threw an error saying that it is not a strategy but rather a study. 😐
So, it seems that GPT-4 failed! πŸ˜…
But, wait! It learned quickly!
4⃣GPT-4 passes the first hurdle! βœ…
Here's how it gave the correct Pinescript version in this attempt when I posted the error from Tradingview!
The code compiled and was added to the chart! πŸ₯³
Are you curious to see the strategy on a stock with long and short signals? πŸ€“
5⃣ I had a strategy in Pinescript coded in just under a minute!
After I added the strategy to the chart, I could clearly see when to go long/short on the chart. πŸ˜ƒ
But wait, this is a very simple strategy.
What about a slightly more complex test with a customized strategy? πŸ™ˆ
If you want to see a complex test I did with CHATGPT, watch this video!πŸ‘‡πŸ˜ƒ
I'm sure you'll get a lot of ideas!
youtube.com
6⃣Time for coding my Investing strategy!
Here's what I did:
I asked GPT-4 to write a version of my investing strategy based on the commodity channel index and relative strength.
Unfortunately, it failed terribly, and I had to solve two errors. πŸ˜…
7⃣ So, I posted these errors to GPT-4 again to see if it could solve them. 😎
Unfortunately, GPT-4 failed terribly this time! πŸ₯Ή
But wait, it did learn quickly again...
8⃣ I posted the long list of errors again, but did GPT-4 get it right this time?
Yes, it did! πŸ₯³
The code compiled and was added to the chart. βœ…
I was surprised at how it even got the relative strength logic right and did not get confused with the relative strength index.
9⃣Time to see the results on Tradingview!
I'm amazed and thrilled! All of this was done in just under 2 minutes. πŸ€“
Now, GPT-4 understood 'sell' as 'short,' which is why you see both long and short signals.
Keep teaching GPT-4, and it won't repeat these mistakes again for you!
πŸ”Ÿ GPT-4 is truly remarkable! πŸ˜ƒ
The opportunities are immense & it can help you become an algo-trader too!
GPT-4 can greatly reduce the workload involved in coding trading strategies.
Although it costs $23.6 per month, I believe it is well worth the investment!"

Loading suggestions...