Back to Learning

Coding

814 prompts available

Advanced Python Revision

Revise Python by focusing exclusively on its real-world applications relevant to experienced developers. Avoid basic concepts and theoretical explanations. Instead, provide detailed examples of how advanced Python features and libraries are applied in professional contexts such as data analysis, web development, automation, and software engineering. Each topic should highlight practical usage, demonstrating how Python solves actual problems in the industry. Prioritize clarity and depth to reinforce practical understanding and applicability for someone with prior Python development experience.

Advanced MQL5 ICT EA Bot

Create an advanced Expert Advisor (EA) bot using MQL5 programming language for automated trading that integrates multiple intelligent and highly effective technical indicators. The bot should continuously analyze the market 24/7 by leveraging concepts from Inner Circle Trader (ICT) methodology, Market Structure Change (MSC), and Break Order Structure techniques to identify optimal trade entries and exits. Ensure the EA operates flawlessly without errors, manages risk appropriately, and consistently generates profits over time. Requirements: - Incorporate several advanced technical indicators combined intelligently to analyze market conditions. - Utilize ICT principles, including market structure analysis and order block identification. - Detect Market Structure Changes (MSC) to anticipate reversals or continuation. - Identify Break Order Structure patterns for entry and exit signals. - Implement robust risk management strategies (stop loss, take profit, position sizing). - Ensure the EA runs continuously 24/7 with reliable performance and no runtime errors. - Provide clear and maintainable code with appropriate comments explaining key logic. # Steps 1. Define and program the set of advanced technical indicators to be used. 2. Implement ICT concepts, including market structure and order block logic. 3. Detect MSC and Break Order Structure conditions within the code. 4. Build the trading decision logic combining indicator signals and ICT analysis. 5. Implement risk management and order execution components. 6. Test and debug the EA to ensure it works error-free and performs consistently. # Output Format Provide the complete MQL5 source code file containing the fully functional EA bot. Include comprehensive in-line comments explaining the logic of indicators, ICT and MSC detection, trade execution, and risk management. Ensure code clarity and correctness for direct use or further customization.

Advanced Python Soundpad

Create an advanced soundpad application using Python. The application should have a perfect, user-friendly menu interface that allows users to easily add any voice or sound files. It should support features such as playing multiple sounds, organizing sounds into categories or playlists, and possibly recording or modifying sounds. Prioritize usability and responsiveness in the design. # Steps 1. Design a clear and intuitive menu system for navigating the soundpad features. 2. Implement functionality to add new voice or sound files through the interface. 3. Enable playback of sounds with controls like play, pause, stop, and volume adjustment. 4. Allow users to organize sounds into categories or playlists. 5. Optionally, include features for recording new sounds or editing existing ones. 6. Ensure the application runs smoothly and handles errors gracefully. # Output Format Provide the complete Python source code for the soundpad application, including all necessary comments and instructions on how to run it. Use appropriate libraries for audio handling and user interface (e.g., tkinter, pygame, or other relevant packages).

Advanced MQL5 Trading Indicator

Develop a comprehensive MQL5 indicator implementing an advanced trading strategy that leverages order blocks, risk management, and alert systems. The indicator must: - Detect and visualize buy and sell signals on the chart using arrows, triggered by specific conditions including RSI thresholds, moving average relations, and detection of order blocks (e.g., large candles followed by consolidation). - Accurately identify order blocks through price action analysis. - Manage trade execution with user-configurable parameters: risk percentage per trade, maximum order size, stop loss, and take profit levels. - Calculate lot sizes dynamically based on the account balance and risk settings. - Execute trades automatically with defined stop loss and take profit. - Generate alerts via MQL5 alert functions at each trade execution, clearly informing the user of buy or sell orders placed. Follow these steps: 1. Initialize indicator buffers for buy and sell arrow signals with distinct colors visible on the chart. 2. Implement a function to reliably detect order blocks based on price action patterns (e.g., large candle followed by consolidation zones). 3. In the OnCalculate loop, compute RSI and moving average values; integrate these with order block detections to decide buy or sell signals. 4. Develop a trade execution function that calculates position sizes by risk percentage and places orders with stop loss and take profit. 5. Trigger real-time alerts when trades are executed, indicating order type and details. Output Format: - Visual buy/sell arrows displayed on the trading chart at signal points (blue arrows below price for buys, blue arrows above price for sells). - Logging messages in the console confirming order success or detailing errors. Examples: - Buy Signal: RSI is below 30, price closes above moving average, and an order block is identified; place buy order, show blue arrow below the price. - Sell Signal: RSI exceeds 70, price closes below moving average, and an order block is spotted; place sell order, display blue arrow above the price.

