Transcription
Hello friends, with you is Georgy Kharitonov. And today I will tell you how, in principle, using Rosset for free, you can write any code for your any ideas, for your any trading strategies, without knowing a programming language. And, in principle, apply them in any trading terminal that supports algorithms. But we will now consider two types of terminals with you. This is we will try to write the simplest trading strategy, and for the same strategy, I think this will be useful for everyone, this will come in handy for everyone. So, we will use Neural Network Chat GPT 4 to get free access to it. There is a website, I will leave a link in the description. We go in, you just need to have a Google account. Through a Google account, we log in. Here, you can make eight generations daily, as in Chat GPT 3. So, in principle, everything necessary is here. These free requests are updated. For those who want more requests, they can subscribe. Or, if someone has access to GPT 4, they can, in principle, use their access. So, well, let's first write the simplest strategy. For this, we go to, we choose, we will write on Rosset, ordinary moving averages. Yes, let's test how they, in principle, work in an algorithm on various instruments of the Russian market. So, we write, it uses a programming language, we write it like this: [music] write script [music] code, code of a trading strategy. Well, let's try to set such a parameter for it: when with two moving averages, when the indicator with parameter 15 crosses the moving average with parameter 30, we watch to make sure everything is correct, a long [music] position is opened from below. Well, to not waste your time, I will finish writing this now and then I will insert it so as not to take up your time. Yes, and all other open positions before it are closed. [music] positions before it are closed at market. Okay, this is the first script. Now let's write about short positions, the same thing, only when the moving average 15 crosses the 30 from top to bottom, then a short position is opened. Well, and it needs to be written that only one position is opened when closing, because there is a glitch in Chat GPT that when you don't specify this, it immediately opens about 10. Okay, we insert and press the button. We wait for it to respond, and it, in principle, immediately starts responding. Let's wait for it to tell us, show us the code. And here it is, please, the code for this trading strategy. In principle, in literally a minute, we have written a trading robot for our parameters. It is understandable that this robot is a very simple robot, but we can, in principle, generate the most complex strategies. In principle, write on paper what you want to see, right at the level, be it a breakout, for example, let's look at the low on the zigzag during a breakout, you can specify a trailing stop, anything you can specify, in principle, it implements everything. Now, if the 3.5 version implemented this poorly, with errors, then in the fourth version, in principle, all this is implemented without errors. Well, here it has written the code for us. We take this code, simply copy the code, click, go in. I, in principle, already have a ready strategy. Well, for example, let's open the Sberbank chart, go to the super chart, and here we have the strategy overview. Yes, so, the P editor. Here it is, the intersection of moving averages. Here, in principle, we have inserted the code that Chat GPT gave us, and we can add this strategy to the chart. So, now we have some kind of incomprehensible thing here. Add to chart. Everything, in principle, we have added to the chart. Naturally, on a five-minute chart, this is a complete loss. Let's open the daily charts. On the daily charts, we see that, in principle, the strategy works, and we can see on the chart where exactly the positions are opened. Here, we see the intersection of moving averages, a long position is closed and opened, and it continues. Here a short position was opened, and in principle, there was a good trend here for Sberbank. We see a position opened during the intersection for a long, and in principle, we have taken all this movement for Sberbank. Well, and you can also look at tests, for example, what will happen on an hourly chart. On an hourly chart, it's not as good. And also go through the rest, that is, for Gazprom, it's not as good as on Sberbank. The same for Nas is all good. Well, let's now try to implement this on currency for MetaTrader 4. That is, we also go back to Chat GPT 4 and insert the same [music] request, only in the request we write that we have code MQL4 for MetaTrader. Well, and also here I added the ability to specify the trade lot, so that in the bot settings, you can specify the lot. We generate the code. While it's being created, I'll drink some water. So, it's creating code for MetaTrader in MQL4 language. Very often it happens that you insert the code into the trading terminal, and the terminal writes errors during compilation. Just paste these errors into the next line of the request, and it will give you new code without errors. So, well, now it's finishing the code for moving averages for MetaTrader. Let's launch MetaTrader. God, what's happening here? This is a nightmare. So, view. And to write this code, we open, in principle, I already have this code open. I wrote it. Here it is, the code for moving averages. We open it. In principle, let's compare it with what it generated for us. Yes, in principle, it's the same. We compare. This is probably not it. Now. Yes, this is not it. This is Standard opened. Well, let's, in principle, insert what it gave us. We delete this code. Then we go to the browser, take the code it generated, insert it into the editor, and click. Where is it? Compile. It wrote some warnings. Well, let's try to save this file as. We save it with a name, replace it. Okay. We close the terminal. It needs to be restarted. We open the terminal again. So, we open a new robot here, which we rewrote, that is, Euro-Dollar. Let's not test this for long, let's set it for 2014. We look at the expert properties. You can set the lot size. You can set the starting sum. And we click start. We can even watch visually. Now, visualization start. We watch. So, what's happening? Nothing is happening. Let's quickly run it without visualization. We see if it opens trades. Yes, it opens trades. Well, let's try with visualization. Let's see how it will look. Let's do it on an hourly test for speed. [music] We wait. Well, here it is, it closes trades and opens new ones. It told me incorrectly. These errors that the editor gave during compilation, we just take them, highlight them, click copy. Then we go back to GPT and write: "during compilation, there are errors." And paste these errors here. In principle, this name of the robot itself is better to delete, because so that it doesn't interfere. Well, you can leave it, you can delete it, but it's better to delete it to avoid confusion. Okay, and we launch. We wait. So, well, it's doing something there, some requests. Let's look. Wait while the request is going. Let's see what's wrong here. Yes, everything seems to be okay. God, why is everything crashing? So, well, it's messing up something in MetaTrader, but that's not the point. So, so, we see the intersection. Let's wait until it corrects these errors. We wait. Yes, here it goes to correct the errors. Well, come on, faster. You need to add. And it should create normal code. Here it has changed. The code is updated with added checks. So, often, yes, when generating code, there are errors, and you need to show them to it, and it corrects them very well and qualitatively. We wait for it to write the code for us. So, well, come on, don't be stupid. A simple code, of course. That's what's cool about Python. Two lines. And here, it wrote a huge number of lines. So, it generated the code. We take the corrected code and insert it into MetaEditor. We compile and click File, Save As, and specify to overwrite all these parameters. It will reset. We go back. We open. Damn, why does it always reset to default? So, we launch. So, here, H1. Well, let's do Daily and see what it tells us about this. We wait. So, there are no particular errors. Why is it taking so long? It seems to be a simple code, but it's running it for so long. Well, here it opened, closed. So, let's run it quickly. Well, here, in principle, running a simple code in MetaTrader. We can also, in principle, run it on an hourly chart. Or we can generate it anew. That is, if it doesn't work well for me, I don't really like how this code works. So, well, on currency, moving averages won't work well, of course. That is, I have, in principle, a normal working code that I got in MQL4. [music] Let's use it then. That is, you can regenerate several times if such a thing happens. You see that something is wrong. Let's copy it, paste it into the trader. Compiled. We go back into it. And so, damn, why does it always fly off? So, let's look. Da-da-da-da-da. 3 rubles. Everything. Properties. We see that you can set the lot size. Here, in principle, in this code, you can set the moving average value for testing. And we click start. That code, of course, generated incorrectly. You just had to regenerate it. That is, the first time it generated a more correct code for me. So, here we see it opens a buy because the moving average 15 is above the 30. We wait for it to go down and see if it correctly implements the specified parameters. So, well, yes, it immediately closed and opened a sell automatically. That is, what is needed, what, in principle, the parameters that we initially set for it. This code, you see, the point is, yes, here you can also choose which neural network to generate on. Now I generated it on the Chat GPT 4 neural network. It generated it normally for P script, but it generated it abnormally for MetaTrader. In this case, for MQL, I generate it on another neural network, CL 3. There, it did it more clearly. Well, we see that, in principle, yes, during intersections, positions are opened and closed. Everything, in principle, is done quite clearly. Let's try it on an hourly timeframe as well. That is, you can try both in GPT 4 and in CL 3. If you go directly, they stopped letting you in from Russia. Even under. But with this website, in principle, everything works out clearly. Well, let's see, yes, we see that everything is being processed. There is an intersection, it opens. There is an intersection, it opens. Somehow like that. That there are some problems with implementation in MetaTrader. Well, here you will have to try to generate purely by time, both in GPT 4 and in CL 3. But essentially, the robots turn out to be working, error-free. And if there are errors, you can immediately correct them in the same neural network. That's probably all. Thank you all for your attention. Bye.