Full transcript of “How I Built A Technical Analyst AI Agent in n8n With No Code”. Click a timestamp to open the video at that moment. Need another video? Use the YouTube transcript generator.
0:00 okay we have our AI agent right here ready to go waiting for an event in telegram so we're going to send off this text that asks it to analyze Apple it's going to send that stock ticker to this tool that we created in nadn called get chart this tool basically takes the ticker it gets us a chart with technical indicators on it and then it creates a brief analysis and then it sends that back to the agent to use anthropic 3.5 to actually make that analysis a little more in-depth and so right now it's creating that we saw that that we already got the chart back in our telegram right here and then the analysis is also going to be sent to us in telegram right here we just got that back as you can see it's pretty in depth it basically breaks down Candlestick analysis current Trend the chart shows a downward Trend highlighted by recent consecutive red candlesticks goes into a little more detail about the patterns doesn't appear to be any strong reverse reversal Candlestick patterns like a
0:46 hammer or dogee currently visible then it breaks down the macd talks about the signal line talks about the histogram then it goes into volume and finally support and resistance levels key support is seen around the 220 area where previous price consolidations have occurred and then the recent High Resistance near 260 is a significant resistance level as you can see up here um so that's super cool and then finally it gives us some key takeaways and interpretation um we've got a bearish trend apple is currently in a short-term bearish Trend the consecutive red candlesticks and lack of reversal pattern suggests that this downward momentum might continue in the near term we've got macd confirmation the macd indicator confirms the bearish sentiment we've got volume key price levels no immediate reversal signals price action and then finally it goes into it's important to note that this analysis
1:31 provides a snapshot of current market conditions but shouldn't be considered as Financial advice um this isn't really a financial adviser it's more of just giving a brief um financial analysis as well as a technical analysis on whatever stock you enter in there so I know I went over that feedback or sorry the analysis really really quick um we got the picture back we got our analysis but this was kind of just a quick demo before we really break into how you can build this out in your own and it in before we get into the breakdown of this build I wanted to say that you're able to download this workflow for free if you'd like to all you have to do is join my free school Community the link is down in the description once you get in there you'll go to YouTube resources you'll click on the post associated with this video and then you'll see you'll be able to download the workflow right here um back in NN you'll you'll click on these three dots and click import from file and then this will pop up on your
2:17 screen and you'll have it ready to go if you're looking to take your skills with nadn a little farther and you'd like a more Hands-On approach feel free to check out my paid Community the link for that also down in the description as you can see we've got a great community of other people who are also dedicated towards learning more about nen we've got a great classroom section as well as a calendar with five live calls per week so I'd love to see you guys in these calls and finally if you're looking for AI consulting services or you want me and my team to help you guys deliver a certain project then please book in a call using my website the link for that also down in the description but anyways let's get into the breakdown of this build okay so as far as the actual agent itself super super simple build we've only got one tool which is the one that we created called get chart where we'll break that down after we talk about this initial agent but what's going on in here is we're communicating it with this agent through telegram so if I click into this trigger you can see that it's
3:02 going to be on message received and all you need to get out of here is the telegram chat ID because when you're able to um link that ID to your window buffer memory you can see we we use that right here as well as um when we're actually sending information back both here and in the other workflow when we're sending that photo back into our telegram you need to reference that chat ID so that the um node knows what you know where to send this actual information so that's all we're doing as far as communication we're using um anthropic 3.5 um claw for this case because I think that it does a lot better job um actually creating like detailed analysis content creation the way that it formats and word stuff I think that it's a lot better so that's why we're using it here and then finally we just have the tool called get chart and as far as the actual prompting goes
3:48 within git chart we told it to call this tool to get an analysis of a requested stock the URL that is output from this tool must be returned in a markdown format and this is just because if you want to um if you want to chat with this thing in any nend you need that markdown format for it to actually come through as an image rather than just the URL of the file that we're looking at but in this case we're just doing telegram so we can put the URL in but just keep in mind based on how you want the photo to be sent from NN to something else based on that Medium you're going to have to play around with the way the URL comes through so then as far as prompting within the agent to actually get it to use get chart um very high level um we pretty much told it what its role was understanding Financial topics and it has the ability to get technical analysis using the git chart function we gave it some context some instructions
4:33 the tool it only has one tool called git chart um and as you can see I gave it a few examples and some standard operating procedures but it's pretty simple in in this case because it's um you know pretty much only using that one tool but if you want to take a deeper look at that prompt then feel free to download this template like I said it's in my free school Community but now let's look at that get and analyze chart workflow like I said this is where the magic really happens um one one quick tip I wanted to point out out is let's say You're Building A workflow that's going to be called by an agent what you can do is you don't have to call it every time to test it you could actually pin your data in here so for the example we sent through apple and so I could come in here and I could just set the query to be apple that way if I wanted to test this workflow I could just hit test workflow and not have to go into the actual agent and chat with it so that
5:19 might just save you some time down the road but let's go into the execution we just ran and then we will break it down in more detail but let's go over just a high level approach of what's going on in this workflow real quick so we come in through here and we get the query of apple and I know this is the data that was pinned but this is live data coming through um and so this is just because we prompted the agent to say when you're sending information to um the git chart tool you're only going to be sending over the ticker and so it's able to understand what that means rather than sending over a whole query that says can you analyze Apple it just sent over Apple from there we wanted to set the actual ticker um this was just more to keep things visually appealing and um organized in my mind as far as like like visually seeing what each step is doing but all we're doing is we're taking the Json query that's coming in and just
6:04 setting it to a an output field called ticker so from there we are doing two HTTP requests the first one is going to be a post request to um an API called chart image and it's going to be free I'll show you guys how to set it up but um we're going to be sending off that post request based on the type of chart we want and sort of like the the ticker that's being put in so if we click into here we can see um you know we've got a post request we've got this endpoint we've had to set up our credentials and the content type of course and then we actually send over the the body parameters of this Json um within our post request you can see we've got stuff like the theme um the interval the actual symbol and so this is the only thing that's changing every time we're sending this request is the symbol you can see that we're putting in the exchange which is NASDAQ colon Json
6:52 ticker and so in this case the Json ticker was Apple um and so that's just going to change every time but then everything else is going to stay consistent as you can see and once again I'll show you guys how you can set this up without having to know pretty much anything about like Json or coding anything like that it's going to be really simple finally we're just getting this response as Json because we want this URL this is what we're looking for here if we kept this response to be a file format it it's going to come back as binary and once again I'll show you guys all this but if it comes back as binary then we can't actually reference this URL um so we want to get first of all the URL in Json and then we can take that Json into this next HTTP which is going to be a git we're downloading the URL and then you can see we're getting the chart back right here and then now that we have it
7:37 in binary as you can see up here in this top right we're able to feed the binary into this open AI analyze and image node pretty much I told it its role um financial analyst specializing in technical analysis of stock charts your rle is to analyze Financial charts provided to you offering comprehensive insights and Technical aspects Candlestick patterns macd volume sentiment um I go into a little more detail here once again I mean I use gbt 40 to help me write this prompt but all it's going to do is look at the image generate um kind of a brief technical analysis that it's going to send over um and then when the agent actually gets it the agent makes a better one using anthropic but then in here all we're doing is we're grabbing that URL once again sending it to our telegram with that chat ID that I mentioned earlier and then finally the response um so this is the actual
8:23 response that we get from this tool and as you can see this is a bit shorter than the analysis we got here in telegram which was um as you can see a lot more long a lot more in-depth and so this is what the agent gets and it takes this to make a a more in-depth analysis but at a high level that's what's going on here so now let's talk about how do we actually set up these post requests or sorry the one post request and the one get request because really that's the most difficult part of this workflow and still even that is not too difficult so you're going to go to um chart image.com and this is what it will look like um like I said you can get a free API key and then you're going to click on API documentation ation so from here it's going to look maybe a little confusing and overwhelming but we're going to break it down it's really not too difficult what we're going to do is click on base API endpoint and so from
9:09 here we understand that this is the endpoint we need to access and then we can change the parameters off the end based on the type of chart all that kind of stuff but just remember it's going to be https colon api. chart image.com hopefully it helped that I read that out loud rather than just letting you guys read it but anyways um so you can see there's different ways we need to authenticate we need to see in this request that we have access to get to this service to create a chart for us so there's authorization Bearer or there's going to be X API key um and so the way that I'm going to show you guys how we can do this it's going to be a lot easier than trying to read through these docs and understand what you need to set up where because that could be very confusing so we're going to click on trading view snapshot V2 and in here we can see it's similar things this is going to be the end point after that base URL that we need to access um and this this is just
9:55 showing if you want to kind of do it manually different parameters you can put in your header or your body but on the right let's just look at this cuz it's more a little more natural um we've got different types of charts that we can do so um as you can see these these candlesticks here's the macd the example that I just did in um the demo but let's say we wanted to do this chart all we would do is we'd have to see the request example so we could copy this right here because it's a curl and then we can go back into this workflow let's say we're creating an HTTP request import curl paste the curl command in there and then we just want to get rid of this top line that it's just an extra comment but then we can import it and you'll see it change to post it created this URL um endpoint automatically it set up our headers so all we'd have to do here is enter in our API key and then it already sets up the Json um body and everything
10:42 like that so let me import my API key real quick okay so there's my API key we'll hit test step and then we should get a binary file back because that's just by default how this one was set up so as you can see we got this file and we get this Bitcoin chart in here because um we Ed the curl so it's just kind of the default request so now let's say we want to change things up um I'm going to go and do the the example of the one that I did um in the actual demo of this video so we're going to copy this one which relates to this chart we're going to go back into here and import curl once again paste that in there get rid of this Top Line and then import it and so as you can see every um a few things have changed um once again we need to put in the API key so let me put that in there and then now we have this is the place where we can see the actual parameters um I don't know why this isn't loading up but now we can see the
11:28 actual parameters of what's going on in this request and this is where we want to change the actual ticker that's going to dynamically come in right now it's set for Microsoft we've got other parameters of course so we're going to leave it as is for now and now you can see that we have if we were to test this it would come back once again as binary so let me show you we'll hit test step it's going to come back as binary and we don't want this because we need to access that URL so this isn't good what we want to do is change this to Json but one thing that we're going to have to set up in the headers is that the content type is Json because I think by default the content type is sort of an image a binary image so if we hit test step we would see that this may come back with an error okay so response body is not valid Json change respon format response format to text so I think you would
12:13 think that it's talking about this but what I believe is that we need to set up the the header to actually say that hey this is going to come through as um application Json so we're going to grab another header right here which is content-type paste that in there and then we're going to grab application Json rather than coming through as an image like a PNG or a JPEG so we're going to paste that in there and then hit test step once again now I really I hope this should work okay maybe we need to change it to text let's try that oops um no see if we do this I think it's going to come back as um binary still perhaps let's see okay yeah so we didn't get we got this this gibberish back okay so I figured out what it was um what we need
12:58 to do is we need to save the chart to storage because then we're able to actually access that URL so at the end of our endpoint we just want to add Dash storage um right up here or not Dash storage SL storage and then we'll change this back to Json because that's the way we want it to come back now that we've set up application Json we should be able to get this um URL back there we go so this is the URL we're looking for and now from here what we would do is add another HTTP request it's going to be a get and all we have to do is drag in the URL right here and that's all we have to configure now it's going to get this URL and it will be able to um bring us this binary image that we can now View and then from there we would just feed that into the open aai um analyze image node so in here we would just have to make sure that we're saying it's going to be
13:44 a binary file because that's the way that it's leaving this node right if we clicked on table or you know Json or schema we're not going to see the file we're just seeing URL but in binary we can actually access and view this binary image so that's what we would do in here um it's called Data so make sure you name it data analyzing image I chose 40 just because we're analyzing an image so I I wanted to go with the the most powerful model and then I just turned off simplify and I set the detail to Auto um and then from there it's pretty simple it's just going to read in the file look at it scan it make an analysis and then push it off and if you want to look at this prompt of course um it's going to be put in the workflow you can download for free and then all we have to do is send the chart which we're accessing the
14:29 um the URL that we got from the git chart URL node so this node that downloads the original file um URL or sorry that gets us that file URL we're just putting that back in here and then finally we are sending the response over to the agent so we're calling a field response we're setting it to the name response and then we're sending in the actual output from the technical analysis openai node so whatever this node outputs is what's going to be sent to the agent so if we go to um back to an execution we'll look at the most recent one or no we'll look at this one because these were little tests but we can see that um in here we have different things come through but what we want is choices. content and this is the actual analysis
15:16 that it came up with so in the response we're referencing item. json. choices. message. content and you can see this is the response we get and this should align with um the response that we got from the actual the tool in the agent section so the agent sees that response and then it uses its brain to um you know format the response even better so we click into the agent we can click on logs and we'll see exactly what happens so first it updates the window buffer memory then it uses its model to read through the prompt understand what it needs to do as you can see um kind of a long prompt and then it says certainly I'll analyze the latest chart for Apple Inc and then it takes the ticker of Apple for you let me generate that chart and provide you with a comprehensive analysis and the input for the next node which is git chart is going to be just
16:02 Apple just the ticker so you can see the query that was sent over to this tool was just apple and then it got the response from um the end of the the workflow which was this which we had just looked at and then it sends that response back to the anthropic chat model reads through its system prompt again and here is where it created the the larger um more in-depth analysis right here so this is what we ended up getting in our telegram because we referenced the actual message in telegram to be json. output which is the output from the AI agent as you can see if we go to schema we got the output right here from the agent and that's what we dragged in right here okay so I know I went through that one pretty fast but like I said you're able to download the workflow for free so hopefully you can get in there and play around with it and see um you know how everything is working if you
16:48 enjoy this one and it helps you out in some way you learned something new please give it a like definitely helps me out a lot and I always really appreciate it but thanks for making it to the end of this video I will see you guys in the next one