Advanced QB Core Heist Script

Create a highly advanced and professional CFW QB Core script implementing a comprehensive robbery system focused on a glass shop heist. The system must include the following features: - A highly sophisticated UI with dynamic, animated interfaces that are visually appealing and user-friendly. - Intricate and advanced robbery mechanics including multiple sophisticated stealing methods. - Integration of MP3 audio cues to simulate the tension and atmosphere experienced by the thief during the robbery. - Mechanisms for stealing from a safe and methods to unlock closed doors realistically. - Functionality to carry stolen items represented as objects (items) that can be stored in a backpack/inventory. - Ability to sell stolen goods to a civilian NPC whose location changes periodically, paying the player in cash. - All functionalities should be cohesively interconnected, ensuring seamless user experience and professional implementation. Ensure the script leverages the QB Core framework effectively and is optimized for performance and gameplay immersion. # Steps 1. Design and implement a polished, complex UI with animations and sound integration. 2. Develop advanced theft mechanics: safe cracking, door unlocking, and multiple stealing methods. 3. Implement carrying system for stolen items as inventory objects. 4. Program the dynamic NPC that buys stolen goods, with periodically changing location. 5. Handle cash reward logic upon selling stolen items. 6. Ensure all components integrate cohesively for a smooth experience. # Output Format Provide the complete CFW QB Core script files and clearly commented code snippets illustrating the implementation of all required features. Include descriptions of UI designs and how audio files are integrated. Present configuration or usage instructions if necessary.

Advanced MT5 AI Trading Bot

Create a highly sophisticated MT5 (MetaTrader 5) trading bot focused on trading gold (XAUUSD) and various forex pairs. The bot must leverage advanced machine learning and AI techniques to accurately learn and predict market patterns. Use Python for data processing, model training, and integration with the MT5 platform. Employ cutting-edge tools and libraries (such as TensorFlow, PyTorch, scikit-learn, or others as appropriate) to build complex, robust, and highly trained models that maximize winning trades and minimize risks. Key Requirements: - Data Collection & Processing: Implement comprehensive data gathering from historical and live market feeds, including price, volume, indicators, and relevant external factors. - Feature Engineering: Use advanced methods to extract meaningful features and identify patterns impacting market movements. - Model Selection & Training: Utilize state-of-the-art machine learning / deep learning models capable of capturing complex temporal dependencies (e.g., LSTM, Transformers, ensemble models). - Evaluation & Validation: Apply rigorous backtesting, cross-validation, and walk-forward analysis to ensure model stability and consistent profitability. - Integration & Execution: Seamlessly connect the trained model with the MT5 trading platform via Python APIs to execute trades automatically in real-time. - Risk Management: Incorporate dynamic money management strategies, stop losses, profit targets, and position sizing to control exposure. - Continuous Learning: Enable periodic retraining and adaptation of the model to evolving market conditions. Steps: 1. Gather and preprocess high-quality historical and real-time data for XAUUSD and targeted forex pairs. 2. Perform feature engineering to create input data suitable for ML models. 3. Explore and benchmark various ML architectures focusing on predictive accuracy and robustness. 4. Train models using Python libraries and optimize hyperparameters. 5. Rigorously evaluate models using backtesting and real market simulations. 6. Develop a Python-based integration layer to connect the model's predictions with MT5’s trade execution. 7. Implement real-world trading logic including risk controls and trade management. 8. Continuously monitor and retrain the system to maintain performance. Output Format: Provide detailed technical documentation, including architecture design, chosen ML techniques, model training code snippets, evaluation results, and Python scripts for integration with MT5. Include clear instructions on setup, training, deployment, and usage of the trading bot. Where relevant, offer example configurations for specific trading strategies and risk parameters. Notes: - Emphasize accuracy, robustness, and adaptability rather than unrealistic guarantees of always winning trades. - Prioritize transparency and explainability of the AI models to support trust and troubleshooting. - Consider computational resource requirements and latency constraints inherent in live trading environments.

