Back to Learning

Coding

814 prompts available

Advanced Forex cBot

Create an advanced trading cBot tailored for forex trading on the Pepperstone broker platform. This bot must integrate multi-factor entry signals to confirm trade entries, utilizing advanced market analysis with confidence scoring to enhance decision accuracy. Implement a sophisticated dynamic position sizing mechanism that adjusts based on real-time risk assessment and market volatility. Design a multi-level partial profit-taking system coupled with a dynamic trailing stop that adjusts according to market conditions to optimize exit strategies. Additionally, incorporate a performance monitoring and reporting module that tracks key metrics and trade outcomes. Embed a self-learning component enabling the cBot to adapt its strategies dynamically based on historical and ongoing market data, improving over time. Ensure all features work cohesively to enhance overall trading performance, risk management, and adaptability in forex markets. # Steps 1. Develop entry signal logic combining multiple indicators or data points to confirm trade setups. 2. Create confidence scoring system to evaluate market conditions and support entry decisions. 3. Architect position sizing algorithm that factors in current risk levels and market volatility. 4. Implement multi-level partial profit-taking rules to secure profits incrementally. 5. Integrate dynamic trailing stop adjustments responsive to price movements and volatility. 6. Build a dashboard or logging system for continuous performance monitoring and detailed reporting. 7. Design and embed a machine learning or adaptive algorithm that modifies parameters based on past trades and detected market shifts. 8. Test compatibility specifically with Pepperstone platform APIs and forex market data. # Output Format Provide the complete cBot source code with comments explaining each major component and algorithmic decision. Include instructions for deployment on the Pepperstone trading platform and usage guidelines for monitoring and adjustment mechanisms. If the code relies on external libraries or frameworks, list and explain their roles clearly. # Notes - Ensure the self-learning system does not compromise risk management principles. - Maintain clear modularity to facilitate future enhancements or debugging. - Provide sample configuration settings representing typical forex trading scenarios. # Response Formats // Extracts the full prompt and metadata as valid JSON. {"prompt":"Create an advanced trading cBot tailored for forex trading on the Pepperstone broker platform. This bot must integrate multi-factor entry signals to confirm trade entries, utilizing advanced market analysis with confidence scoring to enhance decision accuracy. Implement a sophisticated dynamic position sizing mechanism that adjusts based on real-time risk assessment and market volatility. Design a multi-level partial profit-taking system coupled with a dynamic trailing stop that adjusts according to market conditions to optimize exit strategies.\n\nAdditionally, incorporate a performance monitoring and reporting module that tracks key metrics and trade outcomes. Embed a self-learning component enabling the cBot to adapt its strategies dynamically based on historical and ongoing market data, improving over time. Ensure all features work cohesively to enhance overall trading performance, risk management, and adaptability in forex markets.\n\n# Steps\n\n1. Develop entry signal logic combining multiple indicators or data points to confirm trade setups.\n2. Create confidence scoring system to evaluate market conditions and support entry decisions.\n3. Architect position sizing algorithm that factors in current risk levels and market volatility.\n4. Implement multi-level partial profit-taking rules to secure profits incrementally.\n5. Integrate dynamic trailing stop adjustments responsive to price movements and volatility.\n6. Build a dashboard or logging system for continuous performance monitoring and detailed reporting.\n7. Design and embed a machine learning or adaptive algorithm that modifies parameters based on past trades and detected market shifts.\n8. Test compatibility specifically with Pepperstone platform APIs and forex market data.\n\n# Output Format\n\nProvide the complete cBot source code with comments explaining each major component and algorithmic decision. Include instructions for deployment on the Pepperstone trading platform and usage guidelines for monitoring and adjustment mechanisms. If the code relies on external libraries or frameworks, list and explain their roles clearly.\n\n# Notes\n\n- Ensure the self-learning system does not compromise risk management principles.\n- Maintain clear modularity to facilitate future enhancements or debugging.\n- Provide sample configuration settings representing typical forex trading scenarios.","name":"Advanced Forex cBot","short_description":"Develop an advanced forex trading cBot with multi-factor signals, dynamic sizing, intelligent exits, and adaptive learning for Pepperstone.","icon":"ChartBarIcon","category":"programming","tags":["Forex","Trading Bot","Algorithmic Trading","Pepperstone"],"should_index":true}

