Th3Cook commited on
Commit
1a226bb
·
verified ·
1 Parent(s): eb42f71

how do trading bots work?

Browse files
Files changed (2) hide show
  1. bots.html +220 -0
  2. index.html +4 -4
bots.html ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>How Trading Bots Work | Forex AutoPilot</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <style>
11
+ .code-block {
12
+ background-color: #1e293b;
13
+ color: #f8fafc;
14
+ padding: 1rem;
15
+ border-radius: 0.5rem;
16
+ font-family: monospace;
17
+ overflow-x: auto;
18
+ }
19
+ .bot-card {
20
+ transition: all 0.3s ease;
21
+ border-left: 4px solid #3b82f6;
22
+ }
23
+ .bot-card:hover {
24
+ transform: translateY(-5px);
25
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
26
+ }
27
+ </style>
28
+ </head>
29
+ <body class="bg-gray-50">
30
+ <div class="min-h-screen flex flex-col">
31
+ <!-- Navigation -->
32
+ <nav class="bg-white shadow-sm py-4">
33
+ <div class="container mx-auto px-4 flex justify-between items-center">
34
+ <div class="flex items-center space-x-2">
35
+ <i data-feather="trending-up" class="text-blue-600"></i>
36
+ <span class="text-xl font-bold text-gray-800">Forex AutoPilot</span>
37
+ </div>
38
+ <div class="hidden md:flex space-x-6">
39
+ <a href="index.html" class="text-gray-600 hover:text-blue-600">Home</a>
40
+ <a href="bots.html" class="text-blue-600 font-medium">How Bots Work</a>
41
+ <a href="#" class="text-gray-600 hover:text-blue-600">Features</a>
42
+ <a href="#" class="text-gray-600 hover:text-blue-600">Strategy</a>
43
+ <a href="#" class="text-gray-600 hover:text-blue-600">Dashboard</a>
44
+ </div>
45
+ <button class="md:hidden">
46
+ <i data-feather="menu"></i>
47
+ </button>
48
+ </div>
49
+ </nav>
50
+
51
+ <!-- Main Content -->
52
+ <main class="flex-grow container mx-auto px-4 py-12">
53
+ <div class="max-w-4xl mx-auto">
54
+ <h1 class="text-4xl font-bold text-center mb-6 text-gray-800">How Forex Trading Bots Work</h1>
55
+ <p class="text-xl text-gray-600 text-center mb-12">Automated trading systems that execute trades based on predefined rules and market analysis.</p>
56
+
57
+ <!-- How Bots Work Section -->
58
+ <section class="mb-16">
59
+ <div class="grid md:grid-cols-3 gap-8">
60
+ <div class="bg-white p-6 rounded-xl shadow-md bot-card">
61
+ <div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4">
62
+ <i data-feather="code" class="text-blue-600"></i>
63
+ </div>
64
+ <h3 class="text-xl font-bold mb-3 text-gray-800">Rule-Based Execution</h3>
65
+ <p class="text-gray-600">Bots follow exact trading rules without emotions, executing trades when specific market conditions are met.</p>
66
+ </div>
67
+ <div class="bg-white p-6 rounded-xl shadow-md bot-card">
68
+ <div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4">
69
+ <i data-feather="bar-chart-2" class="text-blue-600"></i>
70
+ </div>
71
+ <h3 class="text-xl font-bold mb-3 text-gray-800">Market Analysis</h3>
72
+ <p class="text-gray-600">Continuously analyzes price movements, indicators, and patterns across multiple currency pairs.</p>
73
+ </div>
74
+ <div class="bg-white p-6 rounded-xl shadow-md bot-card">
75
+ <div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4">
76
+ <i data-feather="clock" class="text-blue-600"></i>
77
+ </div>
78
+ <h3 class="text-xl font-bold mb-3 text-gray-800">24/7 Operation</h3>
79
+ <p class="text-gray-600">Runs continuously, reacting to market movements faster than human traders ever could.</p>
80
+ </div>
81
+ </div>
82
+ </section>
83
+
84
+ <!-- Technical Details Section -->
85
+ <section class="mb-16">
86
+ <h2 class="text-3xl font-bold mb-6 text-gray-800">Technical Components</h2>
87
+ <div class="bg-white p-6 rounded-xl shadow-md mb-8">
88
+ <h3 class="text-2xl font-bold mb-4 text-gray-800">1. Market Data Feed</h3>
89
+ <p class="text-gray-600 mb-4">The bot connects to real-time price data feeds to monitor market conditions:</p>
90
+ <div class="code-block mb-4">
91
+ // Example: Connecting to Forex API<br>
92
+ const socket = new WebSocket('wss://forex-feed.example.com');<br>
93
+ socket.onmessage = (event) => {<br>
94
+ &nbsp;&nbsp;const priceData = JSON.parse(event.data);<br>
95
+ &nbsp;&nbsp;// Process market data...<br>
96
+ };
97
+ </div>
98
+ </div>
99
+
100
+ <div class="bg-white p-6 rounded-xl shadow-md mb-8">
101
+ <h3 class="text-2xl font-bold mb-4 text-gray-800">2. Trading Strategy Logic</h3>
102
+ <p class="text-gray-600 mb-4">The core algorithm that makes trading decisions based on technical indicators:</p>
103
+ <div class="code-block mb-4">
104
+ // Example: Simple moving average crossover strategy<br>
105
+ function checkTradeSignal(prices) {<br>
106
+ &nbsp;&nbsp;const shortMA = calculateMA(prices, 5); // 5-period MA<br>
107
+ &nbsp;&nbsp;const longMA = calculateMA(prices, 20); // 20-period MA<br>
108
+ &nbsp;&nbsp;if (shortMA > longMA) return 'BUY';<br>
109
+ &nbsp;&nbsp;if (shortMA < longMA) return 'SELL';<br>
110
+ &nbsp;&nbsp;return 'HOLD';<br>
111
+ }
112
+ </div>
113
+ </div>
114
+
115
+ <div class="bg-white p-6 rounded-xl shadow-md">
116
+ <h3 class="text-2xl font-bold mb-4 text-gray-800">3. Order Execution</h3>
117
+ <p class="text-gray-600 mb-4">Automatically places trades through broker APIs when conditions are met:</p>
118
+ <div class="code-block mb-4">
119
+ // Example: Placing a trade order<br>
120
+ async function placeOrder(signal, pair, amount) {<br>
121
+ &nbsp;&nbsp;const response = await fetch('https://broker-api.com/orders', {<br>
122
+ &nbsp;&nbsp;&nbsp;&nbsp;method: 'POST',<br>
123
+ &nbsp;&nbsp;&nbsp;&nbsp;body: JSON.stringify({<br>
124
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pair: pair,<br>
125
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: signal,<br>
126
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;amount: amount<br>
127
+ &nbsp;&nbsp;&nbsp;&nbsp;})<br>
128
+ &nbsp;&nbsp;});<br>
129
+ &nbsp;&nbsp;return response.json();<br>
130
+ }
131
+ </div>
132
+ </div>
133
+ </section>
134
+
135
+ <!-- Advantages Section -->
136
+ <section class="mb-16">
137
+ <h2 class="text-3xl font-bold mb-6 text-gray-800">Key Advantages</h2>
138
+ <div class="bg-blue-50 p-6 rounded-xl">
139
+ <ul class="space-y-4">
140
+ <li class="flex items-start">
141
+ <i data-feather="check-circle" class="text-green-500 mr-3 flex-shrink-0"></i>
142
+ <div>
143
+ <h3 class="font-bold text-gray-800">Emotion-Free Trading</h3>
144
+ <p class="text-gray-600">Eliminates fear and greed that often lead to poor trading decisions.</p>
145
+ </div>
146
+ </li>
147
+ <li class="flex items-start">
148
+ <i data-feather="check-circle" class="text-green-500 mr-3 flex-shrink-0"></i>
149
+ <div>
150
+ <h3 class="font-bold text-gray-800">Backtesting Capabilities</h3>
151
+ <p class="text-gray-600">Strategies can be tested against historical data before risking real capital.</p>
152
+ </div>
153
+ </li>
154
+ <li class="flex items-start">
155
+ <i data-feather="check-circle" class="text-green-500 mr-3 flex-shrink-0"></i>
156
+ <div>
157
+ <h3 class="font-bold text-gray-800">Diversification</h3>
158
+ <p class="text-gray-600">Can monitor and trade multiple currency pairs simultaneously.</p>
159
+ </div>
160
+ </li>
161
+ <li class="flex items-start">
162
+ <i data-feather="check-circle" class="text-green-500 mr-3 flex-shrink-0"></i>
163
+ <div>
164
+ <h3 class="font-bold text-gray-800">Speed</h3>
165
+ <p class="text-gray-600">Executes trades in milliseconds when opportunities arise.</p>
166
+ </div>
167
+ </li>
168
+ </ul>
169
+ </div>
170
+ </section>
171
+
172
+ <!-- CTA Section -->
173
+ <section class="bg-blue-600 text-white p-8 rounded-xl text-center">
174
+ <h2 class="text-2xl font-bold mb-4">Ready to Automate Your Strategy?</h2>
175
+ <p class="mb-6 max-w-2xl mx-auto">Our experts can help transform your successful trading approach into a 24/7 automated system.</p>
176
+ <a href="index.html" class="inline-block bg-white text-blue-600 px-6 py-3 rounded-lg font-bold hover:bg-blue-50 transition-all">Get Started Today</a>
177
+ </section>
178
+ </div>
179
+ </main>
180
+
181
+ <!-- Footer -->
182
+ <footer class="bg-gray-800 text-white py-12">
183
+ <div class="container mx-auto px-4">
184
+ <div class="grid md:grid-cols-3 gap-8">
185
+ <div>
186
+ <div class="flex items-center space-x-2 mb-4">
187
+ <i data-feather="trending-up" class="text-blue-400"></i>
188
+ <span class="text-xl font-bold">Forex AutoPilot</span>
189
+ </div>
190
+ <p class="text-gray-400">Automating profitable trading strategies since 2023.</p>
191
+ </div>
192
+ <div>
193
+ <h3 class="text-lg font-bold mb-4">Resources</h3>
194
+ <ul class="space-y-2">
195
+ <li><a href="bots.html" class="text-gray-400 hover:text-white">How Bots Work</a></li>
196
+ <li><a href="#" class="text-gray-400 hover:text-white">Strategy Development</a></li>
197
+ <li><a href="#" class="text-gray-400 hover:text-white">API Documentation</a></li>
198
+ </ul>
199
+ </div>
200
+ <div>
201
+ <h3 class="text-lg font-bold mb-4">Connect With Us</h3>
202
+ <div class="flex space-x-4">
203
+ <a href="#" class="text-gray-400 hover:text-white"><i data-feather="twitter"></i></a>
204
+ <a href="#" class="text-gray-400 hover:text-white"><i data-feather="linkedin"></i></a>
205
+ <a href="#" class="text-gray-400 hover:text-white"><i data-feather="mail"></i></a>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
210
+ <p>© 2023 Forex AutoPilot. All rights reserved.</p>
211
+ </div>
212
+ </div>
213
+ </footer>
214
+ </div>
215
+
216
+ <script>
217
+ feather.replace();
218
+ </script>
219
+ </body>
220
+ </html>
index.html CHANGED
@@ -32,11 +32,11 @@
32
  <span class="text-xl font-bold text-gray-800">Forex AutoPilot</span>
