Discussing the article: "OpenAI's ChatGPT features within the framework of MQL4 and MQL5 development" - page 2
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It would be good) as part of sharing experience) the task is complicated by the fact that µl doesn't know gpt languages very well. Sometimes it is quite difficult to get the code without errors.
ChatGPT 3.5 writes normally in MQL4/5, don't be so glib. The value of the article should be in prompts and showing the process of development using ChatGPT, but there is no such thing at all. Just ready-made generated codes that nobody is interested in for free. The value of the article is zero, the author gets a "D" and I wonder how this shoddy work was allowed to be published .
For those who are in the tank, let me tell you again, the point of the article is not to give you prompts, but to instil the idea that you should produce them yourself. You just don't realise what would happen to the article if I dumped everything I've done. There are tonnes of unnecessary junk that will only confuse people. The material should be simple and clear. And you're not taking an exam to give me a D. Be careful.
ChatGPT 3.5 writes normally in MQL4/5, don't be so glib. The value of the article should be in prompts and showing the process of development using ChatGPT, but there is no such thing at all. Just ready-made generated codes that nobody is interested in for free. The value of the article is zero, the author gets a "D" and I wonder how this hack job was allowed to be published .
I failed to get the code for placing a market order. If you can promt. Each time returned the ticket.
I have not been able to get the code for placing a market order. If you can promt. It returned the ticket every time.
Write a procedure in MQL5 to open a market order. The function should accept the following input data:
1) Lot
2) Take Profit as a module of price difference between opening and closing prices
3) Stop Loss as a module of the price difference between the opening and closing prices
4) Order Direction (bool bDirection) true - BUY ; false - SELL
5) Slippage in pips (this is the maximum possible deviation from the opening price in pips)
6) Magic order number
Additionally, if the Stop Loss or Take Profit is zero, the order should be opened without the corresponding Stop Loss or Take Profit, depending on what is zero, or without Stop Loss and Take Profit at all if they are both zero.
Additionally, provide a lot check for minimum and maximum allowable lot, and if the lot is out of the allowable range, bring it to the nearest available number (minimum or maximum).
Provide extensive comments and try to make the code shorter, and don't forget that stop loss and take profit prices are calculated differently for buy and sell orders.
You can't use any libraries, but only MQL5 language features.
It didn't work right away, I had to make the prompt more detailed. Note that it took only 5 minutes. And I didn't look for any prompts, I just wrote what I wanted and how. Prompt is not a question at all....
This is all pointless with current GPT skills because the "customer" has to find errors in the generated source, meaning actually know the correct answer or write most of it. Current GPTs are chatterboxes.
Well actually you are the same as I say, really without knowing the language and correcting what it gives out it is useless, I tried to explain it in the article, but it seems not very much to people yet). They want to give me a prompt and that's it and I'm in the chocolate ))) And the fact that you need to think about it, GPT is there ))))
I agree with you about Promtov, even when you give the AI the same request, it generates different text or code. That's why you have to communicate with it like a child and thoroughly explain to it what you want to get from it. The only thing is that you, as a programmer with experience and experience, plus a mathematical education, and therefore with the appropriate style of thinking, can more clearly and briefly formulate a task for the AI, like a ToR. Many traders cannot make up elementary TOR for writing a simple Expert Advisor. When I started writing the first Expert Advisors in MQL4, I remembered how we were taught in university, back in Fortran, to first draw an algorithm of the future programme and then write code according to it, it helped a lot. Also, as future design engineers in radio-electronic systems, we were taught to write TOR, also useful.
You'd better think about the fact that the starting EMA calculation is not equal to the subsequent ones, because you need to save bars until you are blue in the face, and you need to trade here and now. About the cycles, everything works by bars, I didn't notice any noticeable slowdowns. You can finalise the calculations as you want for this indicator, but will it give you much ) I just know that nothing at all ).
This is the task of the EMA writer - to make all his subsequent calculations equal to the previous ones. You don't need to save up bars until you are blue in the face, but, as I wrote above, you only need 10-20 times more bars than the period.
About cycles is very convincing... Of course, there is absolutely no difference between a cycle of 10 bars and a cycle of 100 bars... Especially if you consider the existence of fast algorithms for calculating averages.
I didn't notice it at first)
I didn't notice it at first)
SymbolInfoDouble(_Symbol,SYMBOL_POINT) - this is how it should be. In general, you have understood... I have fixed most of the errors. I would have seen it all if it was the code for my ts. There are flaws... and if you don't know what you're doing, it's useless. You're on the right track. He's often wrong. There's a reason I wrote that article. I could make a super prompt, it would not make a mistake and give everything perfectly, but it would be useless because it's all a show-off. In real field conditions we ask simple human questions, which in the best case can be more specific, but as practice shows it does not reduce post processing much.