mql5-code-wizard-pro / index.html
minasamy2025's picture
حسن بعمق وابداع
ef13d78 verified
Raw History Blame Contribute Delete
10.4 kB
<!DOCTYPE html>
<html lang="en" class="h-full">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MQL5 Code Wizard Pro</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: {
50: '#f0f9ff',
100: '#e0f2fe',
200: '#bae6fd',
300: '#7dd3fc',
400: '#38bdf8',
500: '#0ea5e9',
600: '#0284c7',
700: '#0369a1',
800: '#075985',
900: '#0c4a6e',
},
secondary: {
50: '#f5f3ff',
100: '#ede9fe',
200: '#ddd6fe',
300: '#c4b5fd',
400: '#a78bfa',
500: '#8b5cf6',
600: '#7c3aed',
700: '#6d28d9',
800: '#5b21b6',
900: '#4c1d95',
}
}
}
}
}
</script>
</head>
<body class="bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-gray-100 h-full">
<div class="min-h-screen flex flex-col">
<custom-navbar></custom-navbar>
<!-- Main Content -->
<main class="flex-grow container mx-auto px-4 py-8">
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<!-- Left Sidebar -->
<div class="lg:col-span-1">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 mb-6">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i data-feather="file-text" class="w-5 h-5 mr-2"></i>
File Explorer
</h2>
<div class="space-y-2">
<div class="flex items-center text-primary-600 dark:text-primary-400">
<i data-feather="folder" class="w-4 h-4 mr-2"></i>
<span>Expert Advisors</span>
</div>
<div class="flex items-center text-primary-600 dark:text-primary-400">
<i data-feather="folder" class="w-4 h-4 mr-2"></i>
<span>Indicators</span>
</div>
<div class="flex items-center text-primary-600 dark:text-primary-400">
<i data-feather="folder" class="w-4 h-4 mr-2"></i>
<span>Scripts</span>
</div>
<div class="flex items-center text-primary-600 dark:text-primary-400">
<i data-feather="folder" class="w-4 h-4 mr-2"></i>
<span>Include Files</span>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i data-feather="tool" class="w-5 h-5 mr-2"></i>
Tools
</h2>
<div class="space-y-3">
<button class="w-full flex items-center px-4 py-2 bg-primary-100 dark:bg-gray-700 hover:bg-primary-200 dark:hover:bg-gray-600 rounded transition">
<i data-feather="code" class="w-4 h-4 mr-2"></i>
Code Generator
</button>
<button class="w-full flex items-center px-4 py-2 bg-primary-100 dark:bg-gray-700 hover:bg-primary-200 dark:hover:bg-gray-600 rounded transition">
<i data-feather="search" class="w-4 h-4 mr-2"></i>
Debugger
</button>
<button class="w-full flex items-center px-4 py-2 bg-primary-100 dark:bg-gray-700 hover:bg-primary-200 dark:hover:bg-gray-600 rounded transition">
<i data-feather="bar-chart-2" class="w-4 h-4 mr-2"></i>
Strategy Tester
</button>
<button class="w-full flex items-center px-4 py-2 bg-primary-100 dark:bg-gray-700 hover:bg-primary-200 dark:hover:bg-gray-600 rounded transition">
<i data-feather="settings" class="w-4 h-4 mr-2"></i>
Settings
</button>
</div>
</div>
</div>
<!-- Main Editor Area -->
<div class="lg:col-span-2">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
<div class="bg-gray-100 dark:bg-gray-700 px-4 py-2 flex items-center justify-between">
<div class="flex items-center space-x-2">
<i data-feather="file" class="w-4 h-4"></i>
<span class="font-medium">ExpertAdvisor.mq5</span>
</div>
<div class="flex space-x-2">
<button class="p-1 hover:bg-gray-200 dark:hover:bg-gray-600 rounded">
<i data-feather="minimize-2" class="w-4 h-4"></i>
</button>
<button class="p-1 hover:bg-gray-200 dark:hover:bg-gray-600 rounded">
<i data-feather="maximize-2" class="w-4 h-4"></i>
</button>
<button class="p-1 hover:bg-gray-200 dark:hover:bg-gray-600 rounded">
<i data-feather="x" class="w-4 h-4"></i>
</button>
</div>
</div>
<div class="p-4">
<div class="bg-gray-900 text-gray-300 p-4 rounded-lg font-mono text-sm overflow-x-auto">
<pre><code class="language-mql5">//+------------------------------------------------------------------+
//| Expert Advisor Template |
//+------------------------------------------------------------------+
#include &lt;Trade\Trade.mqh&gt;
input int FastMA_Period = 10;
input int SlowMA_Period = 20;
input double LotSize = 0.1;
input int StopLoss = 50;
input int TakeProfit = 100;
CTrade trade;
int OnInit()
{
// Initialization code
return(INIT_SUCCEEDED);
}
void OnDeinit(const int reason)
{
// Cleanup code
}
void OnTick()
{
// Trading logic here
double fastMA = iMA(NULL, 0, FastMA_Period, 0, MODE_SMA, PRICE_CLOSE, 0);
double slowMA = iMA(NULL, 0, SlowMA_Period, 0, MODE_SMA, PRICE_CLOSE, 0);
if(fastMA > slowMA)
{
trade.Buy(LotSize, NULL, 0, 0, StopLoss, TakeProfit, "Buy Order");
}
else if(fastMA < slowMA)
{
trade.Sell(LotSize, NULL, 0, 0, StopLoss, TakeProfit, "Sell Order");
}
}</code></pre>
</div>
</div>
<div class="bg-gray-100 dark:bg-gray-700 px-4 py-2 flex justify-end space-x-2">
<button class="px-4 py-2 bg-primary-600 hover:bg-primary-700 text-white rounded flex items-center">
<i data-feather="play" class="w-4 h-4 mr-2"></i>
Compile & Run
</button>
<button class="px-4 py-2 bg-secondary-600 hover:bg-secondary-700 text-white rounded flex items-center">
<i data-feather="save" class="w-4 h-4 mr-2"></i>
Save
</button>
</div>
</div>
<div class="mt-6 bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
<div class="bg-gray-100 dark:bg-gray-700 px-4 py-2 flex justify-between items-center">
<h3 class="font-medium flex items-center">
<i data-feather="terminal" class="w-4 h-4 mr-2"></i>
Output Console
</h3>
<div class="flex space-x-2">
<button class="p-1 hover:bg-gray-200 dark:hover:bg-gray-600 rounded" title="Clear Console">
<i data-feather="trash-2" class="w-4 h-4"></i>
</button>
<button class="p-1 hover:bg-gray-200 dark:hover:bg-gray-600 rounded" title="Copy Output">
<i data-feather="copy" class="w-4 h-4"></i>
</button>
</div>
</div>
<div class="p-4">
<div id="output-console" class="bg-gray-900 text-gray-300 p-4 rounded-lg font-mono text-sm h-40 overflow-y-auto">
<div class="text-green-400">> Initializing Expert Advisor...</div>
<div class="text-green-400">> Indicators loaded successfully</div>
<div class="text-blue-400">> Waiting for new tick...</div>
<div class="text-yellow-400">> New tick received at 2023.05.15 14:30:45</div>
<div class="text-green-400">> Buy order executed at 1.2345</div>
</div>
</div>
</div>
</div>
</div>
</main>
<custom-footer></custom-footer>
</div>
<script>
feather.replace();
</script>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
</body>
</html>