How to make a mql5 EA with OpenAI - page 2

 
Omega J Msigwa #:

I agree with everything you said. Most people don't realize that AI aren't as smart as they think they are? I appreciate chatGPT it works for many stuff like teaching the how to's but do not believe everything it says, It makes horrible errors on a complex subjects especially coding & Mathematical subjects. I got  a lot of proof myself. It's code is worse I have found most of the code fixes are copies from stackoverflow and stackexchange. I think that is what it was trained on. By the way it is a language model, coding and programming languages aren't as straightforward as a human language.

That's it. It could give you many functions doing what you wish but with no coherence between unless somebody has provided the full code.
For info, the only full EA codes you'll find here around has been submitted for bug correction.
That's why Git copilot which is specialized in that only provide code snippet ... 
 

What a hell.

Forum on trading, automated trading systems and testing trading strategies

Test version of MQL5 Copilot in beta 3647

Renat Fatkhullin , 2023.03.23 23:11

In today's beta version 3647, we've included the first version of Copilot, a feature to enhance the editor's ability to write code.

The settings are here:

To activate it, you need to register on the site https://platform.openai.com/account/api-keys , get an API key and pay for the subscription. Since not everyone is given trial budgets (it looks like the holiday is over), you need to explicitly check the available balance on the page https://platform.openai.com/account/usage and provide credit card details.

To activate in the *.MQ5 file, you need to type the desired question and press Ctrl + Alt + \

 // Add OnTick function with new bar detection <Ctrl+Alt+\>

After a couple of seconds, you get something like this:

 // Add OnTick function with new bar detection.
// This code will detect a new bar and execute myFunction() when it's detected.
//

void OnTick ()
{   
   // Get the time of the latest bar
   datetime lastBarTime = iBarShift ( NULL , 0 , 0 );
   
   // Get the time of the previous bar
   datetime previousBarTime = iBarShift ( NULL , 1 , 0 );
   
   // Check if the previous bar has already been checked
   if (lastBarTime != previousBarTime)
   {
       //Run myFunction()
      myFunction();
   }
}

void myFunction()
{
   // Your code here
   Print ( "New bar detected!" );
}

So far, this is a fairly simple version in terms of promting and not very easy to manage. We will continue to improve, automatically supplementing prompting (request methods to AI) with the features of the content under the cursor (functions, class, external scope, etc.).

Write about your comments and suggestions, please.


 
Alain Verleyen #What a hell.

Forum full of useless code in 3, 2, 1...

 
Miguel Angel Vico Alba #:

Forum full of useless code in 3, 2, 1...

Might be worth trying to create a separate topic for this? Trying to gather all the useless code in one place

 
Vladislav Boyko #:

Might be worth trying to create a separate topic for this? Trying to gather all the useless code in one place

Done.

But unfortunately we can't prevent people to create new topics again and again.

MetaEditor, Open AI and ChatGPT
MetaEditor, Open AI and ChatGPT
  • 2023.03.24
  • www.mql5.com
Forum on trading, automated trading systems and testing trading strategies Test version of MQL5 Copilot in beta 3647 Renat Fatkhullin , 2023.03...
 
Alain Verleyen #:

Done.

But unfortunately we can't prevent people to create new topics again and again.

I hope this helps prevent at least some threads about generated code from being created.


I invite everyone who wants to generate code using AI to a specially created topic for this :)

MetaEditor, Open AI and ChatGPT
MetaEditor, Open AI and ChatGPT
  • 2023.03.24
  • www.mql5.com
Forum on trading, automated trading systems and testing trading strategies Test version of MQL5 Copilot in beta 3647 Renat Fatkhullin , 2023.03...
 
ChatGPT did help me in brainstorming while writing mql5 code. Most cases it did no know what it was writing and I was correcting the code for ChatGPT...but by doing that I corrected myself. So, it worked as a buddy for me!