Changes to forexfolio2.scroll.pub

root
root
19 days ago
Initial commit
body.html
Changed around line 1
+
+

Forex Trading Journal

+

Track, Analyze, and Improve Your Trades

+
+
+
+
+

New Trade

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Trade History

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
PairDateDirectionEntryExitSizeP/L
+
+
+
+
+

Your Forex Trading Companion

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://forexfolio.scroll.pub
+ metaTags
+ editButton /edit.html
+ title Forex Trading Journal
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "d90804ef-5eda-4f13-9333-709ba0ec82eb",
+ "object": "chat.completion",
+ "created": 1735851990,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nforexfolio.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://forexfolio.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Forex Trading Journal\nstyle.css\nbody.html\nscript.js\n---body.html---\n
\n

Forex Trading Journal

\n

Track, Analyze, and Improve Your Trades

\n
\n\n
\n
\n

New Trade

\n
\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n
\n
\n\n
\n

Trade History

\n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
PairDateDirectionEntryExitSizeP/L
\n
\n
\n\n
\n

Your Forex Trading Companion

\n
\n---style.css---\n:root {\n --primary: #4CAF50;\n --secondary: #2196F3;\n --background: #f5f5f5;\n --text: #333;\n --border: #ddd;\n}\n\nbody {\n font-family: 'Segoe UI', sans-serif;\n line-height: 1.6;\n color: var(--text);\n background-color: var(--background);\n margin: 0;\n padding: 0;\n}\n\nheader {\n background: linear-gradient(135deg, var(--primary), var(--secondary));\n color: white;\n padding: 2rem;\n text-align: center;\n}\n\nmain {\n max-width: 1200px;\n margin: 2rem auto;\n padding: 0 1rem;\n}\n\n.trade-entry {\n background: white;\n padding: 2rem;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n margin-bottom: 2rem;\n}\n\nform {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 1rem;\n}\n\nlabel {\n font-weight: 600;\n margin-bottom: 0.5rem;\n}\n\ninput, select, button {\n padding: 0.75rem;\n border: 1px solid var(--border);\n border-radius: 4px;\n width: 100%;\n}\n\nbutton {\n background-color: var(--primary);\n color: white;\n border: none;\n cursor: pointer;\n transition: background-color 0.3s;\n}\n\nbutton:hover {\n background-color: #45a049;\n}\n\n.trade-history {\n background: white;\n padding: 2rem;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n}\n\n.chart-container {\n height: 300px;\n margin-bottom: 2rem;\n}\n\ntable {\n width: 100%;\n border-collapse: collapse;\n}\n\nth, td {\n padding: 1rem;\n text-align: left;\n border-bottom: 1px solid var(--border);\n}\n\nth {\n background-color: var(--background);\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background-color: var(--secondary);\n color: white;\n}\n\n@media (max-width: 768px) {\n form {\n grid-template-columns: 1fr;\n }\n}\n---script.js---\nconst tradeForm = document.getElementById('tradeForm');\nconst tradeTable = document.getElementById('tradeTable').getElementsByTagName('tbody')[0];\nconst ctx = document.getElementById('profitChart').getContext('2d');\n\nlet trades = [];\nlet chart;\n\nfunction calculatePL(entry, exit, size, direction) {\n const pips = (exit - entry) * (direction === 'buy' ? 1 : -1);\n return pips * size;\n}\n\nfunction addTradeToTable(trade) {\n const row = tradeTable.insertRow();\n row.innerHTML = `\n ${trade.pair}\n ${trade.date}\n ${trade.direction}\n ${trade.entry}\n ${trade.exit}\n ${trade.size}\n ${calculatePL(trade.entry, trade.exit, trade.size, trade.direction).toFixed(2)}\n `;\n}\n\nfunction updateChart() {\n const labels = trades.map(trade => trade.date);\n const data = trades.map(trade => calculatePL(trade.entry, trade.exit, trade.size, trade.direction));\n \n if (chart) {\n chart.destroy();\n }\n\n chart = new Chart(ctx, {\n type: 'line',\n data: {\n labels: labels,\n datasets: [{\n label: 'Profit/Loss',\n data: data,\n borderColor: '#4CAF50',\n fill: false\n }]\n },\n options: {\n responsive: true,\n maintainAspectRatio: false,\n scales: {\n y: {\n beginAtZero: true\n }\n }\n }\n });\n}\n\ntradeForm.addEventListener('submit', function(e) {\n e.preventDefault();\n \n const trade = {\n pair: document.getElementById('pair').value,\n date: document.getElementById('date').value,\n direction: document.getElementById('direction').value,\n entry: parseFloat(document.getElementById('entry').value),\n exit: parseFloat(document.getElementById('exit').value),\n size: parseFloat(document.getElementById('size').value)\n };\n\n trades.push(trade);\n addTradeToTable(trade);\n updateChart();\n \n tradeForm.reset();\n});\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 242,
+ "completion_tokens": 1579,
+ "total_tokens": 1821,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 242
+ },
+ "system_fingerprint": "fp_f1afce2943"
+ }
readme.scroll
Changed around line 1
+ # forexfolio2.scroll.pub
+ Website generated by DeepSeek from prompt: build a forex trading journal with nice visuals
script.js
Changed around line 1
+ const tradeForm = document.getElementById('tradeForm');
+ const tradeTable = document.getElementById('tradeTable').getElementsByTagName('tbody')[0];
+ const ctx = document.getElementById('profitChart').getContext('2d');
+
+ let trades = [];
+ let chart;
+
+ function calculatePL(entry, exit, size, direction) {
+ const pips = (exit - entry) * (direction === 'buy' ? 1 : -1);
+ return pips * size;
+ }
+
+ function addTradeToTable(trade) {
+ const row = tradeTable.insertRow();
+ row.innerHTML = `
+ ${trade.pair}
+ ${trade.date}
+ ${trade.direction}
+ ${trade.entry}
+ ${trade.exit}
+ ${trade.size}
+ ${calculatePL(trade.entry, trade.exit, trade.size, trade.direction).toFixed(2)}
+ `;
+ }
+
+ function updateChart() {
+ const labels = trades.map(trade => trade.date);
+ const data = trades.map(trade => calculatePL(trade.entry, trade.exit, trade.size, trade.direction));
+
+ if (chart) {
+ chart.destroy();
+ }
+
+ chart = new Chart(ctx, {
+ type: 'line',
+ data: {
+ labels: labels,
+ datasets: [{
+ label: 'Profit/Loss',
+ data: data,
+ borderColor: '#4CAF50',
+ fill: false
+ }]
+ },
+ options: {
+ responsive: true,
+ maintainAspectRatio: false,
+ scales: {
+ y: {
+ beginAtZero: true
+ }
+ }
+ }
+ });
+ }
+
+ tradeForm.addEventListener('submit', function(e) {
+ e.preventDefault();
+
+ const trade = {
+ pair: document.getElementById('pair').value,
+ date: document.getElementById('date').value,
+ direction: document.getElementById('direction').value,
+ entry: parseFloat(document.getElementById('entry').value),
+ exit: parseFloat(document.getElementById('exit').value),
+ size: parseFloat(document.getElementById('size').value)
+ };
+
+ trades.push(trade);
+ addTradeToTable(trade);
+ updateChart();
+
+ tradeForm.reset();
+ });
style.css
Changed around line 1
+ :root {
+ --primary: #4CAF50;
+ --secondary: #2196F3;
+ --background: #f5f5f5;
+ --text: #333;
+ --border: #ddd;
+ }
+
+ body {
+ font-family: 'Segoe UI', sans-serif;
+ line-height: 1.6;
+ color: var(--text);
+ background-color: var(--background);
+ margin: 0;
+ padding: 0;
+ }
+
+ header {
+ background: linear-gradient(135deg, var(--primary), var(--secondary));
+ color: white;
+ padding: 2rem;
+ text-align: center;
+ }
+
+ main {
+ max-width: 1200px;
+ margin: 2rem auto;
+ padding: 0 1rem;
+ }
+
+ .trade-entry {
+ background: white;
+ padding: 2rem;
+ border-radius: 8px;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+ margin-bottom: 2rem;
+ }
+
+ form {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 1rem;
+ }
+
+ label {
+ font-weight: 600;
+ margin-bottom: 0.5rem;
+ }
+
+ input, select, button {
+ padding: 0.75rem;
+ border: 1px solid var(--border);
+ border-radius: 4px;
+ width: 100%;
+ }
+
+ button {
+ background-color: var(--primary);
+ color: white;
+ border: none;
+ cursor: pointer;
+ transition: background-color 0.3s;
+ }
+
+ button:hover {
+ background-color: #45a049;
+ }
+
+ .trade-history {
+ background: white;
+ padding: 2rem;
+ border-radius: 8px;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+ }
+
+ .chart-container {
+ height: 300px;
+ margin-bottom: 2rem;
+ }
+
+ table {
+ width: 100%;
+ border-collapse: collapse;
+ }
+
+ th, td {
+ padding: 1rem;
+ text-align: left;
+ border-bottom: 1px solid var(--border);
+ }
+
+ th {
+ background-color: var(--background);
+ }
+
+ footer {
+ text-align: center;
+ padding: 1rem;
+ background-color: var(--secondary);
+ color: white;
+ }
+
+ @media (max-width: 768px) {
+ form {
+ grid-template-columns: 1fr;
+ }
+ }