YouTube2Text

MASTER AI Trading Bots in 61 Minutes (Claude + TradingView) — Transcript

by Mind Math Money · 10,848 words · 1,582 segments · language en · Watch on YouTube

Full transcript

  1. 0:00In this free video course, you will
  2. 0:02learn everything you need to know about
  3. 0:04building your own AI trading bot for
  4. 0:07stocks, crypto, forex, or any other
  5. 0:11financial market. By the end of this
  6. 0:13course, you will not only have built
  7. 0:15your very own trading bot with Claude
  8. 0:18and TradingView, but you will also know
  9. 0:20how to backtest it, check that it
  10. 0:22follows your rules, and of course, to
  11. 0:25switch it on.
  12. 0:28All right. So, hello guys and welcome to
  13. 0:31this full course on how to build,
  14. 0:34control, and use your own AI trading
  15. 0:39bot. And here of, you know, all trading
  16. 0:43courses I have made on this channel,
  17. 0:45this course is, you know, high up there
  18. 0:48on, you know, the most important courses
  19. 0:50I have ever made. And the reason for
  20. 0:52this is that, you know, AI, or in other
  21. 0:55words, artificial intelligence is
  22. 0:57becoming more and more important, not
  23. 1:00only in trading, but as you as you guys
  24. 1:02know, in society in general. So, if you
  25. 1:06want to,
  26. 1:07you know, be able to stay ahead of the
  27. 1:09curve, stay ahead of other traders, it's
  28. 1:12very important to be able to start using
  29. 1:14AI to your advantage in your trading.
  30. 1:18And yeah, this is what this course is
  31. 1:20going to be all about. I will in a very
  32. 1:22sort of step-by-step manner go over
  33. 1:25everything you need to build your own AI
  34. 1:29trading bot. So, at the end of this
  35. 1:30course, if you watch this course from
  36. 1:32start to finish, you will be able to,
  37. 1:34you know, build your own AI trading bot,
  38. 1:36and you will also be able to use, you
  39. 1:38know, Claude, which at this, in my
  40. 1:40opinion, is the best AI right now. You
  41. 1:43will be able to use Claude together with
  42. 1:44TradingView, and TradingView is the
  43. 1:46platform I use for all my trading and
  44. 1:49also investing actually. So, you can
  45. 1:51connect these to and you can also create
  46. 1:53your own AI trading bot.
  47. 1:56But yeah, guys, and this is very
  48. 1:57important, to get the most out of
  49. 1:59course. I want you all to really really,
  50. 2:02you know, lock in and focus. So please
  51. 2:05guys, you know, if you have your phone,
  52. 2:06you know, put it in another room. Make
  53. 2:09sure to, you know, put this uh YouTube
  54. 2:11video to full screen and remove all
  55. 2:14distractions. You know, if you have
  56. 2:15anything that gives you cheap dopamine,
  57. 2:17you know, fast food, uh you know, games,
  58. 2:20everything like that, try to remove it
  59. 2:22to really focus on this course. But
  60. 2:24yeah, the first thing I want to do right
  61. 2:26here is to quickly go over what you can
  62. 2:29expect to learn in this course.
  63. 2:33And the very first thing we of course
  64. 2:35need to learn before we can start, you
  65. 2:37know, using and building our AI trading
  66. 2:39bot is to first define, you know, what
  67. 2:42is an AI trading bot in the first place.
  68. 2:46And very importantly, we will take a
  69. 2:47look at what an AI bot can and can't do.
  70. 2:51You know, many people when they hear
  71. 2:53about trading bots, they think they are,
  72. 2:55you know, sort of magic and that they
  73. 2:57will make you rich, you know, overnight.
  74. 3:00And while in some sense I actually think
  75. 3:03that AI is a magical thing on its on its
  76. 3:06own, I actually think it's kind of like
  77. 3:08magic, you know.
  78. 3:10The fact that you can just take up your
  79. 3:11phone, talk to it and basically get
  80. 3:13answered anything, in some sense is that
  81. 3:16that is magic.
  82. 3:17But
  83. 3:18in this course I want to try to make it
  84. 3:20as realistic as possible. It will be
  85. 3:22grounded in reality.
  86. 3:25So we will learn what an AI trading bot
  87. 3:26is. And after that we will actually
  88. 3:30learn about something you may or may not
  89. 3:32have heard about. We will talk about
  90. 3:35you know, a group of traders known as
  91. 3:37the turtle traders and their breakout
  92. 3:40rules. And the reason
  93. 3:42we will do this is that we would use
  94. 3:44these turtle traders and their rules to,
  95. 3:47you know, later on in the course when we
  96. 3:49will actually build our AI trading bot.
  97. 3:52So that chapter is very important. Don't
  98. 3:54skip skip it. And to be honest guys, I
  99. 3:56have built this course, you know, in a
  100. 3:57step-by-step manner, so I highly
  101. 3:59recommend to watch the chapters in
  102. 4:00order. But here after the chapter about
  103. 4:02the Turtle Traders, we are finally going
  104. 4:04to take a look at how Claude, which is
  105. 4:07the AI we will use in today's video,
  106. 4:11basically can build an AI trading bot in
  107. 4:14TradingView. And very importantly, you
  108. 4:16need absolutely no coding. And this is
  109. 4:19also something that is becoming, you
  110. 4:21know, more and more true in general. You
  111. 4:24know, nowadays even, you know,
  112. 4:27developers start to code less and less
  113. 4:30and less because the AI the AI's are
  114. 4:34I would say probably better than 99.99%
  115. 4:37of coders right now.
  116. 4:39And it's just a matter of time before
  117. 4:41they completely, you know, outsmart
  118. 4:44humans on the coding arena.
  119. 4:46So we'll take a look at how we can build
  120. 4:48a trading bot in TradingView without no
  121. 4:51code. The next chapter, super super
  122. 4:53important, we will take a look at how we
  123. 4:55can check and backtest your bot. So
  124. 4:58before we start using a bot, we want to
  125. 5:01backtest, you know, how would this bot
  126. 5:03have performed in the past. And then we
  127. 5:06can use this past data to try to figure
  128. 5:09out how the bot will perform in the
  129. 5:11future.
  130. 5:12The next step here is to
  131. 5:14to actually switch the bot on. So we'll
  132. 5:16take a look at exactly how we can do it
  133. 5:18so that you will get, you know, a signal
  134. 5:21from TradingView every time your bot
  135. 5:24finds a buying or selling opportunity.
  136. 5:27And also last but definitely not least,
  137. 5:29this is very important, we will take a
  138. 5:30look at how you can, you know, review
  139. 5:33and basically stay in control of
  140. 5:35everything your bot does. And I can't
  141. 5:38stress enough how important this is.
  142. 5:40Yes, it's very cool and it's very, you
  143. 5:43know, amazing that we have the
  144. 5:45technology we have today so that
  145. 5:47everyone can build their own trading
  146. 5:49bot. But at the same time, it's so
  147. 5:51important to realize that the only one
  148. 5:54responsible for what your bot does is
  149. 5:57you. So you need to take full
  150. 5:59responsibility for everything that your
  151. 6:01bot does. We can't blame it on Claude,
  152. 6:03we can't blame it on anyone. So, before
  153. 6:06you deploy a bot, you need to, you know,
  154. 6:08review and make sure
  155. 6:10that everything is, you know, working as
  156. 6:13intended. But yeah, guys, now we are
  157. 6:15ready to jump into the course here, so
  158. 6:17make sure to really lock in. As I said,
  159. 6:19remove all distractions. Maybe you want
  160. 6:21to grab a coffee. And without further
  161. 6:23ado, let's jump right into it.
  162. 6:27But all right, so the very first thing
  163. 6:29we of course need to learn about is what
  164. 6:32is an AI trading bot?
  165. 6:35And here, in very simple terms, a
  166. 6:38trading bot is simply a program that
  167. 6:42follows exact trading rules on its own.
  168. 6:47So, it's any type of program that
  169. 6:49follows trading rules on its own.
  170. 6:52And what does a bot do? Well, it watches
  171. 6:55the market. It binds signals, both, you
  172. 6:58know, buy and sell signals, and it can
  173. 7:00also place orders automatically. So, it
  174. 7:03can automatically buy and sell. And one
  175. 7:06of the biggest benefits of trading bots
  176. 7:09is that the same signal always get the
  177. 7:13same action. This is one of the main
  178. 7:15benefits of a trading bot and one of the
  179. 7:18main sort of disadvantages of human
  180. 7:21traders. I would I would say that, you
  181. 7:23know, discretionary traders or traders
  182. 7:24that trade based on, you know, their
  183. 7:27own, uh one of the hardest things about
  184. 7:30that is your trading psychology. So,
  185. 7:32think about emotions like fear, greed,
  186. 7:35you know, FOMO and so on and so on. Uh
  187. 7:38you know, that is that is one of the
  188. 7:39hardest part of trading. And when you're
  189. 7:41using a bot, the good thing about that
  190. 7:43is that these emotions will be put away.
  191. 7:47So, you will have no emotions and no
  192. 7:50guessing.
  193. 7:52And here, an AI trading bot is a bot
  194. 7:55built and tested with AI. So, first we
  195. 7:58talked about trading bot in general, and
  196. 8:00AI trading bot is built and tested with
  197. 8:02AI. And in this course, as I said, we
  198. 8:04will use Claude. And as I said, Claude
  199. 8:07is right now, at least in my opinion,
  200. 8:10the best AI out there. And the very good
  201. 8:13thing is that you can try Claude
  202. 8:15completely for [snorts] free.
  203. 8:17So here, as you can see on the image
  204. 8:20right here, it watches the market, it
  205. 8:22follows exact rules, and then it uh you
  206. 8:25know, produces buy and sell signals.
  207. 8:29But right, so now then, before we start
  208. 8:32building our AI trading bot, it's very
  209. 8:34important to be grounded in reality and
  210. 8:37to understand what a bot can do and what
  211. 8:40a bot can't do. So let's take a little
  212. 8:43bit
  213. 8:44uh look here what it can and can't. So
  214. 8:46what an AI bot definitely can do is that
  215. 8:48it can watch, you know, many markets
  216. 8:5124/7
  217. 8:52and it can follows follow its own rules
  218. 8:55without emotion. So this is two big
  219. 8:58advantages of over humans. You know, we
  220. 9:01humans, we need to sleep, we need to
  221. 9:03eat, we can't watch the market 24/7, and
  222. 9:06AI trading bot can do that. The other
  223. 9:08benefit is that the bot, at least as far
  224. 9:11as I know, don't have any emotions. So
  225. 9:13this is very, you know, good things
  226. 9:15about bots.
  227. 9:17What it also can do is that it can run
  228. 9:20fully automated,
  229. 9:22[clears throat] which means that it can
  230. 9:23send orders straight to a broker or it
  231. 9:26can run semi-automated, which means that
  232. 9:30it doesn't buy or sell, you know,
  233. 9:32automatically. It sends you a signal
  234. 9:34first. And this is what we will focus on
  235. 9:37on this course. And you know, it's very
  236. 9:39important, I think, at least when you
  237. 9:41are new to building trading bots, that
  238. 9:43you always have this sort of safety
  239. 9:45that, you know, the bot gives you a
  240. 9:47signal and then you approve the signal
  241. 9:49or not. I think that is very very
  242. 9:51important at least for beginners. And I
  243. 9:53have built this course, you know, from
  244. 9:54beginners to advanced traders. So
  245. 9:57we will mostly focus here on
  246. 9:59semi-automated.
  247. 10:01What is also very important to know is
  248. 10:03what uh an AI bot can't do.
  249. 10:07And what an AI bot can't do and what
  250. 10:08many, you know, people think and you
  251. 10:11know, when you search on it on YouTube,
  252. 10:12you can get this sense that, you know,
  253. 10:14some people say that they build bots
  254. 10:16that predict the exact future. And this
  255. 10:18is something it can't do. Nothing can
  256. 10:20predict the future, at least right now,
  257. 10:23nothing can predict the future with
  258. 10:24certainty. And it can also not turn a
  259. 10:26bad strategy
  260. 10:29into a good one. You know, an AI trading
  261. 10:31uh an AI bot can help you, you know, uh
  262. 10:35you know, produce buy and sell signals,
  263. 10:37but it can't predict the exact future.
  264. 10:40And here, and this is so so important,
  265. 10:42and you need to remember this throughout
  266. 10:44the whole course, you need to remember
  267. 10:47that you are responsible for every trade
  268. 10:49your bot takes.
  269. 10:52Okay, but now, and this is very very
  270. 10:54important, now we're going to take a
  271. 10:55look at exactly what you need to set
  272. 10:59this bot up. And it's pretty simple, but
  273. 11:02you need to pay attention, you need all
  274. 11:03of these things. The first thing you
  275. 11:06need for this workflow is that you need
  276. 11:08the TradingView desktop app. This is
  277. 11:11very important. Right now, this workflow
  278. 11:13does not work on browser, and it does
  279. 11:17not work on mobile. So make sure to get
  280. 11:19the desktop app.
  281. 11:22And you also need a plan that includes
  282. 11:25technical alerts. So you need at least
  283. 11:28the essential plan for TradingView. And
  284. 11:31here, don't worry because I do have a
  285. 11:34special link for you guys. I do have a
  286. 11:35special TradingView link, and you can
  287. 11:37use that link to try out actually uh I
  288. 11:40recommend to try out TradingView Premium
  289. 11:43for free for 30 days. And then if you
  290. 11:45later on want to continue, for example,
  291. 11:47if your, you know, AI trading bot is
  292. 11:49performing very well and you want to
  293. 11:50continue, you will also get a $15 bonus.
  294. 11:53So make sure to use that link before
  295. 11:55this step.
  296. 11:57But yeah, after you have clicked on the
  297. 11:58link, you want to then make sure that
  298. 12:00you are on this page,
  299. 12:01tradingview.com/desktop.
  300. 12:04And then simply you go down here and
  301. 12:06download it for Windows if you are on
  302. 12:08Windows, or if you are on Mac, you click
  303. 12:10here. If you are on Linux, you click
  304. 12:12right there.
  305. 12:14But right, so now you hopefully have
  306. 12:16downloaded the TradingView desktop app.
  307. 12:19Now, the next step is that you need the
  308. 12:21Claude desktop app. And here I recommend
  309. 12:25that you have a paid plan for Claude,
  310. 12:28but the good thing about this workflow
  311. 12:30is that Claude, the free version of
  312. 12:31Claude will allow you to do certain
  313. 12:34prompts. So you will be you will be able
  314. 12:36to test this both both out completely
  315. 12:38for free. But if you want to use this a
  316. 12:40lot, you will need to eventually, you
  317. 12:42know, get a paid Claude plan.
  318. 12:45But here to download Claude, you simply
  319. 12:46go to claud.com/download
  320. 12:49and if you want to download on Windows,
  321. 12:51you click right here.
  322. 12:53And if you have any other type of
  323. 12:55system, you find all of the systems down
  324. 12:58here.
  325. 12:59All right, so now the easy part is done.
  326. 13:01You have you hopefully have at this
  327. 13:03point in the course, you have the
  328. 13:04TradingView app, you have the Claude
  329. 13:05app.
  330. 13:06The last thing that you need is what is
  331. 13:08known as the TradingView MCP.
  332. 13:12And this right here in simple terms is
  333. 13:14the bridge. It's the free bridge that
  334. 13:17lets Claude see and control the charts.
  335. 13:21So if you look at this image right here,
  336. 13:24you can see that you currently have the
  337. 13:25TradingView desktop app, you have the
  338. 13:26Claude app, but now we need to make this
  339. 13:30connection. This is the most important
  340. 13:32step. We need to be able to connect
  341. 13:34Claude uh to TradingView. So now
  342. 13:38make sure to really pay attention. I
  343. 13:40will show you guys my free guide on how
  344. 13:42to do this. All right, so what you want
  345. 13:44to do now is that you want to go to my
  346. 13:45website. You go to mymathmoney.com
  347. 13:48and then you want to click here on free
  348. 13:51educational guides. I actually also have
  349. 13:53some premium guides here, one that is
  350. 13:55associated with this course. Uh it is
  351. 13:57available for channel members gold and
  352. 13:59higher, but
  353. 14:01this free guide here you can find right
  354. 14:03here, free educational guides. Then you
  355. 14:06go down here to how to connect Claude to
  356. 14:08TradingView.
  357. 14:09And what I do recommend here, I do
  358. 14:12recommend that you read this article if
  359. 14:14you have the time to understand, you
  360. 14:16know, what you are downloading. I also
  361. 14:19recommend that you actually go to the
  362. 14:20official page.
  363. 14:22So, as you can see right here, this is
  364. 14:23the official GitHub page uh for the for
  365. 14:27the MCP. So, you know, this is a very
  366. 14:30popular one. As you can see, it has like
  367. 14:327K stars. I have been using it. Many
  368. 14:35other traders have been using it. But I
  369. 14:37do want to mention right away that this
  370. 14:38is a common theme throughout this course
  371. 14:40is that only you know download things
  372. 14:43that you know uh you fully trust and
  373. 14:46understand. So, don't trust, you know,
  374. 14:48uh a random GitHub page without doing
  375. 14:50any uh research. Don't trust, you know,
  376. 14:53my video without doing any research.
  377. 14:55Make sure to do your research before you
  378. 14:57download anything. So, I want to
  379. 14:59recommend that you read this whole page
  380. 15:02before you do anything.
  381. 15:04But now with all of this all of this
  382. 15:06said, you fully you fully know uh you
  383. 15:09know what it is.
  384. 15:10Then you can actually scroll down here
  385. 15:12and I have created a prompt.
  386. 15:15This prompt right here is made to make
  387. 15:17this process as easy as possible. So,
  388. 15:20what you simply do is that you want to
  389. 15:21copy this prompt and then you actually
  390. 15:24want to open up uh
  391. 15:26chat here in Claude. And to make this
  392. 15:28process as, you know, uh you know
  393. 15:30similar as possible to you guys, I'm
  394. 15:32going to first write uh or I'm going to
  395. 15:35first speak to Claude that, you know, uh
  396. 15:37hello, can you please act as if you
  397. 15:40don't have any MCP connections and that
  398. 15:43this is a completely fresh Claude
  399. 15:45account. Act as if, you know, you have
  400. 15:47no history, no memory, or anything like
  401. 15:50that.
  402. 15:52Then I can press enter right here. The
  403. 15:54reason I said this is that my I want my
  404. 15:56Claude to look at as your Claude. So,
  405. 16:00sure from here on I have a fresh start,
  406. 16:02blah blah blah blah blah. If you want to
  407. 16:03use say so. Uh
  408. 16:05but yeah now Claude right here should be
  409. 16:07fresh. What I now do, remember I copied
  410. 16:09the previous prompt. So, now I insert
  411. 16:11the prompt right here and then I simply
  412. 16:13press enter. What should happen now and
  413. 16:16if Claude, you know, I actually already
  414. 16:18have this connection, but what should
  415. 16:19happen now is that Claude will guide
  416. 16:22guide you through the whole process. As
  417. 16:24you can see, it says happy to walk you
  418. 16:26through this. First, here's what we're
  419. 16:28building. So it explains everything
  420. 16:29you're building. It explains all the
  421. 16:32steps you need to answer if you're on
  422. 16:33Windows or Mac, blah blah blah. And here
  423. 16:37you will basically be guided step by
  424. 16:39step how to do anything everything to
  425. 16:42get this connection going. And if you
  426. 16:44anywhere in this process,
  427. 16:47you know, stumble upon, you know,
  428. 16:48something doesn't work or anything like
  429. 16:50that,
  430. 16:51what I actually recommend is instead of
  431. 16:54Of course, you can feel free to drop
  432. 16:55comments on YouTube and ask me. I'm very
  433. 16:58happy to help. But many times it's
  434. 17:01actually, you know,
  435. 17:03it's actually easier to just ask Claude,
  436. 17:05you know. Maybe you get an error code
  437. 17:07and then you want to give the error code
  438. 17:08to Claude and
  439. 17:10and work through the problems with
  440. 17:11Claude. Another tip here is that I
  441. 17:14actually recommend to use as powerful
  442. 17:16model as possible. So here you can see
  443. 17:18we have different models.
  444. 17:20You know, what if you have, you know,
  445. 17:23maybe the max plan, you can try using
  446. 17:25Fable 5.1, but Opus here, Opus 5.5 is
  447. 17:29almost as good. So what I recommend is
  448. 17:32actually for most people to use Opus
  449. 17:345.5. But if you have, you know, a plan
  450. 17:37with lots of usage, you can actually
  451. 17:39choose extra. Extra means that it will
  452. 17:41think a little bit more
  453. 17:43before,
  454. 17:45you know, giving answers. And I think
  455. 17:47that, you know, when it comes to trading
  456. 17:48and everything like that, the more
  457. 17:50intelligence we have, the better.
  458. 17:52But yeah, guys, make sure to do this
  459. 17:53whole process and it should work, you
  460. 17:56know, very well.
  461. 17:59All right. So at this point in the
  462. 18:01course, you should have Claude app, you
  463. 18:03should have TradingView, and you should
  464. 18:04also now have the bridge between Claude
  465. 18:07and TradingView. So now we're actually
  466. 18:09ready to see if this works. So as you
  467. 18:11can see, right now we are in the
  468. 18:13TradingView app and
  469. 18:15as you can see up here, we're currently
  470. 18:17looking at Bitcoin. We are on the daily
  471. 18:19time frame right here, which means that
  472. 18:21every candlestick on this chart
  473. 18:22represents one day. And as I already
  474. 18:24mentioned earlier, if you don't have
  475. 18:26TradingView yet,
  476. 18:28you know, I do recommend at least the
  477. 18:30essential plan for this workflow or if
  478. 18:33you, you know, don't, if you don't have
  479. 18:34TradingView yet, I highly recommend you
  480. 18:36do the TradingView premium trial. But as
  481. 18:39I said, I do have a special link for
  482. 18:41that. I will make sure to link that link
  483. 18:43both in the description and the pinned
  484. 18:45comment and you can use that link to get
  485. 18:47both the 30-day free trial as well as
  486. 18:50TradingView premium.
  487. 18:52But now we want to check that this
  488. 18:54connection works. I'm going to open up
  489. 18:55Claude right here and then I'm going to
  490. 18:57simply ask,
  491. 18:58you know, hello Claude, can you tell me
  492. 19:00what chart are am I looking at right now
  493. 19:05in TradingView? Tell me the chart and
  494. 19:07you know what the price is right now.
  495. 19:11And here we can see it was thinking for
  496. 19:13a little while, but now it says I'm
  497. 19:15looking at Bitcoin, which is correct.
  498. 19:17It's the exact correct market. It says
  499. 19:19that the price is right now at 78,000
  500. 19:22and as you can see, the price is at
  501. 19:2378,000. It's up 72% for the day. As you
  502. 19:27can see here, it's indeed up 72% for the
  503. 19:30day. So everything looks correct right
  504. 19:33here. So yeah, our Claude is connected
  505. 19:35to TradingView and we are now finally
  506. 19:37ready to start building our trading bot.
  507. 19:41All right, so now before we can start
  508. 19:43building our AI trading bot, we first of
  509. 19:47all need to know about the five rules
  510. 19:51that every trading bot needs. And here
  511. 19:55the very first rule we need to decide
  512. 19:58is, you know, what market and what time
  513. 20:02frame we are going to trade.
  514. 20:04This right here is very important
  515. 20:06because different trading strategies can
  516. 20:08perform different, you know, depending
  517. 20:09on what market you are trading and what
  518. 20:12time frame. So for example, a trading
  519. 20:14strategy that works very very well on
  520. 20:17the daily time frame might not work at
  521. 20:20all if you try to, you know, scalp on
  522. 20:23say the one minute time frame or even
  523. 20:25the one second time frame. So,
  524. 20:28market and time frame is
  525. 20:30very important to decide. And in this
  526. 20:33course, we're going to use Bitcoin on
  527. 20:35the daily time frame. This is one of the
  528. 20:36most popular and one of the most
  529. 20:39universal markets. And I think the
  530. 20:41technical analysis works very well on
  531. 20:42Bitcoin. But I do want to be clear here
  532. 20:44that you can trade basically anything.
  533. 20:46So you can trade, you know, stocks,
  534. 20:47forex, crypto, or as I said in the
  535. 20:50intro, any other financial market.
  536. 20:52The next rule here
  537. 20:55that we of course need to decide before
  538. 20:57we build our bot is our entry and our
  539. 21:00exit. And here we need, you know, exact
  540. 21:04conditions or in other words, we need
  541. 21:06exact rules to know, you know, when to
  542. 21:09buy and when to sell. And this can be
  543. 21:12anything from, you know,
  544. 21:14normal risk to reward ratios. And it can
  545. 21:17also be things like, you know, stop
  546. 21:20losses and target levels based on price
  547. 21:22action. And in this course, we're going
  548. 21:25to actually use the strategy that the
  549. 21:27turtle traders used. I really like that
  550. 21:30name.
  551. 21:30And here we actually have, you know, a
  552. 21:32mix between fixed and trailing stop
  553. 21:35losses and targets. And you will Don't
  554. 21:37worry if you don't know what that is
  555. 21:39right now. You will learn all about it.
  556. 21:41Um
  557. 21:42and here of course super super important
  558. 21:45is the stop loss. You know, us traders,
  559. 21:48one of the most important things we can
  560. 21:51learn about is, you know, risk
  561. 21:53management. That is how do we basically
  562. 21:56how do we protect the downside? Because
  563. 21:58in order to, you know, make money on a
  564. 22:01on a consistent basis, one of the most
  565. 22:03important thing things is to protect the
  566. 22:05downside. Because for example, this
  567. 22:08principle is so important to know. But
  568. 22:11for example,
  569. 22:13if the market drops
  570. 22:1550% right,
  571. 22:17that actually means that how much do we
  572. 22:19need to recover? Well, in order to
  573. 22:20recover a drop of 50% we actually need
  574. 22:23100%
  575. 22:25to recover. And this one of the most
  576. 22:27important asymmetries in trading. So
  577. 22:30that is, you know, why risk management
  578. 22:32is so so important. And in this video,
  579. 22:34we don't really have time to dive super
  580. 22:36super deep into risk management, but I
  581. 22:38do want to mention already that I do
  582. 22:40have a full risk management course right
  583. 22:43here on YouTube. I'll make sure to link
  584. 22:44that course up in the video card as well
  585. 22:46as the description. I can't stress
  586. 22:49enough how much I recommend that course.
  587. 22:51And in that course, we talk about things
  588. 22:53like stop losses, but we also
  589. 22:56talk about things like position size.
  590. 22:58This is another thing.
  591. 23:00This is another rule that your bot
  592. 23:02needs. So in other words, how much of
  593. 23:06the account should you risk on each
  594. 23:08trade? You know, it's often very smart
  595. 23:11or all pretty much always very smart
  596. 23:13that you or it's kind of, you know, says
  597. 23:16itself that you should not risk
  598. 23:17everything on one trade. You can have a
  599. 23:20trading strategy that in theory works,
  600. 23:22but if you lose everything on one trade,
  601. 23:25then you are completely out of the game.
  602. 23:27And that is
  603. 23:28probably the most important thing we
  604. 23:30want to avoid as traders.
  605. 23:34All right. So now, guys, the time has
  606. 23:35finally come to take a look at the
  607. 23:38turtle traders. And what on earth or who
  608. 23:42are the turtle traders? Well,
  609. 23:46let's take a quick look at this because
  610. 23:48this will be the basis of the trading
  611. 23:51strategy and trading bot we will build
  612. 23:53later on in this course.
  613. 23:55But first of all,
  614. 23:56in 1983,
  615. 23:59Richard Dennis, which you can see on the
  616. 24:01image right here,
  617. 24:04actually set out to settle a debate with
  618. 24:08another trader called William Eckhardt.
  619. 24:11So here is an image of William Eckhardt.
  620. 24:15And they basically debated if, you know,
  621. 24:18can trading actually be taught? Is this
  622. 24:20something you can teach? And of course,
  623. 24:22by having this channel, I think that
  624. 24:25trading definitely is something you can
  625. 24:27learn. I also think that trading is
  626. 24:29basically a a mix of things you can
  627. 24:31learn, but you also need experience. You
  628. 24:33also need, you know, to put in the reps,
  629. 24:35of course.
  630. 24:37But that that was basically the debate
  631. 24:39between Richard and William.
  632. 24:41And
  633. 24:42what Dennis then did to try to
  634. 24:45demonstrate this what that was that he
  635. 24:47recruited completely beginners, so noob
  636. 24:49traders that he called the Turtles, and
  637. 24:52he trained them for only two weeks.
  638. 24:55And here the Turtles traded a trend
  639. 24:59following system. This simply means that
  640. 25:02you trade in the same direction as the
  641. 25:04trend. So if you, for example, have an
  642. 25:06uptrend, the goal here
  643. 25:08is to, you know, trade and make money as
  644. 25:11the price goes up. A very common
  645. 25:13strategy is to buy pullbacks here, but
  646. 25:15you can also buy breakouts. But yeah, so
  647. 25:19he did a trend following system
  648. 25:21and in this case he actually it was all
  649. 25:24about buying breakouts and buying
  650. 25:27specific breakouts over specific highs
  651. 25:29and then sell the price when we fell
  652. 25:32below
  653. 25:33you know recent lows. And you know as I
  654. 25:36said with when you need when you build
  655. 25:37[clears throat] a trading bot you need
  656. 25:38specific rules and I will talk all about
  657. 25:40that very soon.
  658. 25:43And here in this course we are going to
  659. 25:44use a simplified version of their rules
  660. 25:48as an example bot because my goal with
  661. 25:51this course is that you know to show you
  662. 25:53guys how you can build basically build
  663. 25:55your own trading bot from scratch and
  664. 25:58you can also you know
  665. 26:00AI is so powerful so you can actually
  666. 26:02build your own trading strategies and
  667. 26:04you can back test them and you can build
  668. 26:06bots around them. but I do want to
  669. 26:08emphasize that this example I will show
  670. 26:10in this video is a
  671. 26:12it's first of all a simplified version
  672. 26:14of the strategy and it's also a you know
  673. 26:16just an example.
  674. 26:18But all right guys so now it's finally
  675. 26:20finally time to build our trading bot
  676. 26:24and as I said the trading bot we will
  677. 26:26build is the I call it the Turtle
  678. 26:30breakout 5520
  679. 26:33and you will soon understand
  680. 26:35the name here and you already know where
  681. 26:37turtle comes from. It comes from the
  682. 26:38turtle traders. But now let's begin here
  683. 26:41by
  684. 26:41you know stating the rules for this
  685. 26:44trading bot.
  686. 26:46So the rules here rule for this bot is
  687. 26:48as follows.
  688. 26:50The entry we enter or in other words we
  689. 26:52buy when the daily close is above the
  690. 26:56highest high of the previous 55 days. So
  691. 27:01with a daily close I mean that if we
  692. 27:03have a candlestick right here the close
  693. 27:06of the candle is where the candle stops
  694. 27:09on the daily time frame. For example
  695. 27:11this right here is the close. This right
  696. 27:13here is the open. This right here is the
  697. 27:14high. This right here is the low.
  698. 27:16In this trading strategy if we get a
  699. 27:18close that is higher than as I said the
  700. 27:21highest high of the previous 55 days. So
  701. 27:24let's say that this right here back then
  702. 27:26was the highest high and we close above
  703. 27:28this is our signal to buy. This is our
  704. 27:31signal to enter the trade.
  705. 27:34But here and this is you know at least
  706. 27:37as important as the entry. This is our
  707. 27:38stop loss.
  708. 27:40And here what we are going to do is that
  709. 27:42we're going to place a stop loss two
  710. 27:45times the ATR which basically stands for
  711. 27:48average true range. This is a very
  712. 27:50common indicator used for stop losses
  713. 27:53but we're going to use the average true
  714. 27:54range over 20 days and ATR basically
  715. 27:57measures the size of a normal days move
  716. 27:59or that is a simply way
  717. 28:01to think of think about it but we're
  718. 28:03going to do two times the ATR below the
  719. 28:06signal days
  720. 28:08close. So we're going to do two times
  721. 28:10the ATR here below the close. So two
  722. 28:13times
  723. 28:14the ATR 2x right there. And
  724. 28:19also guys don't worry if you don't know
  725. 28:21about the ATR I highly recommend
  726. 28:22actually to understand the strategy
  727. 28:25you're using. It's very important to
  728. 28:26understand the pieces and I do have a
  729. 28:28video on the ATR indicator. I will make
  730. 28:30sure to link it up in both the video
  731. 28:33card as well as the description below.
  732. 28:36Uh, now we have the entry, we have the
  733. 28:38stop loss, but what about the exit?
  734. 28:40Well, here we're actually going to sell
  735. 28:42when the daily close is below the lowest
  736. 28:47low of the previous 20 days. So in this
  737. 28:52case the exit of the turtle breakout
  738. 28:55strategy is actually like a trailing
  739. 28:57exit. It will not be determined on day
  740. 28:59one. It will actually follow the price.
  741. 29:02Uh, so that is very important.
  742. 29:05Last but not least here for position
  743. 29:07size, uh, this can be, you know,
  744. 29:09different depending on your your sort of
  745. 29:12risk tolerance and your overall goal.
  746. 29:14But to keep it simple, a very simple
  747. 29:16rule is to risk 1% of your account. And
  748. 29:20once again, I'm going to do a note here
  749. 29:22that this is a simplified version of the
  750. 29:25turtles rules. Uh, you know, for
  751. 29:27example, in this case we only go long to
  752. 29:30keep it more beginner friendly, meaning
  753. 29:31that we only bet that the price will go
  754. 29:34up.
  755. 29:34We use closing prices, we do no
  756. 29:37additional trades and so on and so on.
  757. 29:39And of course, as I mentioned in the
  758. 29:41disclaimer, this is of course, you know,
  759. 29:43only an example and not financial
  760. 29:46advice.
  761. 29:47Okay, so now the time has come to build
  762. 29:50an AI trading bot together with Claude.
  763. 29:55And we're going to use Claude and
  764. 29:57TradingView.
  765. 29:58And the process here is pretty
  766. 30:00straightforward. What we're going to do
  767. 30:02is that we're going to give Claude the
  768. 30:05three, uh, I mean the five trading rules
  769. 30:08from our trading strategy in very clear
  770. 30:11terms. You know, nowadays I would say
  771. 30:13that Claude is very good at
  772. 30:14understanding you even if you are not
  773. 30:16exact. But when you build a trading
  774. 30:18strategy, it's of course better to be as
  775. 30:21exact as possible when you formulate the
  776. 30:23trading strategy.
  777. 30:25And then when you give the prompt,
  778. 30:26Claude will write the bot as a Pine
  779. 30:30Script strategy. If you didn't know,
  780. 30:33Pine Script is simply, you know,
  781. 30:34TradingView's coding language. So it is
  782. 30:37the coding language used to, yeah, build
  783. 30:39scripts and indicators and so on and so
  784. 30:42on. And it also adds it to your charts.
  785. 30:46And Claude is so impressive. It can
  786. 30:49actually fix its own errors until the
  787. 30:52strategy works. And here a pro tip to
  788. 30:55sort of double check it yourself.
  789. 30:57As I have been talking about throughout
  790. 30:58this course, I always recommend to you
  791. 31:00to double check everything. Yes, AI
  792. 31:03nowadays is so so powerful, but we are
  793. 31:05still in a phase where AI can make
  794. 31:08mistakes. It can hallucinate and so on
  795. 31:10and so on. So I highly recommend to
  796. 31:11actually double check the work.
  797. 31:14All right. So now we are back here in
  798. 31:16TradingView and I'm going to open up
  799. 31:19Claude here. Remember, you need to use
  800. 31:20the Claude app.
  801. 31:22And once again, just to confirm that
  802. 31:24Claude is connected to TradingView, we
  803. 31:26can start by just asking,
  804. 31:29uh, hello Claude, can you tell me what
  805. 31:31chart are we looking at right now?
  806. 31:35Uh, and press enter right here. I also
  807. 31:37recommend to either use Fable 5.1 or to
  808. 31:41use Opus 5.5. And if you use Opus, I
  809. 31:44prefer the extra option right here. The
  810. 31:46max option is a little bit overkill. As
  811. 31:48you can see, it takes
  812. 31:50four times or more usage. So it uses
  813. 31:53lots and lots of of tokens.
  814. 31:56And, you know, I have the max plan, so I
  815. 31:58have the the the the sort of
  816. 32:00plan with the most tokens. But if you
  817. 32:02are not on the max plan, it can quickly
  818. 32:04get eaten up.
  819. 32:05So I recommend, you know, extra or if
  820. 32:07you are tight on tokens, you can even
  821. 32:09try high or medium. But if you have
  822. 32:10tokens, go for the extra right here.
  823. 32:13And as you can see,
  824. 32:14it says you're looking at Bitcoin. We
  825. 32:16are on the daily time frame. It says,
  826. 32:18you know, the last daily candle,
  827. 32:20November so far. You know that the price
  828. 32:23was last at 78,400. Everything looks
  829. 32:26very correct right here.
  830. 32:28Uh, but what I'm now going to do is that
  831. 32:29I have actually prepared the prompt here
  832. 32:32to build the trading strategy.
  833. 32:35So as you can see, it's pretty long
  834. 32:37right here. Build this trading as a
  835. 32:39TradingView Pine Pine Script blah blah
  836. 32:41blah blah blah. Of course, for this
  837. 32:42step, you can build whatever trading
  838. 32:44strategy you want. This is just an
  839. 32:46example for this course.
  840. 32:48And what I can also mention if is that
  841. 32:51if you want this exact prompt and
  842. 32:53basically everything you need for this
  843. 32:55whole course, I have a like a study
  844. 32:57guide that you can download. It's a PDF
  845. 32:59guide. It's currently available for all,
  846. 33:02you know, our channel members gold and
  847. 33:04higher. So if you didn't know, I
  848. 33:06actually we actually have a community
  849. 33:08right here on YouTube where members, you
  850. 33:11know, get access to things like, you
  851. 33:13know, this study guide. You get access
  852. 33:15to
  853. 33:16all the guides for my other courses as
  854. 33:18well. You get access to my own
  855. 33:19TradingView indicators and so on and so
  856. 33:21on while at the same time you support my
  857. 33:23work. So if you want to become a channel
  858. 33:25member, just click the join button next
  859. 33:28to the subscribe button and a short
  860. 33:29video will pop up where I explain the
  861. 33:31different memberships. But
  862. 33:34you know, you don't need to become a
  863. 33:35member. All you need to do here is to
  864. 33:37follow along. So now I'm going to click
  865. 33:40enter right here
  866. 33:41and now
  867. 33:43as you can see Claude will work here to
  868. 33:46build this indicator.
  869. 33:49I mean this trading strategy. This can
  870. 33:52take a little while, but
  871. 33:54as I said, I much rather it take, you
  872. 33:57know, a minute or two and that Claude
  873. 33:59actually works to build the strategy
  874. 34:00correctly rather than, you know, rushing
  875. 34:02it and getting it wrong. So now I will
  876. 34:05just let Claude cook for a while and I
  877. 34:08will be back when the strategy is
  878. 34:10complete.
  879. 34:12Okay, so now after thinking for like two
  880. 34:14three minutes, we got this back and here
  881. 34:17what they actually wrote in the prompt
  882. 34:19is that
  883. 34:20before he will actually build the
  884. 34:23indicator,
  885. 34:24I wrote that he should explain
  886. 34:27everything in, you know, plain English.
  887. 34:29So it says, you know, what chart Bitcoin
  888. 34:31direction long only, you know, exactly
  889. 34:33when to buy, exactly stop loss, what
  890. 34:35when to sell, the size. So everything is
  891. 34:38listed here. So I actually recommend to
  892. 34:40read through your whole strategy. You
  893. 34:41see that everything is correct. You see
  894. 34:44the assumptions. You see, you know, some
  895. 34:46notes about the stop loss, position
  896. 34:48size, and so on and so on. And, you
  897. 34:50know, it says reply go or tell me what
  898. 34:53to change and I will build it. So
  899. 34:56I didn't read through all of this, but
  900. 34:58this is just a demonstration. So I'm
  901. 34:59going to say, you know,
  902. 35:01uh uh let's
  903. 35:02let's build the bot go.
  904. 35:06And now
  905. 35:07Claude will start actually building the
  906. 35:10bot using the Pine Script coding
  907. 35:13language.
  908. 35:15I can also just mention here that it's
  909. 35:17kind of cool to let, you know, or to
  910. 35:19look at, you know, Claude working here
  911. 35:22in
  912. 35:23you know, live. So we can see here that
  913. 35:25it has already started to build the
  914. 35:27script right here. And you can see that,
  915. 35:30you know, Claude is working right now.
  916. 35:31You can see everything it has done here,
  917. 35:34how it like failed a task and then found
  918. 35:37a solution. Right now it's working.
  919. 35:39Yeah, you can see it's working really
  920. 35:41hard with different things.
  921. 35:43You know, I'm not going to say that I'm
  922. 35:46understanding anything of this, but
  923. 35:48yeah.
  924. 35:49Like sometimes, especially if you're
  925. 35:51using here incognito mode, you will need
  926. 35:54to click allow.
  927. 35:56There are some like checks here that you
  928. 35:58need to click allow or there is usually,
  929. 36:01you know, if you don't use incognito,
  930. 36:04you can choose here to, you know, always
  931. 36:06allow
  932. 36:07Claude, you know, everything. But
  933. 36:10you might need to be able to be at the
  934. 36:12computer to allow certain tasks.
  935. 36:15But as with everything, you know, before
  936. 36:17allowing things, you need to, you know,
  937. 36:19understand what you are allowing. And
  938. 36:21now if we take a look here, we can
  939. 36:23actually start to see the trading
  940. 36:24strategy appearing here on the chart.
  941. 36:26Really cool here. We see buy signals, we
  942. 36:28see sell signals, buy, sell, buy, sell,
  943. 36:31and so on and so on.
  944. 36:33Okay, guys. So now the the bot has been
  945. 36:37built right here.
  946. 36:39So let's actually close down Claude and
  947. 36:41we can see just like that the whole
  948. 36:44trading strategy is built uh right here
  949. 36:47on TradingView. And the script we can
  950. 36:50see down here where it says uh
  951. 36:52you can't really see because my camera
  952. 36:54is a little bit on the way, but you know
  953. 36:56Claude built all of this code right here
  954. 36:59beautifully beautifully.
  955. 37:01And what we can also see is that down
  956. 37:05here
  957. 37:06we actually have a backtest of the
  958. 37:08trading strategy. And we will talk more
  959. 37:11about this backtest later, but you can
  960. 37:13see here that this trading strategy made
  961. 37:15around 700% in profit. You can see here
  962. 37:18the max drawdown. And one interesting
  963. 37:21things you can also also already notice
  964. 37:23here is that the amount of profitable
  965. 37:25trades was actually only 45% of the
  966. 37:28time.
  967. 37:29But what this means is that you know yes
  968. 37:32we lost more than we won, but when we
  969. 37:35actually won the trades
  970. 37:37we won a lot more. So for example this
  971. 37:40trade right here you can see that we won
  972. 37:41massively.
  973. 37:43Uh
  974. 37:43so yeah, but as I said we will talk more
  975. 37:45about the backtest later on because now
  976. 37:48I want to switch the attention and take
  977. 37:49a look at what do we need to check
  978. 37:52before we start trusting this trading
  979. 37:55strategy.
  980. 37:56But so now the time has come for step
  981. 37:59number two right here and that is to
  982. 38:01actually check the bot by hand. And the
  983. 38:04reason we want to check you know at
  984. 38:06least one trade but preferably more uh
  985. 38:09is to just you know confirm that the AI
  986. 38:11trading bot actually did what we asked
  987. 38:13it to do. Uh as I mentioned already yes
  988. 38:18today's AI are super super powerful and
  989. 38:20I would say it's better than 99.9%
  990. 38:23of coders and it's better than most
  991. 38:25people at most things, but it can still
  992. 38:28make mistakes. So it's very important to
  993. 38:31still double check your work especially
  994. 38:33when it comes to things like you know
  995. 38:34trading and so on and so on.
  996. 38:36So
  997. 38:38here what I recommend is to check three
  998. 38:40trades on the chart. So double check you
  999. 38:43know the entry is the entry correct
  1000. 38:45according to the rule we gave it.
  1001. 38:48Also, make sure to check the stop loss.
  1002. 38:49Is the stop loss correct according to to
  1003. 38:51the rules? And also check the exit. Is
  1004. 38:54the exit correct according to the rules?
  1005. 38:56And in our example,
  1006. 38:59what we need to look for here is first
  1007. 39:01of all that the breakout compares the
  1008. 39:04close with the previous 55 candles. So
  1009. 39:08remember, our entry signal is when the
  1010. 39:10price breaks above the highest point of
  1011. 39:13the last 55 candles.
  1012. 39:16The second thing we need to check here
  1013. 39:18is that the stop loss is is set once
  1014. 39:21only at entry. So we don't want to see
  1015. 39:24our stop loss move. In our case, in our
  1016. 39:27bot, the stop loss would be an orange
  1017. 39:29line like this. And if the orange line
  1018. 39:31moves, we know that something is wrong.
  1019. 39:33The orange line should be fixed at a
  1020. 39:35certain level.
  1021. 39:36The next thing you can check right here
  1022. 39:38is that the position size is indeed 1%
  1023. 39:41of the account
  1024. 39:44divided by the distance to the stop
  1025. 39:48loss.
  1026. 39:49Okay, so now we're back here in
  1027. 39:51TradingView and I can once again mention
  1028. 39:53if you don't have TradingView yet,
  1029. 39:55hopefully at this point you have
  1030. 39:57TradingView Premium so you can follow
  1031. 39:58along with everything. But if you don't
  1032. 40:00have TradingView Premium yet, I do have
  1033. 40:02a special link. It will be both in the
  1034. 40:04pinned comment and description. Make
  1035. 40:05sure to use that link if you haven't
  1036. 40:07taken advantage of it yet.
  1037. 40:10But as I said on the slide, I recommend
  1038. 40:12that you check three trades. But for
  1039. 40:13this course, let's just double check one
  1040. 40:15trade here. The first thing we want to
  1041. 40:17check is the buy signal. So as you can
  1042. 40:21see
  1043. 40:22right here, we have a buy signal. And
  1044. 40:25remember, the buy signal happens when we
  1045. 40:26close above, you know, the highest point
  1046. 40:29of the last 55 days. And this is
  1047. 40:31represented by the I hope you can see
  1048. 40:35the green line right here.
  1049. 40:38So if we extend this green line, we
  1050. 40:40should hopefully see, you know, the
  1051. 40:42point we're talking about. And as you
  1052. 40:44hopefully can see right here, this was
  1053. 40:46the highest point of all of these
  1054. 40:48candles.
  1055. 40:49Uh, so that is why we we get the entry
  1056. 40:53signal when the candle closes. And
  1057. 40:55remember, it closes up here. So when it
  1058. 40:57closes above, that is when we get the
  1059. 40:59entry signal. And remember, the second
  1060. 41:01thing we want to check here, which is
  1061. 41:03very important, is the stop loss level,
  1062. 41:05which is set two times the ATR below the
  1063. 41:10candle close. So so this distance right
  1064. 41:13here is two times the ATR. And what is
  1065. 41:15very important to check about this stop
  1066. 41:16loss is that it doesn't move. You can
  1067. 41:18see the line here is straight. Compare
  1068. 41:20that to the red line.
  1069. 41:23You can see the red line is constantly
  1070. 41:24moving. The green line is also
  1071. 41:26constantly moving, but the uh the orange
  1072. 41:30line should be straight. So this is also
  1073. 41:32correct. So now the entry is correct,
  1074. 41:34the stop loss is correct.
  1075. 41:36The last thing we need to check here is
  1076. 41:37the exit.
  1077. 41:39And you can see here that the sell
  1078. 41:40signal came all the way up here.
  1079. 41:44[snorts]
  1080. 41:45And the reason we sold was that the
  1081. 41:46price dropped below this low right here.
  1082. 41:49You can see this red line right here. If
  1083. 41:50we extend it,
  1084. 41:52we can see I think the low is actually
  1085. 41:54from this low right here. So this was
  1086. 41:55the lowest point of the last 20 candles,
  1087. 41:58and that is why we automatically sell
  1088. 42:00when the candle closes below right here.
  1089. 42:03So just by looking at this trade, the
  1090. 42:05bot looks completely correct. But as I
  1091. 42:08said, what I recommend is to check
  1092. 42:10maybe, you know, at least two or three.
  1093. 42:12Uh, but that would be pretty boring in
  1094. 42:14this course, but you just do the the
  1095. 42:15same method. Another reason why I think
  1096. 42:18it's, you know, so important to check
  1097. 42:19your bot is because that is like a test
  1098. 42:22if you actually understand the strategy.
  1099. 42:25So the rules you have given it, it's
  1100. 42:26important that you understand the rules
  1101. 42:28because if you don't understand the
  1102. 42:29rules, you will not really know if the
  1103. 42:31bot did anything uh you know, anything
  1104. 42:34wrong, if that makes sense.
  1105. 42:36All right, so now the time has come to a
  1106. 42:38very important step when it comes to
  1107. 42:41using and trading with AI bots. And that
  1108. 42:44is of course to back test the bot. And
  1109. 42:47luckily, we have actually already done a
  1110. 42:50back test, but it's very important to be
  1111. 42:51able to understand the backtest. So
  1112. 42:53let's take a look at what a backtest is
  1113. 42:55and why it's so important and what you
  1114. 42:56need to basically have in mind. So in
  1115. 42:59very simple terms, a backtest runs the
  1116. 43:02bot on past data. So it looks at, you
  1117. 43:05know, the chart and the past candles and
  1118. 43:08see how the rules or how the training
  1119. 43:11strategy would have performed in the
  1120. 43:13past. So it says, you know, how would
  1121. 43:15this strategy have performed, you know,
  1122. 43:17in on the last in this case of Bitcoin,
  1123. 43:20maybe the last 10 years.
  1124. 43:23And
  1125. 43:24to make it realistic, what we want to do
  1126. 43:26is that we want to add commissions and
  1127. 43:28slippage. So, you know, when you
  1128. 43:31backtest something, it can often look a
  1129. 43:33little bit better than what it costs in
  1130. 43:36real term because every time you buy or
  1131. 43:38sell something, you need to pay a little
  1132. 43:41bit to the bank. You need to pay a
  1133. 43:42little bit to your broker in
  1134. 43:43commissions. And another reality of
  1135. 43:46market is something known as slippage.
  1136. 43:49That is basically, you know, when you
  1137. 43:50place a buy order, especially if the
  1138. 43:52market is not very liquid, if you try to
  1139. 43:54buy something, you might not get the
  1140. 43:56exact price you were looking for. Uh you
  1141. 43:59might have to pay a little bit more and
  1142. 44:00that is also a reality of trading and
  1143. 44:02something we, you know, have to account
  1144. 44:04for.
  1145. 44:06Another thing that is good to do with
  1146. 44:08backtest is to actually compare your
  1147. 44:11result with a buy and hold strategy. And
  1148. 44:15this can actually be a very sort of nice
  1149. 44:18aha moment, you know, especially for
  1150. 44:20Bitcoin. Bitcoin has performed very very
  1151. 44:23well by just holding Bitcoin. To be
  1152. 44:25honest, it has probably outperformed
  1153. 44:27pretty much every trading strategy. You
  1154. 44:29know, if you held Bitcoin from, you
  1155. 44:31know, 2013 or uh you know, from even
  1156. 44:35more recent, you would have made lots
  1157. 44:38and lots of money. So it's important to,
  1158. 44:41you know, compare, you know, how would I
  1159. 44:43have performed by just holding the
  1160. 44:45assets versus using the AI trading bot.
  1161. 44:49Another thing you can do is that you can
  1162. 44:50test the bot on other time frames. So
  1163. 44:53for example, look at, you know, how
  1164. 44:54would the
  1165. 44:55trading strategy perform on the five
  1166. 44:57minute chart instead of the daily or on
  1167. 44:59the one hour chart instead of the weekly
  1168. 45:03and so on and so on.
  1169. 45:05Another thing, a quick note here is to
  1170. 45:07just of course understand that all
  1171. 45:08trades are simulated. So TradingView you
  1172. 45:12know creates sort of simulated orders.
  1173. 45:15This is not you know, but the backtest
  1174. 45:16is not something that has actually
  1175. 45:18happened. And in real markets, if you
  1176. 45:22know,
  1177. 45:23it doesn't really matter if you're a
  1178. 45:24small trader, but when you start to have
  1179. 45:26lots and lots of money, you can actually
  1180. 45:28affect the market itself. And that is
  1181. 45:30something to have a little bit in mind,
  1182. 45:32but if you trade something like Bitcoin
  1183. 45:34and don't have a lot of money, you don't
  1184. 45:36affect the market much, but you know,
  1185. 45:38it's still something that I think is
  1186. 45:40worth mentioning.
  1187. 45:42All right. So now then, now let's take a
  1188. 45:44look at how to read the results of a
  1189. 45:47backtest and there are a few important
  1190. 45:50things we need to learn about. The first
  1191. 45:52thing very simple is win rate. This is
  1192. 45:54the percentage of trades that made
  1193. 45:58money. And
  1194. 46:00as I have mentioned earlier, you don't
  1195. 46:03have to win more than 50% of trades to
  1196. 46:05make money. You can actually win let's
  1197. 46:07say 25% of the trades
  1198. 46:10to to and still make money because it
  1199. 46:13all depends on your average, how much
  1200. 46:17you win versus your average, how much
  1201. 46:19you lose. So how big are the winners
  1202. 46:22compared to the losers? If your winners
  1203. 46:24are much bigger than your losers, then
  1204. 46:26you can afford to win less and still
  1205. 46:29make lots of money.
  1206. 46:32Another very important thing you need to
  1207. 46:34learn about is what is known as max
  1208. 46:36drawdown. And this is simply the biggest
  1209. 46:39drop in the account from the peak. So
  1210. 46:43how much did your account totally drop
  1211. 46:46and check that it counts the open trades
  1212. 46:49too.
  1213. 46:50Once again, I do want to emphasize here
  1214. 46:53and I want you guys to remember that a
  1215. 46:54backtest shows the past and it's not a
  1216. 46:57promise of the future. So even if you
  1217. 46:59have a backtest that has performed, you
  1218. 47:01know, very well in the past, it doesn'
  1219. 47:03mean that it will perform very well in
  1220. 47:05the future. Yes, it makes it more likely
  1221. 47:08that this strategy will perform well,
  1222. 47:10but it's no guarantee. You know,
  1223. 47:12anything can happen. Let's say you built
  1224. 47:13a trading strategy that performed very
  1225. 47:16well on the stock market before, you
  1226. 47:18know, the COVID crash, and then the
  1227. 47:20COVID crash happens, and that is a
  1228. 47:21completely new market environment where
  1229. 47:24your your strategy might get completely
  1230. 47:27obliterated. Black swans happen. We need
  1231. 47:29to understand that, you know, uh yes,
  1232. 47:32backtesting is very good and important,
  1233. 47:34but it's no promise. It's definitely no
  1234. 47:37promise.
  1235. 47:38All right, so now let's jump back here
  1236. 47:40into TradingView, and you should be able
  1237. 47:42to see your backtest should open up down
  1238. 47:45here. So you just press down here, and
  1239. 47:47then you drag it out. And here are some
  1240. 47:51key sort of stats. First of all, you can
  1241. 47:53see that our trading strategy made uh 70
  1242. 47:57uh
  1243. 47:58729% in profit, or in other words, uh
  1244. 48:01$72,000.
  1245. 48:04You can see here that our max drawdown
  1246. 48:05was 3.29%.
  1247. 48:08And this is not the max from the highest
  1248. 48:10to lowest point. This is only of closed
  1249. 48:12trades, so it's important to have that
  1250. 48:14in mind.
  1251. 48:15The other thing that is very important
  1252. 48:16is that as you can see, our win rate was
  1253. 48:19only 45%, but despite having 45% win
  1254. 48:22rate, we still made lots of money. And
  1255. 48:25that's because we had a very good profit
  1256. 48:27factor. We had a profit factor of 7.6.
  1257. 48:32And a profit factor of 7.6 basically
  1258. 48:35means that for every dollar the bot
  1259. 48:37lost, we actually made $7.6. So so we
  1260. 48:40had a very good profit factor. And of
  1261. 48:43course, right here we can see, you know,
  1262. 48:45the graph. You can see how the bot has
  1263. 48:48performed. It's important to notice
  1264. 48:49that, you know, most of the gains here
  1265. 48:52or lots of the game gains come from a
  1266. 48:55few very like like uh
  1267. 48:58very good trades. So we have a few
  1268. 49:00trades that really, really makes up most
  1269. 49:03most of the profits. And then we have,
  1270. 49:04you know, a few like slow and steady
  1271. 49:07trades right here.
  1272. 49:09Um, what can we see more? You can see
  1273. 49:12here the gross profit, the gross loss,
  1274. 49:15commission load. You can go down here
  1275. 49:17and take a look at the distribution. So
  1276. 49:20you can see, you know, losers, winners,
  1277. 49:22and how much you made on these.
  1278. 49:25What is also very important, you can, if
  1279. 49:27you click right here, you can see how
  1280. 49:29would your trading strategy have
  1281. 49:31compared with a buy and hold strategy.
  1282. 49:34And if we click show right here, you can
  1283. 49:35see that we get absolutely obliterated
  1284. 49:39by Bitcoin. So what this means is that
  1285. 49:41just holding Bitcoin would have beaten
  1286. 49:44this trading strategy by a lot. So I
  1287. 49:47have to be honest with that. You know,
  1288. 49:49even though this is a decent return,
  1289. 49:51Bitcoin completely beats that. And
  1290. 49:54what I also have to say is that, you
  1291. 49:56know, this is probably true for pretty
  1292. 49:59much all trading strategies. It's very
  1293. 50:01hard to beat the performance of Bitcoin
  1294. 50:04from back in, you know, 20 2013.
  1295. 50:09That is an insane gain from Bitcoin.
  1296. 50:12All right. So now the time has finally
  1297. 50:14finally come to, you know, turning our
  1298. 50:17AI trading bot on. And what we want to
  1299. 50:21do here is that we want the bot to, you
  1300. 50:23know, notify us and give us a signal
  1301. 50:26every time it finds a trade. And to add
  1302. 50:31a layer of security to this, this is,
  1303. 50:34you know, especially important if you
  1304. 50:35are new to building AI trading bots. And
  1305. 50:38if you're watching this video, I assume
  1306. 50:40that you are, you know, you know, pretty
  1307. 50:42new to this game.
  1308. 50:44The important part here is that the bot
  1309. 50:46will give you a signal, but it's you who
  1310. 50:49actually click buy or sell. Of course,
  1311. 50:52you can automate it this completely so
  1312. 50:54the bot automatically buy and sell. But
  1313. 50:57I think that especially in the
  1314. 50:58beginning, it's super important that
  1315. 51:00it's actually you that, you know double
  1316. 51:02check and click buy or sell.
  1317. 51:05So, what we're going to do here is that
  1318. 51:07we are going to have it like this. Um, a
  1319. 51:10strategy alert will fire every time the
  1320. 51:14bot enters or exits a trade.
  1321. 51:18So,
  1322. 51:19we are going to have first of all, we
  1323. 51:21are going to make you know we're going
  1324. 51:23to have Claude create the alert and the
  1325. 51:26whole alert system for you through the
  1326. 51:29MCP. The MCP is simply uh the connection
  1327. 51:32here between um TradingView and Claude
  1328. 51:35that we have been using throughout this
  1329. 51:37whole course.
  1330. 51:38And
  1331. 51:39here the alerts uh run on TradingView's
  1332. 51:43servers and uh will can reach your
  1333. 51:46phone, your email. It will uh
  1334. 51:49you know reach your TradingView app and
  1335. 51:51so on and so on. And it's very important
  1336. 51:53that you don't need to have TradingView
  1337. 51:55open. You will get these alerts from the
  1338. 51:57bot uh you know if you're out and about
  1339. 52:00you know you just have your phone with
  1340. 52:02you and you will always
  1341. 52:04get these alerts.
  1342. 52:06And
  1343. 52:07it's very important here that if you
  1344. 52:08make any changes to the strategy you
  1345. 52:11need to
  1346. 52:12you might need to recreate the alerts.
  1347. 52:15So, here on this image you can see a
  1348. 52:17simplified sort of explanation of what
  1349. 52:19we do. First we will have Claude create
  1350. 52:21the alert system here and then when we
  1351. 52:24have the alerts you can have them sent
  1352. 52:26to your phone, to your email. The alerts
  1353. 52:29will run as I said when TradingView is
  1354. 52:31closed and so on and so on. But now
  1355. 52:34let's jump back into TradingView here
  1356. 52:36and take a look at how we can actually
  1357. 52:37create this alert system and turn the
  1358. 52:40bot on.
  1359. 52:42Okay, so now we're back here in
  1360. 52:43TradingView and I have the you know
  1361. 52:45Claude window open right here. So, now
  1362. 52:48let's create the alert system and one of
  1363. 52:49my favorite way to actually prompt
  1364. 52:52Claude is to use you know voice. I think
  1365. 52:54that is much it's much faster and more
  1366. 52:57efficient than writing. Um,
  1367. 52:59so let's try to you know just talk to
  1368. 53:02Claude here and create the alert system.
  1369. 53:05So, all right. So,
  1370. 53:08hello Claude. What I want you to do now
  1371. 53:10is that I want you to create an alert
  1372. 53:13system for the current trading strategy,
  1373. 53:16the turtle breakout 5520
  1374. 53:20and I want you to
  1375. 53:22you know, fire an alert every time the
  1376. 53:25bot buys or sells. I want you to use the
  1377. 53:28bot's own alert messages and I want you
  1378. 53:32to send the alerts to both email and the
  1379. 53:36app notifications. Make the alerts last,
  1380. 53:39you know, as long as possible and don't
  1381. 53:42touch my other alerts. And when you are
  1382. 53:45done, I want you to tell me the settings
  1383. 53:49you're use you used. So, yeah, that's
  1384. 53:52it.
  1385. 53:54So now, as you can see, all of the text
  1386. 53:57appears right here. I will simply press
  1387. 53:58enter and let Claude do its thing.
  1388. 54:02All right. So now, Claude is done
  1389. 54:05working and as you can see, just as we
  1390. 54:07asked, it shows all settings right here
  1391. 54:10in the chat.
  1392. 54:12If we take this chat down, you can also
  1393. 54:14see that the alert is created right
  1394. 54:17here. It should already be saved. So you
  1395. 54:21don't have you should not have to click
  1396. 54:23save again.
  1397. 54:25But now, to find the alerts, you want to
  1398. 54:26go up here to the upper right corner
  1399. 54:28where it says alerts right here.
  1400. 54:30And as you [clears throat] can see, your
  1401. 54:31alert should be
  1402. 54:33right here. You can double click on it
  1403. 54:36and you can see here that the alert
  1404. 54:39should be active. You can also see here
  1405. 54:41on notifications
  1406. 54:43that we asked it to send notifications
  1407. 54:47to both app and email.
  1408. 54:49And if you're wondering, you know, what
  1409. 54:50email does it go to, I'm pretty sure it
  1410. 54:52automatically goes to the email you used
  1411. 54:55when you created your TradingView
  1412. 54:57account. So now,
  1413. 54:59you basically have a bot that will
  1414. 55:02automatically
  1415. 55:03send you notifications every time you
  1416. 55:05need to buy or sell. So, this right here
  1417. 55:08is uh you know uh
  1418. 55:09yeah, this right here is now a bot. Uh
  1419. 55:13the only it's not fully automated
  1420. 55:15because it's still you that are taking
  1421. 55:18the final action of buying and selling,
  1422. 55:20but as I mentioned earlier, I think this
  1423. 55:21is a very good sort of uh safety step in
  1424. 55:24this process, especially if you are new
  1425. 55:27to uh trading bots.
  1426. 55:29All right, so now it's time to take a
  1427. 55:31look at you know some very important
  1428. 55:33things related to risk and oversight for
  1429. 55:37your AI trading bot. So, let's take a
  1430. 55:39quick look at the oversight rules uh
  1431. 55:43oversight rules that uh basically make
  1432. 55:45sure that your bot behaves well as you
  1433. 55:48can see right here. And step number one,
  1434. 55:51as you can see on this image, is that
  1435. 55:53you are responsible.
  1436. 55:56No one else you know at the end of the
  1437. 55:58day, no one else is responsible for your
  1438. 56:01decisions, not the bot, not the
  1439. 56:04president, not me, not anyone else. At
  1440. 56:07the end of the day, you are the one that
  1441. 56:09decides to buy or sell, and that is why
  1442. 56:11I have you know built in into this
  1443. 56:13course
  1444. 56:14you know the final step that you know
  1445. 56:17the bot never actually buys and sells
  1446. 56:18for you. You are always the one that
  1447. 56:20presses uh buy or sell. So, this is a
  1448. 56:22very important like safety measure. You
  1449. 56:25are responsible.
  1450. 56:26The second thing that is very important
  1451. 56:28is that you know you should you know
  1452. 56:30Claude should never get access, direct
  1453. 56:33access to your broker login, your API
  1454. 56:37keys, or you know the order button order
  1455. 56:40button.
  1456. 56:42So, you know Claude already definitely
  1457. 56:44has the you know power and capacity to
  1458. 56:47be to fully automate your trading. It
  1459. 56:49can place buy and sell orders while you
  1460. 56:52are asleep.
  1461. 56:54But as I said, if you're taking that
  1462. 56:56step, you need to make it really sure
  1463. 56:57that first of all that your strategy
  1464. 56:59works, and secondly, as I said, you know
  1465. 57:02Claude is very very
  1466. 57:04is very very reliable nowadays, but it
  1467. 57:07still makes mistake. So, if you are
  1468. 57:09fully automating using Claude, you need
  1469. 57:11to you know, have into your calculation
  1470. 57:13that Claude can make, you know, a
  1471. 57:15complete mistakes. There's no guarantee
  1472. 57:17that Claude doesn't make mistakes. So, I
  1473. 57:20highly highly recommend to not give
  1474. 57:22Claude access direct access to
  1475. 57:25you know, you know, anywhere where it
  1476. 57:27can actually buy or sell.
  1477. 57:29So, that is the important step number
  1478. 57:33two right here.
  1479. 57:35The next thing is that you know,
  1480. 57:37definitely make sure to you know, pause
  1481. 57:39the bot if its drawdown gets bigger than
  1482. 57:43the
  1483. 57:43backtest worst drawdown because that is
  1484. 57:46a that is a you know, indication that
  1485. 57:48you know, maybe we did something wrong
  1486. 57:50with the backtest or maybe you know, the
  1487. 57:54you know, this strategy performed well
  1488. 57:55in the past but maybe something have
  1489. 57:57changed about the market. You know,
  1490. 57:59maybe the market is much volatile
  1491. 58:02nowadays.
  1492. 58:04And that makes the strategy, you know,
  1493. 58:05not really work as intended. So, I would
  1494. 58:08recommend that if it gets especially if
  1495. 58:11the backtest if it gets, you know, much
  1496. 58:13worse than the backtest worst drawdown,
  1497. 58:15that is definitely a warning sign that
  1498. 58:17we should, you know, pause the bot and
  1499. 58:19reassess it.
  1500. 58:20Um
  1501. 58:22and another thing that you want to do is
  1502. 58:24that you want to renew the alerts before
  1503. 58:26they expire. So, on standard plans after
  1504. 58:30around two month months
  1505. 58:32the alerts expire. So, make sure to
  1506. 58:35review them.
  1507. 58:38And as I said, to make this workflow,
  1508. 58:39you know, work as well as possible, I do
  1509. 58:41recommend you know, trading the premium
  1510. 58:44or even higher.
  1511. 58:46Uh and as I said, I do have a special
  1512. 58:48link for trading the premium. It will be
  1513. 58:51in the description as well as the pinned
  1514. 58:53comment. But all right guys. So, this
  1515. 58:56course is actually, as you can see, it's
  1516. 58:58getting pretty long but we have covered
  1517. 59:01everything. If you made it all the way
  1518. 59:04till the end here, I first of all want
  1519. 59:06to you know, thank you all so much for
  1520. 59:09watching.
  1521. 59:10By now, you actually know, which is you
  1522. 59:13know, pretty impressive. You know how to
  1523. 59:15build a trading bot from start to
  1524. 59:18finish. No coding. You know how to build
  1525. 59:21a trading bot. I hope that is amazing.
  1526. 59:24If you are you know happy with the
  1527. 59:25course and feel like you learned
  1528. 59:27anything new, the absolutely best way to
  1529. 59:30you know support me, support the channel
  1530. 59:32and show your appreciation is to drop a
  1531. 59:35like.
  1532. 59:37Another thing I want to mention is that
  1533. 59:39you know
  1534. 59:40as I think I mentioned earlier in the
  1535. 59:42course,
  1536. 59:44I have made a complete study guide with
  1537. 59:47all the prompts from this course so you
  1538. 59:49can follow along exactly and lots of
  1539. 59:51bonus material and so on and so on. I
  1540. 59:54have made that study guide. It's a PDF
  1541. 59:56file. It's available for all our YouTube
  1542. 59:59channel members, gold and higher. If you
  1543. 1:00:02didn't know, we have an amazing
  1544. 1:00:03community right here on YouTube where I
  1545. 1:00:05share you know bonus material like that
  1546. 1:00:08guide. I also have things like you know
  1547. 1:00:10my own created TradingView indicators. I
  1548. 1:00:13have exclusive videos and much much
  1549. 1:00:16more. So if you did enjoy this video and
  1550. 1:00:17want to get more and support the channel
  1551. 1:00:20at the same time, please consider
  1552. 1:00:22becoming a channel member by clicking
  1553. 1:00:24join down below.
  1554. 1:00:26After clicking join, I have a little
  1555. 1:00:27video where I explain the membership. So
  1556. 1:00:29if you want to do that, that would be
  1557. 1:00:30awesome. And also guys, if you yeah if
  1558. 1:00:33you made it all the way here, please
  1559. 1:00:35comment down below and write full
  1560. 1:00:38course. That is a good way for me to
  1561. 1:00:40understand that okay this is someone
  1562. 1:00:42that actually watched the full course.
  1563. 1:00:43I'm very I'm much more likely to answer
  1564. 1:00:46comments from you guys.
  1565. 1:00:49And it's also a good way to kind of
  1566. 1:00:51confuse the rest of the audience a
  1567. 1:00:53little bit. They tend to you know be a
  1568. 1:00:55little bit confused when there's so many
  1569. 1:00:56full course comments. So that is
  1570. 1:00:59awesome. And of course, if you have any
  1571. 1:01:00questions or you know feedback, let me
  1572. 1:01:02know down in the comments below.
  1573. 1:01:06But yeah guys, I hope you enjoyed this
  1574. 1:01:07course and for now take care.
  1575. 1:01:10All right, so now when you know how to
  1576. 1:01:12build an AI trading bot, you might be
  1577. 1:01:14interested in how you can use this cloud
  1578. 1:01:17and TradingView connection to do other
  1579. 1:01:20kinds of technical analysis. To do that,
  1580. 1:01:23I highly recommend to watch my full
  1581. 1:01:25course on how to use TradingView and
  1582. 1:01:27cloud together.

About this transcript

This page contains the full transcript of MASTER AI Trading Bots in 61 Minutes (Claude + TradingView) by Mind Math Money, generated from the public captions YouTube serves with the video. The transcript has 10,848 words across 1,582 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.