Advanced QBCore Garage

Create an advanced and secure garage script tailored specifically for the QBCore framework used in FiveM servers. The script must incorporate the following key features: - Vehicle storage and retrieval with strict ownership verification. - A garage management system that enables players to own and manage multiple garages. - Vehicle impound and release mechanics, including state changes and fees if applicable. - Persistent vehicle state storage across server restarts using QBCore compatible database integration. - User-friendly commands or menu-based UI for smooth player interaction with garages. - Full compatibility with QBCore's player data structures and vehicle database schemas. - Robust security measures to prevent exploits, unauthorized vehicle access, and manipulation. # Steps 1. Clearly outline and define all core features and how they interrelate within the QBCore ecosystem. 2. Design the database schema, including necessary SQL queries, to store vehicle data linked securely to player identifiers. 3. Implement Lua event handlers for vehicle storage, retrieval, impound, and release, incorporating ownership and state validations. 4. Integrate the script tightly with QBCore’s vehicle and player data management systems for seamless data persistence. 5. Develop an intuitive menu system or command interface allowing players to interact with their garages and impound systems effectively. 6. Implement rigorous ownership and security checks, verifying players before permitting any vehicle retrieval or manipulation. 7. Provide comprehensive commented Lua code that details each component’s purpose and functionality. 8. Include instructions or sample commands demonstrating how to operate the garage system. 9. Test considerations to debug and ensure stable operation within a QBCore environment. # Output Format Provide a fully functional Lua script compatible with FiveM's QBCore framework, including: - Well-commented code explaining each function and section. - SQL database schema and relevant queries for vehicle and garage data persistence. - UI/menu system code or examples. - Example commands and usage instructions for players. # Notes - Adhere strictly to QBCore coding conventions and best practices. - Prioritize performance efficiency and security to minimize potential exploits. - Assume the user has foundational knowledge of FiveM and the QBCore framework. Deliver a comprehensive and professional-grade garage script package that enhances gameplay by effectively managing player vehicles within the QBCore environment.

Advanced Multi-Instrument Scalping EA

Create a highly optimized and corrected Expert Advisor (EA) auto trading bot code suitable for the MetaTrader platform (MQL4 or MQL5). This EA should automatically open trades based on scalping the market for buy and sell signals, targeting multiple instruments including XAUUSD, Boom 1000 index, USDJPY, XAUEUR, USDCHF, Gold RSI Trend Down Index, and volatility indicators. The EA must: - Accurately analyze and integrate relevant technical indicators (like RSI, trend analysis, volatility measures) across all specified instruments. - Employ advanced, realistic forecasting and predictive algorithms to determine optimal buy or sell entry points. - Incorporate robust risk management features, including stop-loss, take-profit, and position sizing, to minimize potential losses. - Be precise, adaptable, and stable under different market conditions, supporting scalping with appropriate trade timing. - Follow MetaTrader platform coding conventions with modular, maintainable structure and comprehensive inline comments. # Steps 1. Collect and process key market indicators for all specified instruments. 2. Employ predictive modeling techniques to anticipate market direction and price action. 3. Create decision-making logic that triggers buy/sell trades based on combined indicator signals and forecasts. 4. Integrate risk management including dynamic stop-loss, take-profit, and sensible position sizing. 5. Optimize the EA code for execution efficiency, stability, and multi-instrument adaptability. # Output Format Provide the complete, well-structured, and fully commented EA source code in MQL4 or MQL5. Include clear instructions or commentary within the code about configurable parameters, how to deploy, and any limitations. The code must be production-ready for live trading with scalping strategies across the specified instruments. # Notes - Emphasize practical and realistic strategies; avoid unrealistic promises of no losses. - Use appropriate MetaTrader indicators and functions consistent with multi-instrument trading. - Include detailed inline documentation to explain logic, parameters, and usage. Ensure the EA fulfills all the requirements above with clarity, precision, and robustness.

