Trading libraries for MetaTrader 5

Special Offer!

Time Left to Buy:

Up to 25% OFF

Shopping cart

The cart is empty

MetaTrader 5

Top Rated Products MT5

350 $263 $ KTS poverty killer robot
Thato Modiba
4 5 6 Product
5 500 $4 125 $ Bonnitta EA MT5
Ugochukwu Mobi
4 5 3 Product
999 $749 $ AI Gen XII MT4
Denis Kurnev
5 5 2 Product

OpenAI Library MT5

openai-library-mt5-logo-200x200-4662
Request a price

Free updates are included

We accept crypto: BTC, ETH, BCH and more...

30-Day Money Back Guarantee
100% Guarantee of Originality

Information

Libraries
MetaTrader 5
VitalDefender Inc.
1.0
5

Overview

The following library is proposed as a means of being able to use the OpenAI API directly on the metatrader, in the simplest way possible.

For more on the library's capabilities, read the following article:

https://www.mql5.com/en/blogs/post/756098

The files needed to use the library can be found here:

Manual

IMPORTANT: To use the EA you must add the following URL to allow you to access the OpenAI API as shown in the attached images

In order to use the library, you must include the following Header, which you can find at the following link:

https://www.mql5.com/en/blogs/post/756108

#import "StormWaveOpenAI.ex5"

COpenAI *iOpenAI(string);

CMessages *iMessages(void);

CTools *iTools(void);

#import

This is all you need to be able to Use the library with ease.

Below is an example of how you can use the library with ease and operate with the OpenAI API

#include <StormWaveOpenAI.mqh>      //--- Include the custom OpenAI header file for API integration
COpenAI *client;                    //--- Declare a pointer to the OpenAI client
CMessages *_message_;               //--- Declare a pointer for handling messages
//--- The OnStart function is the entry point of the script
OnStart()
  {
   client = iOpenAI("YOUR_API_KEY"); //--- Initialize the OpenAI client with your API key
   client.start_thread();            //--- Start a new thread for the OpenAI client to operate in
   string completion;                //--- Variable to store the API response
   _message_ = iMessages();          //--- Initialize the message handler
   string user_content = "Hi how are you?";   //--- Define the message content
   _message_.AddMessage(user_content, user);  //--- Add the message to the handler with a user identifier
   //--- Call the API to generate a completion based on the provided messages
   completion = client.completions_create(
                   /*model =        */  "gpt-3.5-turbo-0125", //--- Specify the model to use for the completion
                   /*messages =     */   _message_,           //--- Pass the messages to the API
                   /*max_tokens =   */   300,                 //--- Set the maximum number of tokens to generate
                   /*temperature =  */   1.0                  //--- Set the creativity level of the response
                );
   client.PrintResultMessage(); //--- Print the result of the API call
   delete _message_;            //--- Clean up the message handler
   delete client;               //--- Clean up the OpenAI client
  }

For further details, please feel free to contact me. I express my thanks in advance in case you decide to purchase this library. Should you encounter bugs, I would be grateful if you could contribute to the improvement of the library by privately sending me the problems you encounter so that I can make the necessary improvements.

30-Day Money Back Guarantee

If for any reason you do not like the purchased program, you can request a refund within 30 days from the date of purchase. You can also make an exchange for any other product at an equal cost or by paying the difference.
Simply send a request for refund or exchange with your order number by email: support@market-fx.pro.
Refund requests received more than 30 days after purchase will be rejected.

Email Us Now! Support is available 24/7
by Email: support@market-fx.pro

Do You Need Help?
Click Here To Start Live Chat

Contact Us

Image

Search