Coding
814 prompts available
Advanced QBCore Towing Script
Create an advanced towing script for FiveM that integrates seamlessly with the QBCore framework. The script should enable players to dynamically tow vehicles within the game world, providing realistic interactions, physics, and animations. It must support the following capabilities: - Securely attach and detach vehicles to tow trucks or other designated towing vehicles. - Implement realistic physics behavior and towing animations. - Provide intuitive, user-friendly controls and commands to start and stop towing. - Ensure compatibility with QBCore's standard events, player data structures, and conventions. - Include robust error handling to address cases such as invalid vehicle targets, unreachable vehicles, or improper tow states. The code must be modular and thoroughly commented to clarify functionality, enabling easy customization and extension by other developers. # Steps 1. Identify relevant QBCore event hooks, player data accesses, and vehicle data accesses that relate to towing mechanics. 2. Develop functions for attaching and detaching vehicles with realistic physics and animation effects. 3. Map player commands and controls to these towing actions with clear feedback. 4. Test all towing scenarios comprehensively, including different vehicle models, failure states, and release locations. 5. Optimize for performance and responsiveness within a live FiveM server instance. # Output Format Deliver the complete source code as a single, standalone `.lua` file. This file should be ready for direct inclusion as a QBCore FiveM server resource. The script must start with detailed instructions covering installation, usage, and dependencies, followed by well-commented, modular code implementing all specified features. # Notes - The script must target the latest stable versions of QBCore and FiveM as of 2024. - Follow best practices to maintain multiplayer script stability, avoid race conditions, and minimize server load. - Ensure the tow mechanics feel realistic and intuitive to users. - Include safeguards against towing inappropriate vehicles or executing invalid actions.
Advanced Multi-Timeframe Forex Robot MT5
Develop a professional and advanced Multi Timeframes Forex Robot for MT5 based on the following detailed swing trading, trend-following, and multi-timeframe analysis strategy. Strategy Overview: Timeframes and Indicators: - Daily timeframe (HTF): - RSI: 25-period with levels 46 (sell) and 54 (buy) - ATR: 14-period - 1-hour timeframe (Semi HTF): - RSI: 25-period with levels 46 (sell) and 54 (buy) - ATR: 14-period - 15-minute timeframe (LTF): - RSI: 7-period with levels 26 (buy) and 74 (sell) - ATR: 14-period Buy Entry Logic: 1. HTF: Enter first buy when RSI 25 crosses above 54 from below 46, signaling uptrend start; proceed to semi HTF. 2. Semi HTF: Confirm HTF RSI remains above 54; enter buy when semi HTF RSI crosses above 54 from below. 3. LTF: Confirm semi HTF RSI above 54; enter buy on RSI 7 crossing above 26 at candle close; take all valid RSI 7 crosses maintaining semi HTF RSI restriction. 4. Close all buy trades if HTF RSI crosses below 46 (trend reversal). Sell Entry Logic: 1. HTF: Enter first sell when RSI 25 crosses below 46 from above 54, signaling downtrend start; proceed to semi HTF. 2. Semi HTF: Confirm HTF RSI remains below 46; enter sell when semi HTF RSI crosses below 46 from above. 3. LTF: Confirm semi HTF RSI below 46; enter sell on RSI 7 crossing below 74 at candle close; take all valid RSI 7 crosses maintaining semi HTF RSI restriction. 4. Close all sell trades if HTF RSI crosses above 54 (trend reversal). Trade Management: - Lot Size: Base lot size at 0.5% of account per trade, with manual override option for fixed lot size (default 1 lot). - Stop Loss: 2x ATR - Take Profit: 6x ATR for HTF and semi HTF trades; 4x ATR for LTF trades. - Optional Breakeven: Activate at 2.5x ATR plus 0.5x ATR buffer. - Daily Drawdown Limit: 4% maximum. Customization and Additional Features: - All indicator parameters and trade management settings fully customizable. - Incorporate magic number and custom trade comment for identification. - Implement a professional-grade dashboard displaying: - Trend direction and signal status across all three timeframes - Current account profit/loss, drawdown, and equity information Technical Requirements: - Ensure high optimization to prevent memory leaks and array overflows. - Avoid any lagging through efficient data handling and error catching. - Implement comprehensive error handling and recovery mechanisms. Instructions: - Begin by logically reasoning through the multi-timeframe signal conditions and trade execution hierarchy. - Ensure synchronization between HTF, semi HTF, and LTF signals before placing trades. - Account for proper candle close timing when applying RSI crossing conditions. - Integrate all trade management parameters dynamically using ATR values. - Design the dashboard to be clear, informative, and non-intrusive. - Test for edge cases such as sudden RSI level shifts or indicator calculation errors. Output Format: - Provide the complete MT5 Expert Advisor code implementing the above strategy in MQL5 language. - Include detailed comments within the code explaining each logic segment. - Supply instructions for customizing indicator and trade parameters. - Provide notes on optimization techniques used and error handling strategies implemented. Example snippet (placeholder): // Check Daily RSI cross above 54 if(RSI_Daily_Previous < 54 && RSI_Daily_Current > 54 && RSI_Daily_Previous < 46) { // Initiate buy entry logic } Maintain professional coding standards and best practices suitable for a commercial-grade trading robot.
Advanced QBCore Zombie Script
Create an advanced QBCore zombie script for FiveM that allows zombies to spawn in the game environment. Key features include: 1. Zombie Spawn Mechanics: - Implement random spawn locations for zombies that are triggered by player actions or time intervals. - Ensure that zombies spawn in both urban and rural areas to provide diverse gameplay experiences. 2. Looting System: - Allow players to loot zombies after defeating them. - Zombies should have a chance to drop any item available in the game, including weapons, consumables, and crafting materials. - Incorporate a loot table that randomly selects the items dropped from a predefined list. 3. Advanced Enemies: - Introduce different types of zombies with unique attributes (e.g., speed, health, attack power) to increase challenge. - Consider adding special effects, such as zombies that explode or have unique abilities. 4. Integration with QBCore: - Ensure all new functionalities are compatible with the existing QBCore framework. - Implement proper server-side and client-side event handling to manage zombie behavior and player interactions. 5. Performance Considerations: - Optimize the script to ensure it does not negatively impact server performance, especially during peak player times. - Include debugging options that can be toggled on or off for testing purposes.
Advanced Multi-Timeframe MT5 EA
You are an expert financial trading strategist and software developer with 55 years of experience in MQL5 scripting and algorithmic trading. Your task is to create a fully autonomous Expert Advisor (EA) for MetaTrader 5 implementing a multi-timeframe scalping strategy using the 30-minute, 15-minute, and 5-minute charts simultaneously. The EA must utilize three technical indicators: Exponential Moving Average (EMA), Average True Range (ATR), and Relative Strength Index (RSI) to determine entry and exit points for buy and sell trades. The trading logic should be deeply informed by decades of coding and market experience, incorporating robust technical analysis principles. A model strategy example includes: - 30m timeframe: Use EMA for trend direction and ATR-based SuperTrend as a trend filter. - 15m timeframe: Use EMA9 and EMA21 for trend bias along with RSI with a 7-period setting. - 5m timeframe: Use SuperTrend (with ATR 7 × 2) and ATR for dynamic stop sizing. - Exit strategy: Aim for a small fixed take profit target between 0.6× and 1.2× ATR(15m), maintaining approximately a 1:1.5 risk-reward ratio. Close positions if the 30m RSI falls below 45 or the 5m SuperTrend changes direction. - Implement a smart, dynamic trailing stop loss to secure profits based on indicator values. - Implement pyramiding with up to 3 positions, allowing additional entries if the trend remains favorable and aligns with the existing position direction. Additional requirements: - Use proper MQL5 coding standards ensuring full compilability in MetaEditor without errors. - Calculate lot size dynamically based on a RiskPercent parameter. - Assign the EA's magic number using the current date for uniqueness. - Include extensive comments on all tunable parameters including take profit, stop loss, trailing stop loss, pyramiding limits, and risk management. The goal is to deliver a production-ready, fully-commented MQL5 EA script that applies this advanced multi-timeframe scalping strategy effectively and autonomously on MetaTrader 5. # Steps 1. Define input parameters for risk percentage, timeframes, indicator settings, take profit, stop loss, trailing stop, pyramiding limits, and others. 2. Initialize EMA, ATR, RSI, and SuperTrend indicators on the required timeframes. 3. Implement logic to detect trend direction on multiple timeframes using the indicators. 4. Write entry conditions based on EMA crossovers, RSI thresholds, and SuperTrend confirmations. 5. Calculate dynamic stop loss and take profit levels using ATR-based formulas. 6. Implement smart trailing stop loss that adjusts based on indicator changes. 7. Code position pyramiding to allow up to three entries in the same trend direction, verifying trend continuation before each addition. 8. Calculate lot size dynamically according to the RiskPercent and account balance. 9. Assign a magic number dynamically from the current date to avoid conflicts. 10. Include extensive parameter comments to guide future tuning. 11. Perform thorough error checking and ensure code optimization and MetaEditor compatibility. # Output Format Provide the complete MQL5 source code for the Expert Advisor as a single text block ready to compile. Include detailed in-line comments explaining the purpose and functioning of each parameter, block of code, and trading logic decision point. # Notes - Ensure the EA handles error conditions gracefully. - Use best practices for coding safety and performance. - Prioritize maintainability and readability through comments and clear structure. - The EA should autonomously manage all orders and avoid manual intervention. - Maintain strict adherence to the specified multi-timeframe, multi-indicator strategy.
Advanced NUI Pause Menu
Create a detailed system prompt to guide the development of an advanced pause menu using NUI (New User Interface) for a GTA game modification. The pause menu must include the following features: - Character Information: Display player stats, health, armor, and other relevant personal data. - Jobs: Show current job, job levels, and job-related tasks or progress. - Gangs and Crews: List the player's affiliations, ranks, and member info. - GTA Map Button: Provide a button that opens the GTA in-game map for navigation. The interface should be user-friendly, visually coherent, and efficiently integrate these features within the pause menu system. # Steps 1. Design the NUI layout to accommodate all requested components clearly and accessibly. 2. Implement character information display with real-time updates. 3. Develop job section that dynamically reflects the player’s current job status. 4. Create gangs and crews section showing memberships and hierarchy. 5. Add a GTA map button that opens the in-game map overlay when clicked. 6. Ensure smooth interaction and transitions between these features within the pause menu. # Output Format Provide the system prompt as a structured JSON object containing clear instructions suitable for a developer to implement the advanced pause menu with NUI. Include details on UI elements, data bindings, and interactions.
Advanced QBox HUD
Create an advanced, fully customizable QBox HUD that integrates seamlessly with QBcore, QBox, and OX frameworks. The HUD should include both a car HUD and a normal HUD, following the exact design aesthetics depicted in the provided reference image. Your solution must offer extensive, user-friendly configuration options, allowing users to tailor colors, layouts, and displayed information to their preferences. Ensure the HUD is optimized for compatibility and high performance across all supported platforms. # Steps 1. Carefully analyze the reference image to replicate all visual style elements consistently for both car HUD and normal HUD components. 2. Architect the HUD components modularly, supporting customization of colors, layout positioning, displayed data, and other visual elements. 3. Implement seamless integration layers for QBcore, QBox, and OX frameworks, ensuring robust data retrieval and event handling for real-time HUD updates. 4. Create comprehensive configuration files or an easy-to-use configuration interface enabling users to modify HUD settings without code changes. 5. Rigorously test the HUD in varied usage scenarios (car HUD and normal HUD) to verify stability, responsiveness, and minimal resource consumption. # Output Format Provide a complete, well-structured source code package including: - The HUD implementation source files. - Detailed configuration templates illustrating all customizable options. - Comprehensive documentation covering installation, configuration, customization, and integration instructions for QBcore, QBox, and OX frameworks. The documentation should be clear, precise, and help users achieve full customization and seamless integration with minimal effort.
Advanced Quantum Processing App
Create a comprehensive, advanced Python application featuring a user-friendly web interface that enables quantum processing and quantum algorithms execution, vector processing, data transformation tasks, and API processing capabilities. The application should be fully automated and seamlessly deployable on Google Firebase (specifically using Firebase Studio). It must efficiently utilize the provided data to perform these functionalities. The solution should include: - Quantum Processing Module: Implement core quantum computation algorithms and simulation functionalities, leveraging suitable quantum computing libraries or frameworks. - Vector Processing: Efficient handling and processing of vectorized data, including necessary mathematical transformations and operations. - Data Transformation: Robust data ingestion, cleaning, normalization, and transformation pipelines suitable for both structured and unstructured data. - API Processing: Design and integration of RESTful or GraphQL APIs for data input/output and system interaction. - Web Interface: A responsive, intuitive UI allowing users to execute quantum and vector operations, visualize results, and manage data inputs and outputs. - Automation & Deployment: Full automation of deployment workflows on Google Firebase, ensuring scalability, authentication/security, and real-time data updates as applicable. Steps to accomplish the task: 1. Analyze the provided data to understand its structure and processing requirements. 2. Design the architecture incorporating the quantum processing engine, vector processing, data transformation layers, and API endpoints. 3. Develop the Python backend integrating quantum computing libraries (such as Qiskit or Cirq) and vector/data processing modules. 4. Build the web interface framework (using frameworks like Flask/Django with React or Vue.js) that interfaces with backend APIs. 5. Implement authentication, real-time database, and hosting using Google Firebase services within Firebase Studio. 6. Automate deployment, testing, and continuous integration pipelines. 7. Conduct thorough testing to ensure correctness, performance, and security. Output Format: Provide the complete, well-structured Python codebase along with configuration files for Google Firebase deployment. Include detailed documentation covering installation, usage, and deployment instructions. The web interface source code and backend API definitions should be clearly presented. Any dependencies and environment setup steps must be documented. Example: - A Python script implementing a quantum Fourier transform using Qiskit. - Flask API endpoints handling vector transformations. - React components for data visualization and user input. - Firebase configuration files including authentication rules and hosting setup. Notes: - Ensure the application is modular and extensible. - Prioritize security best practices for web and API components. - Optimize performance for quantum simulations and vector computations. - The solution must be compatible with the latest Google Firebase Studio environment and tools.
Advanced Parabolic SAR EA
Create an Expert Advisor (EA) for algorithmic trading that employs the Parabolic SAR indicator as its core technical analysis tool. The EA must leverage advanced quantitative finance concepts inspired by MIT's course "18.S096 Topics in Mathematics with Applications in Finance," integrating sophisticated risk management frameworks involving stochastic calculus, martingale theory, portfolio optimization, or machine learning principles where applicable. It should dynamically adjust trade entries and exits based on Parabolic SAR signals combined with these frameworks, ensuring robust performance across diverse market conditions. # Steps 1. Implement the Parabolic SAR indicator to generate clear entry and exit signals. 2. Identify and incorporate relevant advanced quantitative finance methods from the MIT course that enhance risk assessment and management. 3. Develop dynamic risk management modules including techniques such as probabilistic risk assessment, dynamic position sizing based on volatility or drawdown, and advanced portfolio optimization. 4. Seamlessly integrate these risk management modules with Parabolic SAR signals to form coherent, adaptive trading logic. 5. Write clean, well-structured, and performant code for MetaTrader (MQL4/MQL5), with detailed but concise comments only where critical to understanding sophisticated logic or advanced quantitative concepts. 6. Include thorough backtesting logic accounting for realistic market conditions including transaction costs and slippage. # Output Format Deliver the full source code of the Expert Advisor in MQL4 or MQL5 suitable for MetaTrader platforms. Ensure the code is comprehensively commented to clarify how Parabolic SAR is implemented and how advanced quantitative finance principles and risk management strategies are embedded. Provide a detailed summary explaining the EA's overall logic, the role of Parabolic SAR signals, the integration of MIT-inspired quantitative methods, and instructions for setup and parameter tuning to adapt to different market regimes. # Notes - Prioritize advanced, mathematically grounded risk management over naive or fixed trade sizing. - Risk controls must dynamically adapt to evolving market conditions, leveraging stochastic calculus or martingale theory concepts where relevant. - Account for practical trading constraints such as order execution latency, market impact, and strict risk limits. - Minimize comments to only articulate complex or novel parts of the code and methodologies. - Ensure tight coupling between Parabolic SAR signals and quantitative risk frameworks to optimize trade decision quality.
Advanced React Dark UI
Create an advanced and optimized React component that renders a visually interactive HTML interface. The design should embody a modern dark aesthetic with a clean, minimalist layout. Utilize the provided data (replace {{Data}} with the actual dataset) to dynamically generate interactive elements that enhance user engagement and usability. Key Requirements: - Use React functional components and hooks where appropriate. - Implement a modern dark theme with harmonious colors, subtle shadows, and smooth transitions. - Maintain a minimalist interface with ample whitespace and clear typography. - Ensure the interface is fully responsive and accessible. - Incorporate interactivity such as animations, tooltips, or dynamic filtering/sorting based on the data. - Optimize the component for performance, minimizing unnecessary re-renders. Steps: 1. Analyze the provided data structure to determine how best to represent it visually. 2. Design the UI layout focusing on simplicity and usability. 3. Implement the React components with modular, reusable code. 4. Apply styling using CSS-in-JS (e.g., styled-components) or CSS modules, emphasizing the dark theme and minimalist aesthetics. 5. Add interactive features that provide intuitive user control over the data visualization. 6. Test responsiveness and accessibility compliance. Output Format: Provide the complete React component code including imports, the main component, styling, and any helper functions or subcomponents. Include brief comments explaining key parts of the implementation.
Advanced SMC Pine Script
Create an advanced Pine Script based on Smart Money Concepts (SMC). Pine Script is a domain-specific language used on the TradingView platform for developing custom technical indicators and trading strategies. The script should incorporate key elements of SMC, such as market structure, order blocks, liquidity pools, fair value gaps, and institutional buying and selling zones. It should be designed to help traders identify potential reversals, breakouts, and trend continuations supported by smart money activity. # Steps 1. Analyze and incorporate market structure: highs, lows, and swing points. 2. Detect order blocks—areas where institutional traders have placed significant orders. 3. Identify liquidity zones where stop-loss hunts might occur. 4. Calculate and highlight fair value gaps. 5. Integrate alerts or signals for potential trade entries or exits based on these concepts. 6. Ensure code is optimized and well-commented for readability. # Output Format Provide the full Pine Script code with comments explaining each major section and its purpose. The script should be compatible with the latest version of Pine Script (version 5). Additionally, include a brief summary of how the script works and how traders can use it effectively within TradingView.
Advanced Parking Script
Create a detailed and functional script that simulates an advanced parking system. The script should handle various features such as parking space allocation, real-time availability updates, vehicle entry and exit management, and payment processing if applicable. The system should be efficient, user-friendly, and able to scale for different parking lot sizes. Key features to include: - Dynamic allocation of parking spots based on vehicle size and availability. - Real-time tracking and updating of free and occupied spaces. - Management of vehicle entries and exits with timestamp logging. - Option for integrating payment processing for parking fees. # Steps 1. Define data structures for parking spots and vehicles. 2. Implement functions to allocate and free parking spots. 3. Add real-time availability tracking. 4. Manage vehicle entry and exit with timestamps. 5. Incorporate payment module if required. # Output Format Provide the complete script code with comments explaining each function and logic used.
Advanced React Frontend
You are tasked with developing an advanced-level frontend project using React. Follow these detailed instructions to create a well-structured, efficient, and visually attractive user interface. Requirements: - Use the provided slices as the structural foundation for the frontend. - Implement styling primarily with Tailwind CSS to ensure a modern and responsive design. - Integrate React Router DOM for handling routing between different pages or components. - Use React Quill as a rich text editor for article components. - Create an advanced Sidebar slice/component with enhanced functionality and design. - Incorporate additional UI libraries and components as needed to improve design aesthetics and user experience. - Introduce innovative and meaningful features or design elements on the side or elsewhere in the layout to elevate the project sophistication. # Steps 1. Analyze the given slices and plan the component hierarchy. 2. Set up a React project with Tailwind CSS configured. 3. Integrate React Router DOM to manage navigation. 4. Implement React Quill for rich text editing within articles. 5. Design and develop the Sidebar slice with advanced features. 6. Enhance overall UI/UX using other well-known UI libraries (e.g., Headless UI, Radix UI, or Material UI) alongside Tailwind CSS. 7. Add innovative components or features to the side sections to showcase advanced frontend capabilities. 8. Ensure code is clean, modular, and optimized for performance. # Output Format Provide the complete React project code snippets that demonstrate: - Tailwind CSS implementation with consistent styling. - Routes configuration using React Router DOM. - Article component using React Quill editor. - Advanced Sidebar component. - Additional UI elements from other UI libraries. - Explanations or comments describing key implementation details and your innovative additions.