Advanced ESX Phone Script

Create an advanced script for a Phone system in the ESX framework used in FiveM, focusing on robust features and functionality. Ensure the script handles user authentication, contact management, messaging, calling, and integration with other ESX resources effectively. # Steps 1. Design the database schema to store phone contacts, messages, and call logs. 2. Implement user authentication to link phone data with the player's ESX identity. 3. Develop contact management features allowing adding, editing, and deleting contacts. 4. Create messaging functionality supporting sending, receiving, and storing text messages. 5. Build call handling features including making, receiving, and ending calls, with proper state management. 6. Integrate with other ESX resources (like jobs, inventory) to enable advanced features (e.g., emergency calls). 7. Ensure the script is optimized for performance and includes error handling. 8. Include comments and documentation for maintainability. # Output Format Please provide the full Lua script code for the ESX Phone system, accompanied by documentation comments inline. Additionally, supply any necessary SQL commands to set up the database tables. Organize the script into sections with clear headings and maintain clean code structure to enhance readability.

Advanced Forex EA

Create a comprehensive and professional MQL5 Expert Advisor (EA) script for MetaTrader 5 that implements an advanced Forex trading bot integrating multiple technical indicators, adaptive risk management, and time-based trading restrictions as specified below. --- ### Core Requirements: - Market sensing using: EMA (Exponential Moving Average), RSI (Relative Strength Index), MACD (Moving Average Convergence Divergence), Stochastic Oscillator, and volume analysis. - Adaptive trade execution with automated buy and sell order placement based on combined indicator signals. - Dynamic lot sizing calculated as 1% of the current account balance. - Trading restricted strictly within customizable New York session hours (`START_HOUR` to `END_HOUR`). - Detection and avoidance of trading during scheduled news events affecting the symbol using SymbolInfo() or MQL5 news APIs. - Adaptive Take Profit (TP) and Stop Loss (SL) levels appropriate for minimum account balances as low as $20. - Automatic reversal handling by detecting market reversals through divergences and indicator signals, closing existing positions on reversal, then opening reversed trades accordingly. --- ### Global Variables (declare globally at the top of the source file): - `EMA_PERIOD` (int, e.g., 20) - `RSI_PERIOD` (int, e.g., 14) - `OVERBOUGHT_THRESHOLD` (float, e.g., 70) - `OVERSOLD_THRESHOLD` (float, e.g., 30) - `START_HOUR` (int, New York session start hour in broker time or specified timezone) - `END_HOUR` (int, New York session end hour) - `MIN_ACCOUNT_BALANCE` (double, minimum account balance to enable trading, e.g., 20.0) --- ### EA Lifecycle Functions Requirements: 1. **OnInit()** - Validate all input parameters for acceptable ranges. - Initialize and attach all required indicators: EMA, RSI, MACD, Stochastic Oscillator. - Calculate initial adaptive lot size as 1% of current account balance. 2. **OnDeinit()** - Properly detach and release all indicator resources. - Free any allocated memory/resources to prevent leaks. 3. **News Detection Module** - Implement or integrate a news detection method using MQL5 news APIs or SymbolInfo. - Prevent opening of new trades during detected news events affecting the current symbol within session hours. 4. **OnTick() or Custom Calculate() Function** - On every tick or new bar: - Calculate current EMA, RSI, MACD histogram, Stochastic %K and %D, and analyze volume. - Confirm current time is within `START_HOUR` and `END_HOUR`. - Confirm no active news event. - Generate trade signals based on combined indicator criteria: - **Buy Signal:** Price > EMA, RSI < OVERSOLD_THRESHOLD, bullish divergences on MACD and RSI, Stochastic %K crossing above %D in oversold zone, volume supporting upward momentum. - **Sell Signal:** Price < EMA, RSI > OVERBOUGHT_THRESHOLD, bearish divergences on MACD and RSI, Stochastic %K crossing below %D in overbought zone, volume supporting downward momentum. - Execute trading operations: - Open trades with lot size = 1% of account balance. - Set SL and TP dynamically, compatible with minimum balances. - Modify or close existing orders as necessary. - Detect market reversals using divergences and indicator signals; - On reversal, close existing trades and open new trades in the opposite direction. 5. **Order Management Functions:** - Robust wrappers for order placement (`OrderSend()` equivalent) handling SL and TP. - Safe order closing functions handling errors properly. --- ### Additional Requirements: - Comprehensive inline code comments describing logic, parameters, and trading rationale. - Guidance comments on optimizing key parameters (EMA, RSI periods, thresholds). - Backtesting support: restrict testing data or trading to New York session hours or user-defined session. - Support demo account operation for validation. - Robust error handling and parameter validation throughout. - Full compliance with MQL5 coding standards and best practices. --- # Output Format - Deliver a complete, well-structured, fully commented MQL5 EA source code file (`.mq5`). - Modular code organization: initialization, indicator calculations, signal generation, order execution, news detection, reversal handling, cleanup. - Document all global variables and input parameters at the top of the file clearly. --- # Notes - Use placeholders or symbolic constants where appropriate to maintain clarity. - Ensure the EA is immediately ready for deployment and thorough backtesting within MetaTrader 5. --- Ensure the output is a single `.mq5` source file text implementing all above specifications precisely and professionally.

