 And this is a talk about using Python to predict the reversal in a price of anything a stock Bitcoin gold whatever dollars and And to talk a little bit about trading and how I use pipe to do that Okay, so we're short in time. I'll rush at it. So the goal of trading any guesses Make money profit this guy get this guy a job man And what can you trade anything anyone's willing to buy use toilet paper if there was a market? And anyone will buy it and you could sell it anything you can trade anything where a transaction can happen Anything where buyers and sellers can meet and that is really one of the problems that Has infested the minds of people these days. They think that something actually has a value That is independent of what someone just sold it for so anyone who knows anything about Bitcoin would know It's fairly crippled in the face of a couple of face rate hikes And it's prices way down around 20,000 right just under 20,000 as we speak And that's because the only people willing to buy it are only willing to give that much for it And the people who are selling it are willing to let go of it for that much It doesn't do anything. It doesn't produce anything. It's just you know The guy after you is going to buy it for whatever so buyers and sellers determine price and the history of price is the trend And the trend is your friend and so let's take a look at the trend real quick like I said This is Twitter eight-year price trend IPO at forty four dollars currently. I think it's a thirty two dollars a day, but it's around thirty three was thirty three yesterday and Dorsey's departure curiously at the top Elon's activity curiously near the low and What this tells you is a the price transaction history for Twitter and it isn't actually a bar line graph It's a candlestick graph and if anyone knows about candlesticks it charts the open low The high and the close price of the of the of the acid in that time block So you're looking at a daily chart each line each vertical line candle represents a day in that chart And and some people try to do this stuff with only clothes and price It doesn't work you need all you need all five elements to do it So the candlestick chart as you see here This is another daily chart and each one of those blocks on that chart represent the price action in that day for that asset Overall, it's going up, but you can see it's up and down in the day. The volume is across the bottom That's open high lows, clothe and volume five data points needed before you even think about machine learning Anyone who wants to get a machine learning library and do clothes and price good luck losing money and These the breakdown of the candles like I said green ones are bullish They mean the price went up red ones are bearish the price went down open on the just move away from the mic So that tells you a lot in a day about what's happening a candle with a narrow body and tall wicks as we call it Very volatile day candle with a huge body tiny wicks. You know very steady move up So price is not a thing bestowed on a stock like we said Twitter IPO 44 today down 33 down 25% What a loser, but the price varied a lot in between every price is a recorded settlement between buyer and seller. So two people were thinking Exactly the opposite The buyer was convinced. It was the right thing to buy and the seller was thank God. I got the cell Every transaction a seller has all floated onto somebody Every time remember that really like it is it is really human sentiment And we'll get a little bit into the fight the fundamentals of Twitter, but I'm 25% Down not really over 1100% of price movement if you knew where the reversals were You put down a thousand dollars in that you have 1.1 million if you knew Where the price would move or potentially where it could so Python for me It's amazingly handy language to work with I find a very to the point find a very easy to do maths and dissect Tabular data and Python and so I realized I wanted to find these reversal zones I wanted to analyze the trend Python and a Raspberry Pi coincidentally was a thing for me and 1100% of something I'm very interested in I mean, I don't know who's not Right, so predict the future predict the price reversal you can't actually predict When it's gonna reverse notice I have little arrows on the peaks and the bottoms there right you can only tell that after it happened So the real trick is to know when it might happen That's the difference with machine learning approach and actually trying to use levels and price action so This is a stock, you know, I use they I man I got the closing price and I nailed it and look at the yellow line It's brilliant except it's after the price. It's lagging it There's no point in knowing I mean it's Admiral I mean this is great like you know the machine can follow But it can't tell you what's gonna happen. It's it's a it's a It happens in magical lock, you know the trick is done earlier on and then at the point where the trick is revealed People think it just happened and it didn't it was a setup and with stocks The reversal can only be identified after you've pivoted and moved away significantly Here's another one. Here's the deuter huge fallacy. I sell in the red. I buy in the green How did you know the red was a peak until after the peak? When it's too late to sell I mean like it's very simple. This is a day The next day it's down Did can you sell the next thing you go back and say here? I said it for $50 more than this today because I figured out yesterday was worth more What you can't do that, right? So it's a really tricky problem with trading because Often people look back and what they should have done is what gets in on your mind and so it's a tricky day Captain Heinz say man. I've only had a dumb one. I thought yesterday. I would be rich today But you're not real financial advice. Nobody can predict the future. That's the first real financial advice I'd give you working in banking a long time. I used to think that the people in the business You stuff, you know and that people in technology didn't and then I learned this and the people in the business don't know either They're weird isn't it so no one could predict the future no one can predict it But you can locate a low-risk entry for a trade where you want to buy but you can still lose you have to The strongest organ you need to trade is your stomach not your brain Okay, your brain is good to figure out when you want to get in your stomach is good to keep you in there Holding is not a strategy. You've got to sell out as well. Okay, anyone who held Bitcoin from 64 down to now Sawie It's just not worth it really, you know, it was worth it when it was three times the price and So strategy get it right. So let's look at Twitter again for a second. There is a theory Based on Fibonacci numbers that prices reverse the Fibonacci levels Sounds stupid does it? Fibonacci why would it be important right? Well, let's just look at this chart for a second before we do a little experiment Twitter from the high to the low in retrace and extended 2.618 times the downtrend. The downtrend was 100% move, let's say a move of 40 miles 1 to 540 by 2.618 You get 80, 90 something. That's how much are you going to move back up? And it did reverse hop on the line, which is you know where we set the new level And we worked it down to the bottom, you know the next big major move down That's why these arrows these points are in orange. I can't trade them because I'm still in the downtrend It's difficult. But when you spot a bottom and a second touch the bottom Meaning that buyers Have orders in the book and absolutely will not allow the price to go any lower They're willing to soak it up 12 bucks as hard as possible And a third time confirmation That is a bottom and lonely hold it will pull back when it hits the first retracement level It will pull back and find support. It will pull back that line It went over the line there fair enough. It doesn't always work out Hit the line, hit the line, hit the line, hit the line, hit the line, hit the line, hit the line, hit the line, hit hit hit because Bots understand what people don't understand about themselves. So let's do an experiment and Fibonacci may I have Eight volunteers real quick Can I just grab five of you people here? Can you stand and build? You're famous! You're famous! Come on man stand up! You're famous! This is awesome! We got the wolf of Wall Street, the lion of Wall Street, the tiger, the bear and the master of Wall Street, right? So, first of all, you're going to buy Microsoft, right? I want you to walk over there and buy it. All right, buy Microsoft? What's he doing? He's just buying. Why? Because you should be buying. You want it? It's a lie. You want it? You want to take a chance? What, you buy it? I'll buy it. I'll buy it. It's two gone over. Do you want to buy? What the hell do them two know that we don't know? Maybe they know. What if we miss out? Do you want to buy? Yeah. You buy. That's three. Do you want to buy? I don't know. I don't know enough about it. I want to buy. It's for you. Do you want to buy? No, I think it's over and bought. It's a good experiment, right? Thank you. What happened there was, and this happened on a trading floor in the 30s, one guy puts his hand up and says, Yeah, give me gold. And the other guy goes, what does he know that I don't? Panic. Fear. Should I buy a house? Should I buy a car? Should I take fear? If I don't do it, what happens if I don't do it? Fear. FOMO. Fear missing out. Right? It's real. We do it all the time. What if I leave my wife but I don't find someone else? You know, it's fear. What if I'm stuck here and it should be somewhere else? Western psychology. There's something better out there. What if we don't get it? When one guy bought, it didn't take long for the second guy. They had their hand up. Someone else had a reflex. It can become a thing in a trader. You spot the level, you've got to go in. I place a stop order and manage the loss, but I've got to get in. If I'm not in, I can't win. When three go, two more usually walk over. That's five. These are all the Fibonacci numbers. One, two, three, five, eight Fibonacci numbers. Of the first eight numbers, five are Fibonacci three or not. Fibonacci three themselves are Fibonacci quantities. It doesn't seem like it. I know it doesn't, you know. But most of nature is skewed towards this pattern of numbers, and we are hard-coded to be able to easily tell the difference between five and three more easily than four and four. Flock of birds in the air, hawk comes down. What level is it split at? Five to three, 13 to 21, 34 to 21. Fibonacci numbers, animals do it, swarms do it. Anyone do agile development? Your story points, you divide your current story point into your previous story point. Five is 0.618 of eight. Eight is 1.618 times bigger than five. Toyota figured this out when they were doing lean. OK, 1.618 means it's a bit too much. One means I'm OK. 0.618 means it's easy. Give me one more. So if your team's average is eight story points, it doesn't matter. Don't make your company do everything five. Eight is OK. Divide eight into every estimate you do, and you'll get 1.618, 1 or 618. And if it's really out of whack, you'll either get 0.3 or 2 or 2.618. All the Fibonacci numbers, all the levels, all the retracement levels, we do it all the time, we don't realize it. It's everywhere. It's in DNA, it's in nature, it's everywhere. It's the spiral, it's in flowers. Once you see it, you can't ever not see it. It's ridiculous. Facial structure. That's how we do face recognition. Really precisely and quickly and easy. We just measure the Fibonacci deviations. We've got you. A couple of numbers done. Nothing, no secrets. So now when you look back at Twitter, there are certain patterns that happen at this level. And we're very interested in A, B and C. XAB, ABC, BCD. Five point patterns, harmonics. Four point patterns, just ABCDs. We're always interested in how far you jump up and how far you pull it back. That tells us how aggressively people wanted to buy when they kind of cooled off for a bit. When they fell back and went back in again, over and back, that's how we tell. So the first pattern in the green one is what we call a crab. The second green one in the middle is called a gargly. There's another one called a bat. They're all just slang names we give to represent the levels, okay? But the important one is that where the pattern finishes, do you see how the price jumps up immediately? Pattern completion zone, price reversal zone. Reaction, consolidation, buying of Twitter, orders getting filled. People running out of orders to fill. Guys who wanted to buy and having to move their limit order up a bit. You know, price might come back low the next time and you need to soak it all up off those centers. Lower highs, lower highs, boom. Total success, target reached. Pulls back a bit. I can almost tell you right now, that is a 50% retracer near to it, 6.17. Another Fibonacci number, famous part of a gargly pattern. Well, like from Twitter's ultimate low price, it's half a drop, but from the low here, it's 6.187, it's 6.18. Comes down again, massive reaction off the second one. When your type one reaction return, type two reaction retrace lands on a pattern. You get a massive spoof off again. That's even another M pattern there in reaction. It just keeps going on and it's not down to there's something hidden in the numbers at a price. It's us. That's how we react. We only understand when we go too hard at it that we've gone too hard. And when we pull back too much, we only understand that, you know, we pull back too much. Happens with Netflix. Totally called that. Stop showing the Star Trek early. You deserve what you get. Really great show. And yeah, they did. I called it seven months ago, actually, when it was way up here. I thought it was going to go all the way down there from $300 down to $170. It was painted all over. It was painful to watch it go down and watch people throw money at it. I don't want to say I told a soap, but I totally told a soap. Anyway, back to the patterns. They're for memory if you want what you're looking for, right? You know the price trend. You know the patterns. You know about Fibonacci. You know what you want. You have a better chance than 50-50 of predicting a reversal now. And all you need is 50-50, believe it or not. If you place a $1,000 bet and you are willing to stop loss, which hundlers never do, you're willing to stop your losses if the value of your position goes less than 1%, but you're willing to take profit if it goes up to 3%. Even if you lose half the time, you're up 100 bucks. Your losses are 10, but your wings are three times that. Five wings is 150. Five losses is 50 against you. You're up 100. You can only win three times out of 10 and you make 20 bucks after every 10 trades. Jesus, if you just get a bot to do that and you're only splitting coins, I mean, you've won already. What about when you know where it's going to reverse? How many times do you think your odds can increase then? This is really important. ABCD retraces last bit of information before we unleash the python. When you come down on this part on the V of the M, and you want to check this out on the top of the NASDAQ and the top of Bitcoin, the reciprocal, 1 divided by 894, it gives a number. 1.1186 is your base number. You're going to multiply that by Fibonacci, 1.13, Fibonacci, 1.27, 1.4141618, 22618. It'll give you all these levels down here. Watch the price. React on the line. Support, fall below it. Resistance. Support, resistance. Support, support, resistance. Like it's bouncing between these levels. It's no coincidence that that's happening. Bots on the market trade aggressively on Fibonacci. There were a small vision upon and we're not a big whale and we're not bots. But we understand human beings and human beings who know this millions of programs bots understand human beings. So we know where to expect price reversals. Twitter's never reached that price, but that's really important. It's really important that the ABC suggests that that's a price. Twitter's price earnings ratio, a bit of fundamental, is 145. It means you buy the stock and you collect dividends every quarter. You need to hold it for 145 years to get your money back. Tesla's 1,077 at its peak. 703 now. That's how you know something's overvalued. Investors like it between 15 and zero. If it's 15, it means after seven and a half years, if you're throwing a thousand dollars, you get 500 back and profit. You made half your money back. Investors love that. When things get to that level, investors jump in. Because that's better than bonds or anything else. Forex or anything like that. So Twitter was $44 in March 22nd when they announced their earnings and their P's 145. If you divide the P again to get it back down to a reasonable level, the price in theory should go to 440. What did the ABCD tell you? 433. Investors already know what Twitter is worth. It's not worth a lot. It isn't really. It's a small company. It does a fantastic thing, but it's a small head count. Technically, there's a very specific thing in targeted ads. So we know the price is going to head that direction ultimately. I think it's figured this out. That's why he's backing out of that deal. Twitter would really want to fall 10 times in value. It's worth about four and a half billion of a company, I think. Sounds not like that, but most of the accounts and most of the activity in Twitter took off when Donald Trump took office. And people really loved to fight all the time. So no coincidence. Price follows us. We follow price. We create supply and demand. There you go. So that's our strategy. That's Twitter. There we go. That's where the price is probably headed. Goals. Got the concept. You know about Fibonacci. We have the data. Open, low, high, close. We know where to get it. We have Python. Place the bets. Xenos open. 24-7. What do you need to know? Like I said, you want to pull five columns of data for every price trend. The library will look at it in GitHub. It's all there for you. But what you want to do is more important, the code right now, just in your head. You want to get the open, low, high, close. You want to scan from Fibonacci, price levels and reversal zones. Humans think that way. Five works that way. Pots can follow five. Everybody feeling five. Time to five. No time to five. Get the data. Not the jokes. Okay, right. So the candlestick data. The codes. In the library, it's up in GitHub. You can totally grab it. You can do what you want to it. I'll just give you a quick run-through. Clearly, I have cloned it down into a folder. I've CC it into it. I've activated a virtual environment I used. The requirements.txt file is on the GitHub page. So you can import Binance and a plotter for yourself. Binance have API keys if you do have an account and you want to use a bot to trade on your own money. You just want to read only publicly. Don't put any of those keys in. B equals Binance, you've got your object. Get the ticker for BTC, USDT, the one-hour candles. Each candle represents one hour of time. We want a thousand ticks. They give you a bit more of the open and high-low close there. But that's okay. I convert the epoch into a daytime for the index. It's easy internally for what I do. And you can plot the thing. And you get that with all the peaks and my library automatically adds your indicators, your RSI, Strength of Price, MACD, Moving Average Convergence Divergence and MFI. Basically an RSI will file you include it. So there's a bit too many peaks in there to scan. So you can do things like limit the number of peaks by doing peak spacing, re-plot and you get something a little more manageable like that. How do I find the peaks? If anyone's curious, it's Aragrel Xtrema in the SciPy library. You run it on the highs. You run it on the lows. You need to find the peaks on the highs and the peaks on the lows. You can't use close price only for this. It won't work. Those candle wicks touch the Fibonacci levels. Sometimes they don't stay there long. They're gone. The reverses can be aggressive. So you've got to use the peaks. I have some code there. I noticed Aragrel Xtrema. Two peaks are right beside each other. A tweezer top formation. They tend to identify two dots. Some other useful information. I want the highs and lows not in separate arrays. I want the in arrays within that. I want to know which one is high and low as I walk through and figure out which part of the Fibonacci level it is. Because it's more than just close price. If you want to plot it, just a little sample of code there. Plotly is a brilliant library. After you do the OHLC plot, you can do a scatter plot and throw some lines and things on it. Here's an example of that in the code. Again, I've imported the Binance library, and from there, respect the TA package. The divergence and harmonic patterns. And the harmonic patterns, like the B object that I get that ticker data on, I just pass it into patterns and divergence. Activate the search function, just H.search or D.search. It'll throw back a load of information about the times and price levels of the patterns. And I can plot those on a graph. Lo and behold, look, every Fibonacci pattern had hit on Bitcoin in the last 1,000 hours. And you can see, because there's been a dump recently, you can see that the peak price, the top, the bullish pattern goes down for deep retraces. You get a reactant price goes up, but the bearish patterns already build them when the price goes up. It's already getting ready for the next reversal. That's how the machine sees it. So up here is a sell point. It comes down. There's another buy point. Until you get to here and complete a pattern, you're only taking a chance in here. Historically, you can say, yeah, but it's low and then it's high. Humans do that, right? But you can't tell at the time. We couldn't predict it was going to reverse there. We didn't have enough data, but here was our prediction. And by God, look at it. Now, there's another special indicator I have called overbought oversold, where I kind of do a little bit using a spike to tell you where the buy and sell. You'll see it on Twitter or anywhere where I publish these things. But there's a lot of data there. You can limit to produce just one pattern in the last, whatever, 15 minutes, one hour, one week, whatever. There's the overbought oversold indicator. See where it tells you exactly. Where the lows really are. There's a big strong sell there. There's another big buy coming back there. It's pretty good at it. The math is simple. I kind of stumbled upon it and it works, but that's no reason to trust it. Does it only work in the buy and sell? No. It's built as a command line tool. So it's a lot of parameters. They're all explained on the GitHub page and on the settings files and YAML files. But you can basically get it to pick any ticker you want and the data source with it. Just a symbol of one hour, limited 400 candles, output path for your pictures. Whether you want formed only or forming, all that stuff. I attach it to Cron jobs, stick it on a Raspberry Pi. I let it run all day. And there it is at home. Just a little cluster. I only use one in that cluster. Raspberry Pi 4s are beasts of machine. There's so much CPU power. Really, like when you're just doing something simple. And that little machine will publish to Twitter once every 24 hours. And it will publish things like this. So you can see the strength of that signal there for a reversal foolish pattern. Probably someone telling me, I'm silly. There's also a Discord which it can publish into a lot. Every 15 minutes. Every hour, every day, every week. There's different channels in here. And it will spit out live. It's been doing it all morning. And it can even talk to the bot. Still running at home. Hello. There you go. Grant. So use an async Discord library for that. So we get that back up there. Oh, wrong button. He's interfered with the lords. That bee. Up down. Bad jokes. Slow internet. There we go. Hey. There we go. Now, not financial advice. Cannot predict the future. Low risk entry. Not trading. But it's all there. It's all in Python. It's pandas, sci-pi, bit of maths, bit of Fibonacci. You don't need AI. You don't need machine learning. That's going to lag. You're thinking ahead. And really what you're doing is you're playing on the natural psychology of human beings as a pro. And there was Bitcoin called seven months ago. I know you can't predict the future. But if you're me, throw it at me. Not financial advice. Cannot predict the future. Know your enemy. Just before you do go trading. This is real financial advice. Whales, crypto cults, telegrams. I'll be honest. If I could buy, I don't know, let's say Microsoft. 20 years it would pay me back to own it. I know what the company are doing. They're selling stuff. They're earnings. They're giving out money. If I held it for ten, I'd still be up a lot. So if I construct a portfolio of companies that have good priced earnings, and they've got solid jobs, they make stuff. Maybe they mine stuff, or they do steel, or they do agriculture, I'll win over the long run on that. Bitcoin needs the price to be high, to be worth mining it. It's not worth it below 20,000. The hardware doesn't do it. So just be really weary. It's not giving you anything back to hold it. And if it goes, and as you're seeing now, most of the people are heavily leverage, which means they borrow to buy and use their coin which has gone up in value to borrow more, to buy more in the circular. I know, I saw your face going, what? Yeah, I know banks used to do in 2007. I'd like, came along and stuffed them. And, you know, that's what's happening. That's unwinding now. Snap, and it's things going to dump in the crypto space. The rest of the world is going to have trouble. But trends are history. Remember that. Fibonacci is a good guide. Python is excellent. Java's lame, and never ever is it a point. I couldn't do it in Java. I really tried. I was like, good to do in a rave. First of all, I fell up listening. Final thoughts, is Fibonacci really everywhere? Yeah. There's the S&P cycle breaking down. There's the previous bull run and this bull run. There's a NASDAQ, the dot com boom and bust. We're heading for a very severely set in that space. And there's a carbon dioxide, which is absolutely tied to global economics. 1980s crash, 1991 crash, 2000 crash, 2008 crash. Every time the market gets stronger, look at the S&P, look at the angle of the slopes. Every time we throw more money in, we go more mad. I hoover it up. The next bull run will be dead. Too much CO2. You saw the chart, right? It goes over one degree, we're screwed. It's a point in no return. Next bull run, dead. Dead bull run. You want to make money? Yeah, you'll be dead. You won't be able to spend it. You'll be dead. No, your enemy is dead. Bull run. What's he saying? He tricked us. Anyhow, there you go. I'll take any questions. That's me. Thank you. Where's the mic? We have a mic. Mic, where are you? Yeah, so use the mic if you want to ask a question. Me, too. This mic, yeah? There's the whole one in here. Cool. Cool. Okay, so I think that every strategy is like the ones that you kind of showed in the earlier are tested in reality when we gather whatever data we have up to a specific point in time, then we make our assumptions. And we, let's say, run simulated training in the past, what we consider a future. So do you have any estimations about that that you at some point in time said, okay, so this would be my strategy if I would want to trade that specific way and then simulate. Yeah. Of course, if you can and want to share it. No, no, no. My strategy is so my strategy is when I see a pattern form there will be a reaction but it depends on how eager people are to buy. So if the reaction is heavy it's hyped. And let it go. When it slows a bit it means a big player probably has 200 billion word of orders in a block at that price range. And, you know, the buyers who have rolled in behind don't have enough momentum to carry it. So when it slows a bit that's when I pay attention because we're going to get a checkback. Now when we get a checkback if it bounces there again, if that support is still there, if those 200 billion of orders are still filling up, now it's good to get onside with the whale. There's no way I can move it but there are, there's a famous story in Merrill Lynch, a commodity trader who does this stuff. He was brought down to the manager of the desk, showed him the range. This is where it'll go, sir, in the mats and the blank, you know, and the guy said yeah, amazing. The phone is, I guess, sell, you know, 200% their place and dived it, right, they dived the corn market right down, looked them in the eye and said if I can do that, anyone can do that. So just, you know, this is great when the market's healthy and we have participants. Occasionally occasionally you'll get a dump. Stop losses for us small guys, right, you know. Like I said, 90% goes more than 10% against you, okay, just walk away next scenario. In the long run you'll win. So my trading strategy is literally keep trading with the same approach, keep your numbers tight, you know, maybe only use $100 or $10, whatever you want. See the profits go up slowly over time. When you have the balance right, when it's three for one or whatever your risk reward, you will know you have the right, you know, be patient. I mean, there's 20,000 crypto currencies. There's two or three thousand stocks. Patterns hit. Like I'd have a headache if I reacted every 15 million a pattern. A bot can do it for me, but for me for the bigger, you know, macro daily, weekly timeframes, be patient and it'll come to you. Okay, so it's not like fully automated, but you get kind of hints from the stuff that you wrote and then you do final analysis. I do have a bot and he will trade it for me. It will, you know, whatever. If I didn't have a bot, I would just be patient to see the confirmation, but the bot can spot the confirmation for me as well. I'll make that public in the next release so you can see target entry confirmation. You can lose as much money as me. Thanks. We're good. Thank you very much, guys. Cheers.