33
  </div>
34
  <div class="hidden md:flex space-x-6">
35
- <a href="#" class="text-blue-600 font-medium">Home</a>
 
36
  <a href="#" class="text-gray-600 hover:text-blue-600">Features</a>
37
  <a href="#" class="text-gray-600 hover:text-blue-600">Strategy</a>
38
  <a href="#" class="text-gray-600 hover:text-blue-600">Dashboard</a>
39
- <a href="#" class="text-gray-600 hover:text-blue-600">Contact</a>
40
  </div>
41
  <button class="md:hidden">
42
  <i data-feather="menu"></i>
@@ -198,10 +198,10 @@
198
  <div>
199
  <h3 class="text-lg font-bold mb-4">Quick Links</h3>
200
  <ul class="space-y-2">
201
- <li><a href="#" class="text-gray-400 hover:text-white">Home</a></li>
 
202
  <li><a href="#" class="text-gray-400 hover:text-white">Features</a></li>
203
  <li><a href="#" class="text-gray-400 hover:text-white">Dashboard</a></li>
204
- <li><a href="#" class="text-gray-400 hover:text-white">Contact</a></li>
205
  </ul>
206
  </div>
207
  <div>
 
32
  <span class="text-xl font-bold text-gray-800">Forex AutoPilot</span>
33
  </div>
34
  <div class="hidden md:flex space-x-6">
35
+ <a href="index.html" class="text-blue-600 font-medium">Home</a>
36
+ <a href="bots.html" class="text-gray-600 hover:text-blue-600">How Bots Work</a>
37
  <a href="#" class="text-gray-600 hover:text-blue-600">Features</a>
38
  <a href="#" class="text-gray-600 hover:text-blue-600">Strategy</a>
39
  <a href="#" class="text-gray-600 hover:text-blue-600">Dashboard</a>
 
40
  </div>
41
  <button class="md:hidden">
42
  <i data-feather="menu"></i>
 
198
  <div>
199
  <h3 class="text-lg font-bold mb-4">Quick Links</h3>
200
  <ul class="space-y-2">
201
+ <li><a href="index.html" class="text-gray-400 hover:text-white">Home</a></li>
202
+ <li><a href="bots.html" class="text-gray-400 hover:text-white">How Bots Work</a></li>
203
  <li><a href="#" class="text-gray-400 hover:text-white">Features</a></li>
204
  <li><a href="#" class="text-gray-400 hover:text-white">Dashboard</a></li>
 
205
  </ul>
206
  </div>
207
  <div>