Advanced ESX Side Quests

Generate advanced, highly optimized side quests suitable for players on a FiveM server that uses the ESX framework, incorporating ox_lib and ox_inventory. These side quests should provide engaging ways for players to earn money. Ensure that the quests are designed with performance optimization in mind and make full use of the features and mechanics offered by ESX, ox_lib, and ox_inventory. Requirements: - Compatible with ESX framework. - Utilize ox_lib and ox_inventory functionalities. - Advanced quest mechanics with multiple steps or objectives. - Efficient and optimized code and design to minimize performance impact. - Balanced rewards to provide meaningful monetary gain without disrupting server economy. Steps: 1. Define various side quest scenarios (e.g., delivery missions, item gathering, NPC interactions). 2. Integrate quest progress tracking using ox_lib. 3. Manage inventory interactions and item rewards through ox_inventory. 4. Include conditional branching or randomization for replayability. 5. Optimize resource usage, minimizing unnecessary processing. Output Format: Provide a detailed description of each side quest including objectives, NPCs involved, inventory items used or rewarded, and any scripting considerations for optimization and integration with ESX, ox_lib, and ox_inventory. Include example code snippets if applicable. Example: - Quest name: "Courier Run" - Objective: Deliver packages to multiple NPCs within a time limit. - NPCs: Package sender, recipients at different locations. - Inventory usage: Packages added/removed using ox_inventory. - Rewards: Monetary reward upon successful delivery. - Optimization notes: Use event-driven updates and minimize server callbacks. Notes: Focus on seamless player experience, server performance, and maintainability of the quest scripts.

Advanced Forex EA MQL5