Advanced QBCore Garage Script

Create an advanced garage script specifically for the QBCore framework used in FiveM servers. The script should include robust features such as: - Vehicle storage and retrieval with proper ownership checks. - Garage management system allowing players to have multiple garages. - Vehicle impound and release mechanics. - State persistence to ensure vehicles remain saved across server restarts. - User-friendly commands or menu interface for interacting with garages. - Compatibility with QBCore's player data and vehicle databases. - Secure handling to prevent exploits or unauthorized vehicle access. # Steps 1. Outline the core features required for the garage system. 2. Define how vehicle data will be stored and linked to player IDs. 3. Implement event handlers for storing and retrieving vehicles. 4. Integrate with QBCore database systems to persist vehicle states. 5. Create a UI or command system for player interaction. 6. Add safety checks to validate vehicle ownership before allowing retrieval. 7. Test and debug in a QBCore server environment. # Output Format Provide the garage script code in Lua, with clear comments explaining each section and function. Include any necessary database schemas or SQL queries required for vehicle data persistence. Optionally include user commands or instructions to operate the garage system. # Notes - Ensure the script adheres to QBCore coding standards and best practices. - Prioritize performance and security. - Assume the user is familiar with FiveM and QBCore framework basics.

Advanced Multi TF Forex Robot

Create a professional and advanced Multi Timeframe Forex Trading Robot for MetaTrader 5 (MT5) implementing the specified swing trading, trend following, and multi-timeframe analysis and execution strategy. Details and Requirements: 1. Indicators Setup: - Daily Timeframe (HTF): - RSI with 25 period; buy signal level 54, sell signal level 46. - ATR with 14 period. - 1 Hour Timeframe (Semi HTF): - RSI with 25 period; buy level 54, sell level 46. - ATR with 14 period. - 15 Minutes Timeframe (LTF): - RSI with 7 period; buy level 27, sell level 73. - ATR with 14 period. 2. Entry Logic: - Buy Entries: - HTF: First buy when RSI 25 crosses above 54 from below 46; then switch to Semi HTF. - Semi HTF: Confirm HTF RSI > 54; enter buy when Semi HTF RSI crosses above 54; then switch to LTF. - LTF: Confirm Semi HTF RSI >= 46; enter buy on all RSI 7 crosses above 27 at candle close maintaining Semi HTF RSI restriction. - Sell Entries: - HTF: First sell when RSI 25 crosses below 46 from above 54; then switch to Semi HTF. - Semi HTF: Confirm HTF RSI < 46; enter sell when Semi HTF RSI crosses below 46; then switch to LTF. - LTF: Confirm Semi HTF RSI <= 54; enter sell on all RSI 7 crosses below 73 at candle close maintaining Semi HTF RSI restriction. 3. Trade Management: - Lot Size: Base lot of 0.5% per trade of account balance, with manual override option (default 1 lot). - Stop Loss: 2 times ATR. - Take Profit: 6 times ATR for HTF and Semi HTF trades; 4 times ATR for LTF trades. - Optional Breakeven: Activate when price moves 2.5 times ATR plus 0.5 ATR buffer. - Daily Drawdown Limit: 4% of account. 4. Customizability: Allow full customization of all indicator parameters and trade management settings. 5. Additional Features: - Assign unique Magic Number and include trade comments for identification. - Implement a professional dashboard displaying: - Trend direction and signal status for each timeframe. - Current account profit/loss. - Drawdown. - Equity information. 6. Performance and Reliability: - Optimize code to prevent memory leaks, array overflows, and lag. - Include robust error handling and input validations. # Steps - Implement RSI and ATR indicators as specified for each timeframe. - Monitor timeframe-specific RSI crosses for trade signals according to the detailed entry logic. - Manage trades with configurable lot sizing, stop loss, take profit and breakeven according to ATR-based multipliers. - Enforce daily drawdown limits. - Develop a user-configurable dashboard reflecting real-time trend and account statistics. - Ensure code optimization and stability with proper error handling. # Output Format Provide the full MT5 Expert Advisor code, properly commented, modularized, and adhering to MQL5 standards. Include instructions or comments on how to configure parameters and integrate the EA into MT5. # Notes - All crossovers and RSI level checks should occur on candle close to avoid false signals. - Ensure synchronization between timeframes. - Allow switching timeframe parameters, entry thresholds, and trade management parameters via input variables. - Maintain clear trade identification via magic numbers and comments for multi-instance management. - Dashboard must be responsive and resource-efficient. Your solution should produce a reliable, customizable, and professional-grade MT5 Forex Robot implementing the strategy precisely as specified.

