Back to Learning

Coding

814 prompts available

AI Binary Trading Trainer

Create a detailed system prompt for an AI model designed to develop a self-training binary stock trading program for Android, incorporating reinforcement learning and interactive GUI features. The program should include: - Two resizable and movable screens: one displaying candlestick or line graphs of stock data, and the other showing the corresponding monetary values. - Functionality to detect increases in monetary value and save such instances as high-quality data for future experimentation. - Two button clickers that allow the AI to make binary trading decisions. - An input control to specify the duration the AI should wait before comparing data. - Features allowing the backup and restoration of the AI's trained model or “brain.” # Steps 1. Analyze incoming stock data and render it appropriately on the two screens. 2. Monitor monetary value changes and flag positive increases for data retention. 3. Enable the AI to make trading decisions via the two buttons. 4. Implement timing logic based on user input to decide when to compare data. 5. Ensure UI elements are dynamically resizable and movable by the user. 6. Provide robust backup and restore functionality for the AI’s internal state. 7. Utilize reinforcement learning methods to enable the AI to improve its trading strategy autonomously over time. # Output Format Respond with a comprehensive implementation plan including: - Architectural overview. - Description of the reinforcement learning approach. - UI/UX design for Android incorporating the required interactive elements. - Data management strategies for storing "good" data. - Backup and restore mechanisms for the AI model. - Considerations for integration and overlay capability with other Android applications. Provide clear explanations for each component and how they interconnect to fulfill the overall objective.

AI BTC/USD Trading Bot MT5

Design an AI-powered trading bot for the BTC/USD market using Pine Script compatible with MetaTrader 5 (MT5). The bot should incorporate the following features: 1. **Market Analysis:** Use relevant technical indicators (e.g., moving averages, RSI, MACD) to analyze market conditions. 2. **Entry and Exit Signals:** Define clear rules for entering and exiting trades based on indicator signals. 3. **Risk Management:** Implement position sizing, stop-loss, and take-profit mechanisms to manage risk. 4. **Trade Execution:** Automate trade orders (buy/sell) effectively within MT5 using Pine Script. 5. **Adaptability:** Optimize the bot to respond dynamically to changing market conditions. # Steps - Choose appropriate technical indicators for BTC/USD analysis. - Define precise buy and sell criteria. - Implement risk management strategies. - Write the Pine Script code compatible with MT5 to automate trading decisions. - Test the bot with historical data to validate performance. # Output Format Provide the complete Pine Script code for the AI trading bot, well-commented and structured for readability. Include explanations for key sections of the code and instructions on how to deploy it within the MT5 platform. # Notes - Ensure the script efficiently handles real-time data. - Focus on clarity and modularity to facilitate future adjustments and optimizations. - Keep in mind the limitations and capabilities of Pine Script within MT5 environment.

AI Bug Fixer

You are an AI bug fixer tasked with identifying, analyzing, and correcting bugs in source code provided to you. Carefully review the given code to understand its intended functionality, pinpoint errors or issues, and provide a corrected version of the code along with a clear explanation of the problems found and the changes made. When applicable, suggest improvements that enhance code readability, efficiency, or maintainability without altering the original functionality. # Steps 1. Examine the provided source code thoroughly to comprehend its purpose. 2. Identify any syntax errors, logical bugs, runtime issues, or deviations from expected behavior. 3. Explain the cause of each bug or issue clearly and concisely. 4. Provide a corrected, well-formatted version of the source code. 5. Optionally, suggest improvements or best practices related to the code. # Output Format - First, output a clear explanation of the bugs and their causes. - Then, provide the corrected code enclosed in a code block labeled with the appropriate programming language. - Finally, if applicable, add recommendations for code improvements or optimizations. # Examples Example 1: Input: Code snippet with a syntax error or logical mistake. Output: Explanation of the syntax error, corrected code with the syntax fixed, and optional tips. Example 2: Input: Code with a logical bug causing incorrect output. Output: Identify the logic flaw, corrected code, and clarification on how the fix addresses the issue. # Notes - Ensure your fixes preserve the original intended functionality of the code. - When multiple bugs are present, address each clearly in your explanation. - Avoid introducing new issues in your corrections. - Always specify the programming language when presenting corrected code.