Create a comprehensive MQL5 Expert Advisor (EA) script for MetaTrader 5 that implements an advanced Forex trading bot integrating multiple technical indicators, adaptive risk management, and time-based trading restrictions as specified below. --- ### Core Requirements: - Implement market sensing using EMA (Exponential Moving Average), RSI (Relative Strength Index), MACD (Moving Average Convergence Divergence), Stochastic Oscillator, and volume analysis. - Perform adaptive trade execution with automated buy and sell order placement based on combined indicator signals. - Calculate dynamic lot sizing as 1% of the current account balance. - Restrict all trade executions strictly within customizable New York session hours (`START_HOUR` to `END_HOUR`). - Detect and avoid trading during scheduled news events affecting the symbol using SymbolInfo() or MQL5 news APIs. - Implement adaptive Take Profit (TP) and Stop Loss (SL) levels appropriate even for minimum account balances as low as $20. - Support automatic reversal handling by detecting market reversals through divergences and indicator signals, closing existing positions on reversal, then opening reversed trades accordingly. --- ### Global Variables (declare globally, e.g., in `StrategyTester.mqh`): - `EMA_PERIOD` (integer, e.g., 20) - `RSI_PERIOD` (integer, e.g., 14) - `OVERBOUGHT_THRESHOLD` (integer/float, e.g., RSI/Stochastic upper bound) - `OVERSOLD_THRESHOLD` (integer/float, e.g., RSI/Stochastic lower bound) - `START_HOUR` (integer, New York session start hour in broker time or specified timezone) - `END_HOUR` (integer, New York session end hour) - `MIN_ACCOUNT_BALANCE` (float, minimum balance to enable trading, e.g., 20.0) --- ### EA Lifecycle Functions Requirements: 1. **`OnInit()`** - Validate all input parameters ensuring they are in acceptable ranges. - Initialize and attach all required indicators: EMA, RSI, MACD, Stochastic Oscillator. - Calculate initial adaptive lot size as 1% of the current account balance. 2. **`OnDeinit()`** - Clean up and detach the indicators properly. - Free any allocated resources to prevent memory leaks. 3. **News Detection Module** - Implement or integrate a news detection method that retrieves scheduled news events affecting the trading symbol. - Ensure the EA does not open new trades during detected news events within session hours. 4. **`OnTick()` or Custom `Calculate()` Function** - On each tick or new bar, compute current values for EMA, RSI, MACD histogram, Stochastic %K and %D, and analyze volume. - Verify current time is within `START_HOUR` and `END_HOUR` and that no news event is currently active. - Generate trade signals based on combined indicator criteria: - **Buy Signal:** When price > EMA and RSI < oversold threshold, combined with bullish divergences on MACD and RSI, Stochastic %K crossing above %D in oversold zone, and volume supporting upward momentum. - **Sell Signal:** When price < EMA and RSI > overbought threshold, combined with bearish divergences on MACD and RSI, Stochastic %K crossing below %D in overbought zone, and volume confirming downward momentum. - Execute trading operations: - Open new orders with lot size calculated as 1% of account balance. - Set SL and TP levels dynamically, mindful of the minimum account balance. - Modify or close existing orders as needed. - Detect market reversals via divergence and indicator signals: - If detected, close existing trades and open new trades in the opposite direction. 5. **Order Management Functions:** - Implement robust wrappers for `OrderSend()` that handle order opening/modification with proper SL and TP. - Implement safe order closing functionality (akin to `OrderDelete()` by ticket), handling potential errors consistently. --- ### Additional Requirements: - Include comprehensive inline code comments articulating logic, parameters, and any mathematical or trading rationale. - Provide guidance on optimizing key parameters such as EMA and RSI periods, and threshold values. - Ensure compatibility with backtesting features within MetaTrader 5, restricting testing data to New York session hours or user-defined session. - Support demo account operation for live validation. - Apply robust error handling and parameter validation throughout the EA. - Adhere strictly to MQL5 programming standards and best practices. --- # Output Format - Deliver a complete, well-structured, and well-commented MQL5 EA source code file (.mq5). - Organize code modularly, separating: initialization, indicator calculations, signal generation, order execution, news detection, reversal handling, and cleanup. - Document all global variables and input parameters at the top of the source file. --- # Example Conceptual Behavior - Upon a new price bar or tick, the EA calculates EMA(20), RSI(14), MACD histogram, Stochastic %K and %D, and reads volume. - If price > EMA(20), RSI < 30, bullish divergences on MACD and RSI accompany stochastic %K crossing above %D in the oversold region, and volume confirms bullish sentiment during New York session hours (e.g., 14:30 to 21:00 EST), the EA opens a buy trade with lot size = 1% of account balance. - On reversal or bearish divergences, EA will close buy trades and open corresponding sell trades. - All trades include SL and TP dynamically set to fit minimum balances (from $20) suitably. --- Ensure the final product is a robust, expert-level Forex trading EA for MetaTrader 5 fulfilling all above specifications and ready for immediate deployment and backtesting.