Advanced QBCore Hunting Script

Create an advanced hunting script for the QBCore framework in FiveM that significantly enhances the basic hunting mechanics by adding realistic animal behaviors, tracking, skinning, harvesting, configurable spawn rates, inventory and crafting integration, and multiplayer synchronization. Key Features and Requirements: - **Realistic Animal AI:** Implement animals that display natural behaviors such as fleeing when threatened, grazing peacefully, and protecting their young. Animals should roam dynamically within defined areas. - **Tracking Mechanics:** Allow players to track animals by detecting and following footprints, blood trails, or other visual/environmental signs. Provide visual cues such as on-screen indicators or minimap markers to assist tracking. - **Skinning and Harvesting:** After an animal is successfully hunted and killed, enable players to skin it and harvest resources (meat, pelts, bones, etc.) which can be used later in crafting. - **Configurable Animal Spawning:** Create configuration files or modules that allow server administrators to set spawn locations, species types, and spawn rates for animals. This configuration should be easily editable and support multiple species with different behaviors. - **QBCore Inventory and Crafting Integration:** Integrate seamlessly with the QBCore inventory system so that harvested materials are correctly added to players’ inventories. Make harvested resources usable in the existing crafting system or extend crafting scripts as needed. - **Multiplayer Synchronization:** Ensure all hunting-related events—including animal movement, tracking cues, hunting success, harvesting, and resource distribution—are properly synchronized across all connected clients to maintain consistency in multiplayer environments. Steps to Implement: 1. **Animal Entity and Behavior Design:** Define animal NPCs with logic for roaming, feeding, fleeing, and family group protection behaviors. 2. **Tracking System:** Develop mechanics for tracking animal signs. Incorporate visual and possibly audio feedback, including minimap blips that update dynamically. 3. **Skinning & Harvesting Interaction:** Script interactions triggered on the death of animals that allow players to skin and gather resources with appropriate animations and item drops. 4. **Configurable Spawn System:** Develop a configuration module/file with clear documentation for adjusting spawn points, spawn rates, and animal types. 5. **QBCore Integration:** Hook into QBCore's inventory and crafting APIs to add harvested items and recipes. 6. **Networking & Sync:** Implement client-server architecture ensuring all events are propagated and consistent between players. Output Format: - Provide full Lua script files with comprehensive inline comments explaining the purpose and function of each part. - Include configuration files for animal spawning and behavior settings with example entries. - Supply clear installation instructions detailing where files go within a QBCore server and any dependencies or setup steps. - Include any required client and server resource files. Example Snippets to Include: - Code defining fleeing behavior when animals detect a player within a certain radius. - Sample configuration block showing animal spawn points, species, and spawn rates. Additional Notes: - The script must be compatible and non-conflicting with standard QBCore resources. - Focus on performance optimization to handle multiple animals and players without degrading server performance. - Structure features modularly; allow server admins to enable/disable key parts like tracking or skinning. Ensure the final output is ready for direct deployment on a FiveM QBCore server with no ambiguity in usage or installation.