AI Chart TP SL Analyzer

Create a program that leverages AI to analyze uploaded chart images and provides recommended Take Profit (TP) and Stop Loss (SL) levels based on the analysis. The program should: - Accept input images of financial charts (e.g., candlestick charts). - Use AI techniques to interpret key features such as support/resistance levels, trends, and patterns. - Calculate and suggest appropriate TP and SL values that align with the analyzed data. - Clearly explain the rationale behind the recommended TP and SL. # Steps 1. Receive and process the chart image input. 2. Extract relevant features from the chart using AI or image recognition techniques. 3. Analyze trends, patterns, and key levels to determine logical TP and SL points. 4. Output TP and SL recommendations along with an explanation. # Output Format Provide the output as a JSON object with the following structure: { "take_profit": [numeric value], "stop_loss": [numeric value], "analysis_explanation": "Text description of the reasoning behind the TP and SL recommendations." } Ensure the response is clear, concise, and practical for trading decisions.

AI Chase Script

Create a Lua script that implements an AI chase behavior for a character or entity in a game. The script should make the AI character pursue a target based on certain conditions, such as distance and line of sight. The following features should be included: - The AI should identify a target within a specified range. - Once a target is detected, the AI should move towards the target, adjusting its speed based on the distance to maintain an engaging chase. - Implement line of sight detection to ensure the AI only chases targets that it can see. - Include functions for starting and stopping the chase based on the target's visibility. - Allow for customization of parameters such as chase speed, detection range, and field of vision. Ensure to provide comments in the code for clarity and to explain key sections of the script. Also, use a modular approach to define functions separately for better organization and maintainability.

AI Chat and Image App

You are tasked with creating an AI-powered interactive web application that provides two main functionalities: Text-based Chat and Image Generation. The application should use OpenAI's API to enable a chat interface powered by the GPT-4 model and an image generator using the DALL·E API. These functionalities must be integrated into a user-friendly interface using the Gradio library with separate tabs for ease of use. Key requirements: 1. **Chat Functionality:** - Implement a chat interface where users can input messages. - The assistant should respond intelligently and helpfully, simulating a ChatGPT-like conversation. - Maintain the conversation history between user and AI to provide context for ongoing dialogue. - Use the OpenAI ChatCompletion API with the "gpt-4" model. 2. **Image Generation Functionality:** - Provide an input textbox where users can enter descriptive prompts for image generation. - Use OpenAI's Image generation API to create images based on the prompts. - Display generated images with appropriate size and quality. 3. **User Interface:** - Utilize Gradio to build an interface with two tabs: one for the AI chat and one for the image generator. - The chat tab should use Gradio’s chat interface component. - The image generator tab should have a text input and image output. 4. **Environment and Security:** - Load API keys securely from environment variables using the dotenv package. 5. **Functionality Details:** - For chat, ensure messages are structured correctly with roles "system", "user", and "assistant". - For image generation, generate exactly one image per prompt with size "512x512". 6. **Launching:** - The completed app should be launchable and accessible locally. # Steps 1. Load environment variables and set the OpenAI API key. 2. Implement `chat_with_ai` function that takes user input and chat history, constructs message payload, makes a ChatCompletion API call, and appends new interactions to the chat history. 3. Implement `generate_image` function that takes a prompt, calls the OpenAI image creation API, and returns the image URL. 4. Create Gradio interfaces: `chatbot` as a chat interface for chat_with_ai; `image_ui` as a text-to-image interface. 5. Combine interfaces into a tabbed Gradio app with clear tab labels. 6. Launch the app. # Output Format Provide a complete Python script implementing the described functionality using the OpenAI and Gradio libraries, structured similarly to the provided code snippet. The code should be clean, well-commented, and ready to run assuming the user provides the necessary API key in environment variables. Do not include any extraneous text outside of the code. # Examples No additional examples needed, as the task includes code implementation. # Notes - Ensure that conversation history correctly maintains user-assistant turns. - The image generation function must handle only one image to keep the UI straightforward. - Follow best practices for environment variable management.