Advanced ESX Zombie Script

Create a detailed and advanced ESX zombie script for FiveM, focusing on the following core features: 1. Zombie Spawn Mechanics: - Implement dynamic and random spawn locations for zombies triggered by player actions (e.g., entering specific zones) or set time intervals. - Ensure zombies spawn across diverse environments, including both urban and rural areas, to enhance gameplay variety. 2. Looting System: - Enable players to loot zombies after defeating them. - Design a loot table system where zombies have randomized chances to drop any in-game item, including weapons, consumables, and crafting materials. 3. Advanced Enemies: - Create multiple zombie types with distinct attributes, such as varied speed, health, and attack power. - Integrate unique zombie abilities or special effects, e.g., exploding zombies or those with special attacks. 4. ESX Framework Integration: - Ensure complete compatibility with the ESX framework, including proper server-side and client-side event management. - Manage player interactions and zombie behaviors using ESX conventions and event handlers. 5. Performance Optimization: - Optimize the script to minimize server load, especially during peak gameplay. - Incorporate debugging features that can be toggled on/off to facilitate testing without affecting performance. # Steps 1. Design the zombie spawning logic considering randomization and triggers. 2. Develop diverse zombie classes with unique stats and abilities. 3. Create a comprehensive loot table linked to zombie drops. 4. Integrate all features seamlessly with the ESX framework's architecture. 5. Optimize code for performance and add a debug toggle. # Output Format Provide the complete FiveM ESX Lua script code with clear comments and modular structure, including both server-side and client-side scripts. Include configuration sections for spawn behavior, loot tables, zombie types, and debugging options. Ensure the code is ready to be directly implemented or easily integrated into an existing ESX FiveM server environment.

Advanced Forex MQL5 EA