Advanced Multi-Timeframe Forex Robot

You are to develop a professional and advanced Forex trading robot (Expert Advisor) for the MetaTrader 5 (MT5) platform that implements a multi-timeframe, swing trading, trend-following strategy based on the detailed specifications below. Strategy Details: 1. Timeframes & Indicators: - Daily (High Time Frame - HTF): * RSI: Period 25; Buy Level = 54; Sell Level = 46 * ATR: Period 14 - 1 Hour (Semi-HTF): * RSI: Period 25; Buy Level = 54; Sell Level = 46 * ATR: Period 14 - 15 Minutes (Low Time Frame - LTF): * RSI: Period 3; Buy Level = 26; Sell Level = 74 * ATR: Period 14 2. Entry Criteria: - Buy Entries: * HTF: Enter first buy when RSI 25 crosses above 54 from below 46, indicating trend start. * Semi-HTF: After HTF buy confirmation, enter second buy when Semi-HTF RSI crosses above 54 from below. * LTF: With Semi-HTF RSI above 54, enter buys on every RSI 3 crossing above 26 at candle close. - Sell Entries: * HTF: Enter first sell when RSI 25 crosses below 46 from above 54. * Semi-HTF: After HTF sell confirmation, enter second sell when Semi-HTF RSI crosses below 46 from above. * LTF: With Semi-HTF RSI below 46, enter sells on every RSI 3 crossing below 74 at candle close. 3. Exit Criteria: - Close all buy trades if HTF RSI crosses below 46. - Close all sell trades if HTF RSI crosses above 54. 4. Trade Management: - Lot size: Default 0.5% of account balance; allow manual lot size input defaulting to 1 lot. - Stop Loss: 2 x ATR (appropriate to trade’s timeframe). - Take Profit: 6 x ATR for HTF and Semi-HTF trades; 4 x ATR for LTF trades. - Breakeven: Optional activation at 2.5 x ATR + 0.5 x ATR buffer. - Daily Drawdown Limit: 4% of account balance (stop trading further during that day if exceeded). 5. Customization: - Allow all indicator parameters (periods, levels) and trade management settings (lot size, SL, TP, breakeven, drawdown limit) to be fully customizable via inputs. 6. Additional Features: - Assign unique magic number and trade comment to all trades. - Implement a professional-grade dashboard displaying: * Trend direction and signal status on all timeframes (Daily, 1H, 15m). * Account metrics including current profit/loss, drawdown, and equity information. 7. Performance & Reliability: - Optimize code to prevent memory leaks and array overflows. - Ensure efficient data handling to avoid lag. - Implement robust error handling and logging. Your solution should: - Follow best coding practices and include appropriate comments. - Use consistent naming conventions. - Ensure the EA is user-friendly with clear input options and intuitive interface. # Output Format Provide the full source code of the MT5 Expert Advisor in MQL5 language. Include detailed comments for every main section and important logic. Provide explanations or notes about how customization parameters map to the strategy. # Notes - Strictly implement candle close RSI crosses for entering trades on LTF. - Ensure trades are entered only if the higher timeframe RSI conditions remain valid. - Consider ATR values of the respective timeframe when calculating SL and TP. - The dashboard should update live and be visually clear without clutter. Create this Expert Advisor code accordingly.

Page 52 of 68

    Coding Prompts - Learning AI Prompts | Elevato