AI Chat App Development

Create a detailed plan and development outline to build an AI mobile application APK similar to Perplicity. The app should feature conversational AI capabilities, engaging user interface, and robust backend support for AI interactions. Consider important aspects like user experience, scalability, security, and integration with AI models. # Steps 1. Define Core Features: Identify key functionalities such as chat interface, AI response generation, user account management, settings, and notifications. 2. Design UI/UX: Plan an intuitive and visually appealing interface tailored for mobile devices. 3. Select AI Backend: Choose appropriate AI frameworks or APIs to power the conversational model, ensuring responsiveness and accuracy. 4. Develop Frontend: Implement the mobile app interface using a suitable framework (e.g., Android Studio with Kotlin/Java or Flutter). 5. Build Backend Services: Set up servers or cloud functions to handle AI requests, manage data, and authenticate users. 6. Integrate AI Model: Connect the frontend with the AI backend to enable real-time conversational interactions. 7. Test: Perform thorough testing for functionality, usability, and security across different devices. 8. Optimize Performance: Improve app responsiveness, reduce latency, and ensure efficient resource usage. 9. Package as APK: Compile and package the app into an APK file suitable for Android devices. 10. Prepare for Deployment: Include installation instructions, privacy policy, and user guidelines. # Output Format Provide a comprehensive development plan document including architecture diagrams, technology stack recommendations, feature list, and development timeline, followed by example code snippets or pseudocode for key components. Additionally, outline the steps to compile and package the APK.

AI Chat Code Agent App

Create an application identical to Cursor that allows unlimited chatting capabilities and can connect to AI models via APIs. The app should function like an intelligent coding agent capable of modifying code dynamically. Ensure the app supports seamless integration with multiple AI APIs, provides an intuitive user interface for continuous conversations, and facilitates code editing and modification through AI assistance. # Key Requirements - Develop a chat interface allowing unlimited message exchanges. - Enable connection to various AI models using API keys. - Implement AI-driven agents capable of understanding and modifying code on demand. - Support diverse programming languages for code modification. - Provide real-time code editing and suggestions. - Ensure a smooth, user-friendly experience resembling Cursor's functionality. # Steps 1. Design the user interface focusing on chat and code editor integration. 2. Integrate API connectivity to different AI models for flexible backend support. 3. Develop agent logic to interpret, generate, and modify code snippets. 4. Implement continuous chat state management for unlimited conversation. 5. Test thoroughly across multiple scenarios for robustness. # Output Format Provide a detailed project plan including architecture design, key technologies to use, and sample API interaction snippets demonstrating the chat and code modification features.

AI Content Optimization App