Create a comprehensive, expert-level MQL5 Expert Advisor (EA) script for MetaTrader 5 that fully implements an advanced Forex trading bot as specified below. The EA must integrate multiple technical indicators (EMA, RSI, MACD, Stochastic Oscillator, and volume analysis), adaptive risk management (dynamic lot sizing as 1% of account balance, dynamic TP and SL especially for minimum balances as low as $20), and strict time-based trading restrictions confined to customizable New York session hours (`START_HOUR` to `END_HOUR`). Market sensing must be implemented by calculating: - EMA with adjustable period (e.g., 20), - RSI with adjustable period (e.g., 14) and clearly defined `OVERBOUGHT_THRESHOLD` and `OVERSOLD_THRESHOLD`, - MACD histogram, - Stochastic Oscillator %K and %D, - Volume analysis. Trade execution criteria involve combining these indicator signals: - Buy signals are generated when price is above EMA, RSI is below oversold threshold, bullish divergences occur on MACD and RSI, stochastic %K crosses above %D in oversold zone, and volume supports upward momentum. - Sell signals are generated conversely when price is below EMA, RSI is above overbought threshold, bearish divergences are present on MACD and RSI, stochastic %K crosses below %D in overbought zone, and volume confirms downward momentum. The EA must support automatic reversal handling: detect market reversals via divergences and indicator signals, close existing positions accordingly and open reversed trades. It must avoid opening new trade orders during scheduled news events affecting the symbol, detected through SymbolInfo() or integrated MQL5 news APIs. Declare and initialize the following global variables at the top of the source file, clearly documented: - `EMA_PERIOD` (integer, e.g., 20), - `RSI_PERIOD` (integer, e.g., 14), - `OVERBOUGHT_THRESHOLD` (float/integer, e.g., 70), - `OVERSOLD_THRESHOLD` (float/integer, e.g., 30), - `START_HOUR` (integer, New York session start hour in broker or specified timezone), - `END_HOUR` (integer, session end hour), - `MIN_ACCOUNT_BALANCE` (float, e.g., 20.0). Structure the EA in modular fashion with the following key lifecycle functions and capabilities: 1. **OnInit()** - Validate input parameters. - Initialize and attach all indicators. - Calculate starting lot size as 1% of current account balance. 2. **OnDeinit()** - Properly detach indicators. - Free all allocated resources. 3. **News Detection Module** - Implement or integrate a method to detect scheduled news events affecting the symbol. - Prevent trade openings during such news events within session hours. 4. **OnTick() or equivalent compute function** - Upon each tick or new bar, update indicator values. - Confirm current time is within the defined session hours and no news event is active. - Generate and validate buy/sell signals as per combined indicator criteria. - Execute orders with proper lot sizing, adaptive SL and TP. - Handle existing trades and reversals. 5. **Order Management Wrappers** - Robust wrappers for order sending and modification including SL/TP management. - Safe order closing functionality with error handling. Additional Requirements: - Include comprehensive inline comments explaining all logic, parameters, and trading rationale. - Provide guidance on optimal key parameters (e.g., EMA and RSI periods, thresholds) in comments. - Ensure compatibility with MetaTrader 5 backtesting, including restricting data to the New York session. - Support demo account operation. - Apply robust error handling and input validations. - Follow MQL5 coding standards and best practices. # Output Format Provide a complete, well-structured `.mq5` source code file containing the fully implemented EA. Organize code modularly with distinct sections for initialization, indicator calculations, signal generation, order execution, news detection, reversal handling, and cleanup. Document all global variables and input parameters at the top of the file with clear, concise comments. # Notes - Time-based restrictions must respect broker time or be configurable to align with New York session times. - Dynamic lot sizing must adapt if account balance changes, always calculating 1% per trade. - TP and SL levels must be calculated adaptively, ensuring risk management even for minimal balances like $20. - News detection should be efficient and reliable, ideally using MQL5's native functions or accessible APIs. - Divergence detection logic must robustly identify reversals by comparing indicator trends against price action. Deliver the expert advisor ready for immediate deployment and thorough backtesting under MetaTrader 5.

Advanced Feature Implementation

Enhance the existing codebase by adding new, advanced, and production-ready features that significantly strengthen and extend its functionality. Implement multiple complex features with a strong focus on robustness, scalability, and maintainability. - Avoid any placeholder code, simplified implementations, TODO comments, or FIX ME notes. - Ensure each feature is thoroughly integrated and follows best practices for production environments. - Where appropriate, include comprehensive error handling, input validation, and performance optimizations. - Provide explanations for the design decisions, highlighting how each feature enhances the overall system. # Steps 1. Analyze the current code structure and identify areas where new advanced features can be integrated. 2. Design detailed implementations that go beyond basic functionality, ensuring complexity and high quality. 3. Implement multiple features with clean, readable, and fully operational production code. 4. Test each feature thoroughly and integrate seamlessly with existing components. 5. Document the new features clearly within the code and provide supplementary explanations if needed. # Output Format Provide the complete updated code with the implemented features, including any necessary supporting files or modules. Include inline comments and a brief summary describing each feature’s purpose and its impact on the codebase’s strength and capability.

Advanced Forex Scalper EA

Create a complete MQL5 Expert Advisor (EA) that implements an advanced forex scalping strategy based on the detailed framework provided. The EA must include: - Multi-timeframe analysis using M1, M5, and M15 chart data. - Calculation and use of core indicators: EMA (8, 21, 50), RSI(14), MACD(12,26,9), Bollinger Bands (20,2), plus secondary indicators: Stochastic and ATR. - Automated detection and scoring of dynamic support/resistance (S/R) lines using criteria such as touch count, reaction strength, recency, and volume. - Candlestick pattern recognition for patterns including Doji, Hammer, Shooting Star, Engulfing, Pin Bars, and Inside Bars, particularly at significant S/R levels. - Entry logic employing a confluence scoring system requiring at least 4 out of 6 conditions met, incorporating EMA21 bias on M5, RSI thresholds, MACD histogram direction, candlestick patterns with volume confirmation, and pullbacks to EMA or S/R. - An exit strategy with: 250pt dynamic basket hedge mechanisms for price reversal, multiple partial profit targets based on ATR multiples and S/R, adaptive stop loss that is initially ATR-based, moved to break-even + 10 pips after first target, trailing stops using EMA8, exits, including a 30-minute max closure before major news events. - Robust risk management: position sizing based on 1% account risk adjusted by ATR volatility and signal strength; daily loss limits; consecutive loss tracking with position size reduction. - Session optimization to trade primarily during London and New York sessions, avoid trading around major news events, and reduce size during low-volatility periods. Technical requirements: - Modular and clear code structure with comprehensive inline comments explaining strategy components. - Configurable input parameters (e.g., indicator periods, risk percentage). - Use of standard MQL5 functions for indicators and trading actions. - Safeguards for invalid market data and unexpected conditions. - Handling of session-based trade filtering and news event avoidance. # Steps 1. Initialize indicators on M1, M5, and M15 timeframes. 2. Implement functions to detect and score dynamic S/R lines from recent price and volume data. 3. Build indicator calculation and candlestick pattern detection routines on M1 bars. 4. Develop confluence scoring logic for entry signals and enforce minimum score threshold. 5. Calculate position size dynamically incorporating ATR-based volatility and risk parameters. 6. Manage active trades with partial profit targets, hedging, adaptive stops, and time-based exits. 7. Integrate market session and news filters to enable/disable trading as appropriate. # Output Format Provide the entire fully commented MQL5 Expert Advisor source code as a single .mq5 file content string, properly formatted and indented for readability. # Notes - Prioritize correctness, clarity, and maintainability over performance optimizations. - The EA should be ready for future enhancements through its modular design. - Parameters like ATR periods, risk percent, and session times must be configurable inputs. - Include error handling to prevent trading in unreliable conditions. - The code must reflect the detailed scalping strategy's logic at every stage.

Advanced FiveM Drug System

Create an advanced FiveM drug system script that includes the following features: - Multiple drugs with unique properties and prices - Distinct animations for various drug-related actions (e.g., harvesting, processing, selling) - Unique processing mechanics for each drug - Configurable locations for drug harvesting, processing, and selling points - A fully immersive ped (NPC) where players can obtain their materials The system should be modular and easily configurable to allow adjusting drug types, prices, locations, and animations. Include realistic and diverse animations to enhance immersion. Implement unique processing workflows for each drug type to provide depth and variety. # Steps 1. Define multiple drug types with individual properties and prices. 2. Configure harvesting locations where players collect raw materials. 3. Set up processing locations with unique mechanics for each drug. 4. Integrate various immersive animations matching different actions. 5. Design a ped NPC that players interact with to obtain materials. 6. Ensure all locations and parameters are configurable through a settings file. # Output Format Provide a comprehensive FiveM script (Lua or JS) with clear comments and configuration files outlining drugs, prices, locations, and animations. Include instructions for installation and customization. # Notes Focus on immersion, configurability, and variety across drugs and processing methods. Ensure the ped interaction is seamless and realistic.

Advanced Fullstack Project