Create a full `App.js` file for an AI-Powered Content Optimization SaaS application using React.js. This application will import the Google Generative AI module, initialize it with a provided API key, and utilize a generative model for content optimization. Additionally, create a separate CSS file to style the application. Make sure to include structure for a user interface that allows users to input content, trigger the generative model, and display optimized content. Below are the specifications and steps to achieve this: ## Specifications: - Use React.js as the primary framework. - Import `GoogleGenerativeAI` from `@google/generative-ai`. - Initialize `GoogleGenerativeAI` with a mock or placeholder API key. - Implement functional components for user input and displaying results. - Write a CSS stylesheet for basic styling of the UI elements. ## Steps: 1. Import React and necessary modules at the beginning of the `App.js` file. 2. Create a functional component called `App` that includes: - State variables for user input and generated content. - A text area for users to enter content. - A button to trigger the generative model. - A section to display the optimized content. 3. Use the generative model to process user input when the button is clicked. 4. Add error handling for API interactions. 5. In a separate `App.css` file, style the application with basic layouts, colors, and alignment. ## Output Format: The final output should consist of two files: 1. `App.js`: Contains all the React component code. 2. `App.css`: Contains the styling for the application. ## Example of `App.js`: ```javascript import React, { useState } from 'react'; import { GoogleGenerativeAI } from "@google/generative-ai"; import './App.css'; const genAI = new GoogleGenerativeAI("GEMINI_API_KEY"); const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" }); const App = () => { const [inputText, setInputText] = useState(""); const [optimizedContent, setOptimizedContent] = useState(""); const handleInputChange = (event) => { setInputText(event.target.value); }; const handleGenerate = async () => { try { const response = await model.generate({ input: inputText }); setOptimizedContent(response.output); } catch (error) { console.error('Error generating content:', error); alert('Failed to generate content. Please try again.'); } }; return ( <div className="app-container"> <h1>AI-Powered Content Optimization</h1> <textarea value={inputText} onChange={handleInputChange} placeholder="Enter your content here..." /> <button onClick={handleGenerate}>Optimize Content</button> <h2>Optimized Content:</h2> <div className="output-container"> <p>{optimizedContent}</p> </div> </div> ); }; export default App; ``` ## Example of `App.css`: ```css .app-container { max-width: 600px; margin: auto; padding: 20px; font-family: Arial, sans-serif; } textarea { width: 100%; height: 100px; margin-bottom: 10px; padding: 10px; border: 1px solid #ccc; border-radius: 4px; } button { padding: 10px 15px; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer; } .output-container { margin-top: 20px; padding: 10px; border: 1px solid #ddd; border-radius: 5px; } ```

AI Chat Controller

Design an AI script to manage and respond to your chat messages. The AI should simulate natural conversation, maintaining tone and context, while adhering to your preferred level of formality and language style. # Steps 1. **Input Handling:** The AI should accept and analyze incoming messages for context and respond appropriately. 2. **Contextual Understanding:** Utilize previous exchanges to inform responses, ensuring they align with ongoing discussions. This may involve referencing past messages to provide continuity. 3. **Response Crafting:** Generate responses that match your specified tone (e.g., formal, casual, humorous) and are appropriate for the current context of the conversation. 4. **Language Style Adaptation:** Use the set language style and adjust vocabulary and structure to fit the conversation style you prefer. 5. **Feedback Loop:** Implement a mechanism to learn from interactions, allowing you to refine and update the AI's performance based on your feedback. # Output Format Responses should be text messages formatted in a natural conversational style. Each response should be clear and concise, reflecting the selected tone and style.

AI Crypto Trading Bot

Design an advanced AI-powered crypto trading bot that effectively buys and sells tokens with the goal of generating profits daily. The bot should employ machine learning algorithms to analyze market trends, execute trades at optimal times, and manage risks effectively. It should support various cryptocurrencies and have features for backtesting strategies against historical data. Additionally, include provisions for monitoring and adapting to changing market conditions to ensure profitability. Please detail the necessary components, technologies, and strategies involved in creating this trading bot.

AI Chat Interface No API

Create a fully functional AI chat interface similar to ChatGPT using only HTML, CSS, and JavaScript without relying on any external API key or backend service. The chat should simulate conversational exchanges with an AI by implementing simple scripted or heuristic responses within the client-side code itself. Requirements: - Design a clean and user-friendly chat interface with input box and message display area. - Allow users to type messages and receive instantaneous AI-generated replies based on predefined rules or patterns. - Include basic features like scrolling chat history, sending messages with Enter key, and clear chat button. - Ensure the interface is responsive and visually appealing. - All functionality should be client-side with no dependency on external APIs or keys. # Steps 1. Structure the HTML with a chat container, messages area, input field, and buttons. 2. Style the interface with CSS for modern look, including user and AI message styles. 3. Write JavaScript to handle user inputs, append messages, and generate AI responses via simple logic. 4. Implement natural-feeling response delays and scrolling behaviors. # Output Format Provide a complete self-contained HTML file including embedded CSS and JavaScript that renders the AI chat interface fulfilling the above requirements.

Page 67 of 68

    Coding Prompts - Learning AI Prompts | Elevato