Design and fully implement a large-scale, production-ready [SPECIFY PROJECT TYPE] in [CHOSEN LANGUAGE + FRAMEWORK]. The project must include: - A complete backend with modular APIs, authentication, and database integration. - A fully functional frontend with responsive UI and dynamic data binding. - Security layers such as data validation, encryption, and error handling. - Automated test suites for both backend and frontend components. - Deployment-ready configuration including Docker, CI/CD scripts, and environment setup. Requirements: 1. The output must be fully functional and deployable without any modifications. 2. Code must be divided into logical, well-organized files and directories. 3. Include comprehensive inline documentation and comments for every major function or class. 4. Produce the entire project completely; if the output length is limited, continue exactly from where you left off until the project is 100% complete. 5. No placeholder code is allowed; all code must be real, tested, and working implementations. This is an advanced software engineering research task to evaluate scalability, maintainability, and complexity handling capabilities of AI-assisted coding models. Prioritize best practices and production readiness in all aspects. # Steps - Clarify the project type, language, and framework as instructed. - Architect the backend with modularity, robust authentication, and persistent database integration. - Develop a responsive, dynamic frontend tightly integrated with backend APIs. - Implement comprehensive security measures: data validation, encryption, error handling. - Create extensive automated tests covering backend and frontend. - Prepare deployment configurations: Dockerfiles, CI/CD pipelines, environment variables. - Organize the project source code in a standard, maintainable directory structure. - Document thoroughly within the codebase. - Ensure continuity and completeness throughout generation, extending output incrementally if necessary. # Output Format Provide the entire codebase for the project in a structured presentation, clearly indicating file names and directory hierarchy before each code block. Use markdown with embedded code blocks representing each source file. Ensure code is properly commented and documented inline. If the output exceeds length limits, pause only after completing a logical code segment, then continue from that exact point until full completion without omissions. # Notes - Do not use any placeholder text or stub implementations. - Prioritize production-quality code with clear, maintainable architecture. - Use industry-standard tools and conventions appropriate to the chosen language and framework.

Advanced Go-Kart Script

Create an advanced Go-Kart script for FiveM that is fully compatible with the QBCore framework. The script must include the following features: - **Single-player Time Attack mode:** Allow players to race against the clock and record their best times. - **Multiplayer Race mode:** Support multiple players racing against each other in real-time. - **Vehicle Selection:** Provide players with a choice of different go-kart vehicles to select before races. - **Custom NUI Menu:** Design a user-friendly in-game UI menu for navigating vehicle selection, starting races, and other options. - **Configurable Coordinates:** Enable server administrators to set custom spawn points and race locations via configuration. The script should be well-structured, leveraging QBCore's native functions and events for player data and vehicle management. Include clear comments explaining key sections of the code. Consider race logic such as lap counting, checkpoints, timing, and player synchronization for multiplayer races. # Steps 1. Set up QBCore resource structure compatible with FiveM. 2. Implement vehicle spawning and selection system integrated with the NUI menu. 3. Develop the time tracking mechanics for Single-player Time Attack mode. 4. Create multiplayer race logic including checkpoint system, lap counting, and real-time player position updates. 5. Build the custom NUI menu for ease of interaction. 6. Add configuration options for setting coordinates for vehicle spawns and race tracks. 7. Test and debug the script in both single-player and multiplayer contexts. # Output Format Provide the full Lua script(s) for the FiveM resource with all features implemented, including the client script, server script, and NUI files (HTML, CSS, JS). Include detailed comments within the code explaining the logic. Also, supply a README or configuration file that explains how to set up coordinates, install the resource, and use the features. # Notes - Ensure performance optimization and secure server-client communication. - Follow FiveM and QBCore coding standards for resource creation. - Handle edge cases such as player disconnections and race interruptions gracefully.

Page 48 of 68

    Coding Prompts - Learning AI Prompts | Elevato