jgtml 0.0.332__tar.gz → 0.0.334__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jgtml-0.0.332/jgtml.egg-info → jgtml-0.0.334}/PKG-INFO +2 -2
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/__init__.py +1 -1
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/jgtapp.py +56 -19
- jgtml-0.0.334/jgtml/simple_trading_orchestrator.py +261 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/trading_orchestrator.py +2 -1
- {jgtml-0.0.332 → jgtml-0.0.334/jgtml.egg-info}/PKG-INFO +2 -2
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml.egg-info/SOURCES.txt +1 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml.egg-info/requires.txt +1 -1
- {jgtml-0.0.332 → jgtml-0.0.334}/pyproject.toml +2 -2
- {jgtml-0.0.332 → jgtml-0.0.334}/LICENSE +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/README.md +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/README.rst +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/AlligatorIllusionDetector.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/JGTBalanceAnalyzer.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/JGTOutputHelper.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/MLFRequest.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/SOHelper.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/SignalOrderingHelper.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/TideAlligatorAnalysis.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/alligator_cli.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/anhelper.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/automated_fdb_trading_system.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/enhanced_fdb_scanner_with_illusion_detection.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/enhanced_trading_cli.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/fdb_pattern_intelligence.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/fdb_scanner_2408.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/fdb_signal_quality_predictor.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/jdash.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/jgtml_obsds_240515_TIDE_SIGNALS.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/jgtmlcli.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/jplt.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/jtc.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mfihelper2.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mlclicommon.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mlcliconstants.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mlconstants.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mldatahelper.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mlfcli.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mlfsvc.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mlutils.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mxcli.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mxconstants.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mxhelper.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/mxsvc.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/pncli.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/pto250518.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/ptomlf.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/ptottf.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/ptottfpatterns.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/realityhelper.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/test_get_files_in_ns.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/test_pncli.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/test_signal_ordering_helper.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/test_soh_gator_validations.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/tst_barhelper_and_pd.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/tst_jgtpov.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/ttfcli.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/ttfsvc.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/unified_discovery_dataset_generator.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/xhelper.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml/zonehelper.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml.egg-info/dependency_links.txt +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml.egg-info/entry_points.txt +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/jgtml.egg-info/top_level.txt +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/setup.cfg +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/setup.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/tests/test-calc-targets-2.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/tests/test-calc-targets.py +0 -0
- {jgtml-0.0.332 → jgtml-0.0.334}/tests/test-plot-CDS.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jgtml
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.334
|
|
4
4
|
Summary: JGT Ml - Machine Learning Tools
|
|
5
5
|
Home-page: https://github.com/jgwill/jgtml
|
|
6
6
|
Author: GUillaume Isabelle
|
|
@@ -17,7 +17,7 @@ License-File: LICENSE
|
|
|
17
17
|
Requires-Dist: pandas>=0.25.1
|
|
18
18
|
Requires-Dist: python-dateutil>=2.8.0
|
|
19
19
|
Requires-Dist: python-dotenv>=0.19.2
|
|
20
|
-
Requires-Dist: jgtpy>=0.5.
|
|
20
|
+
Requires-Dist: jgtpy>=0.5.116
|
|
21
21
|
Requires-Dist: matplotlib>=3.3.1
|
|
22
22
|
Requires-Dist: plotly>=5.18.0
|
|
23
23
|
Requires-Dist: mplfinance>=0.12.10b0
|
|
@@ -538,14 +538,27 @@ def tide(instrument, timeframe, buysell, type='tide', quiet=False):
|
|
|
538
538
|
# Restore original argv
|
|
539
539
|
sys.argv = original_argv
|
|
540
540
|
|
|
541
|
-
def pds(instrument, timeframe,use_full=True):
|
|
542
|
-
|
|
543
|
-
|
|
541
|
+
def pds(instrument, timeframe, use_full=True):
|
|
542
|
+
"""Generate PDS data via `pdscli`."""
|
|
543
|
+
use_full_arg = '-uf' if use_full else '-nf'
|
|
544
|
+
subprocess.run([
|
|
545
|
+
PDSCLI_PROG_NAME,
|
|
546
|
+
'-i', instrument,
|
|
547
|
+
'-t', timeframe,
|
|
548
|
+
use_full_arg,
|
|
549
|
+
], check=True)
|
|
544
550
|
|
|
545
|
-
def cds(instrument, timeframe, use_fresh=False,use_full=True):
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
551
|
+
def cds(instrument, timeframe, use_fresh=False, use_full=True):
|
|
552
|
+
"""Generate CDS data using `cdscli`."""
|
|
553
|
+
use_full_arg = '-uf' if use_full else '-nf'
|
|
554
|
+
old_or_fresh = '--fresh' if use_fresh else '-old'
|
|
555
|
+
subprocess.run([
|
|
556
|
+
CDSCLI_PROG_NAME,
|
|
557
|
+
'-i', instrument,
|
|
558
|
+
'-t', timeframe,
|
|
559
|
+
use_full_arg,
|
|
560
|
+
old_or_fresh,
|
|
561
|
+
], check=True)
|
|
549
562
|
|
|
550
563
|
def ads(instrument, timeframe, use_fresh=False,tc=True,pov=False):
|
|
551
564
|
old_or_fresh = '-old' if not use_fresh else '--fresh'
|
|
@@ -558,24 +571,48 @@ def ads(instrument, timeframe, use_fresh=False,tc=True,pov=False):
|
|
|
558
571
|
ads_cli_args.append('cp')
|
|
559
572
|
subprocess.run(ads_cli_args, check=True)
|
|
560
573
|
|
|
561
|
-
def ocds(instrument, timeframe,use_full=True):
|
|
562
|
-
|
|
563
|
-
|
|
574
|
+
def ocds(instrument, timeframe, use_full=True):
|
|
575
|
+
"""Generate old CDS data via `jgtcli`."""
|
|
576
|
+
use_full_arg = '-uf' if use_full else '-nf'
|
|
577
|
+
subprocess.run([
|
|
578
|
+
JGTCLI_PROG_NAME,
|
|
579
|
+
'-i', instrument,
|
|
580
|
+
'-t', timeframe,
|
|
581
|
+
use_full_arg,
|
|
582
|
+
'-old',
|
|
583
|
+
], check=True)
|
|
564
584
|
|
|
565
585
|
|
|
566
|
-
def ttf(instrument, timeframe,pn="ttf",use_fresh=False,use_full=True):
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
586
|
+
def ttf(instrument, timeframe, pn="ttf", use_fresh=False, use_full=True):
|
|
587
|
+
"""Run TTFCLI for the specified instrument and timeframe."""
|
|
588
|
+
use_full_arg = '-uf' if use_full else '-nf'
|
|
589
|
+
use_fresh_arg = '--fresh' if use_fresh else '-old'
|
|
590
|
+
|
|
591
|
+
ttf_args = [
|
|
592
|
+
TTFCLI_PROG_NAME,
|
|
593
|
+
'-i', instrument,
|
|
594
|
+
'-t', timeframe,
|
|
595
|
+
use_full_arg,
|
|
596
|
+
use_fresh_arg,
|
|
597
|
+
'-pn', pn,
|
|
598
|
+
]
|
|
571
599
|
print("TTF is being ran by jgtapp with args: ", ttf_args)
|
|
572
600
|
subprocess.run(ttf_args, check=True)
|
|
573
601
|
|
|
574
602
|
|
|
575
|
-
def mlf(instrument, timeframe,pn="ttf",total_lagging_periods=5,use_fresh=False,use_full=True):
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
603
|
+
def mlf(instrument, timeframe, pn="ttf", total_lagging_periods=5, use_fresh=False, use_full=True):
|
|
604
|
+
"""Run MLFCLI to generate FDB-based patterns."""
|
|
605
|
+
use_full_arg = '-uf' if use_full else '-nf'
|
|
606
|
+
use_fresh_arg = '--fresh' if use_fresh else '-old'
|
|
607
|
+
mlf_args = [
|
|
608
|
+
MLFCLI_PROG_NAME,
|
|
609
|
+
'-i', instrument,
|
|
610
|
+
'-t', timeframe,
|
|
611
|
+
use_full_arg,
|
|
612
|
+
use_fresh_arg,
|
|
613
|
+
'-pn', pn,
|
|
614
|
+
'--total_lagging_periods', total_lagging_periods,
|
|
615
|
+
]
|
|
579
616
|
subprocess.run(mlf_args, check=True)
|
|
580
617
|
|
|
581
618
|
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Simple JGT Trading System Orchestrator
|
|
5
|
+
|
|
6
|
+
This module orchestrates the complete JGT trading system without external dependencies
|
|
7
|
+
for immediate testing and background service use.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import argparse
|
|
11
|
+
import subprocess
|
|
12
|
+
import time
|
|
13
|
+
from typing import List
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class SimpleTradingOrchestrator:
|
|
17
|
+
"""Simple trading system orchestrator using existing JGT components."""
|
|
18
|
+
|
|
19
|
+
def __init__(self, timeframe: str, instruments: List[str],
|
|
20
|
+
quality_threshold: float = 8.0, demo: bool = True, test_mode: bool = False):
|
|
21
|
+
self.timeframe = timeframe
|
|
22
|
+
self.instruments = instruments
|
|
23
|
+
self.quality_threshold = quality_threshold
|
|
24
|
+
self.demo = demo
|
|
25
|
+
self.test_mode = test_mode
|
|
26
|
+
|
|
27
|
+
print(f"🚀 Simple JGT Trading Orchestrator Initialized")
|
|
28
|
+
print(f"📊 Timeframe: {timeframe} | Instruments: {','.join(instruments)}")
|
|
29
|
+
if test_mode:
|
|
30
|
+
print("⚡ TEST MODE ENABLED")
|
|
31
|
+
|
|
32
|
+
def run_enhanced_trading_analysis(self) -> bool:
|
|
33
|
+
"""Run enhanced trading CLI analysis."""
|
|
34
|
+
try:
|
|
35
|
+
instruments_str = ','.join(self.instruments)
|
|
36
|
+
mode_flag = '--demo' if self.demo else '--real'
|
|
37
|
+
|
|
38
|
+
cmd = [
|
|
39
|
+
'enhancedtradingcli', 'auto',
|
|
40
|
+
'-i', instruments_str,
|
|
41
|
+
mode_flag,
|
|
42
|
+
'--quality-threshold', str(self.quality_threshold)
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
print(f"🔍 Running: {' '.join(cmd)}")
|
|
46
|
+
print("📊 Note: Cache warnings are normal - Enhanced CLI handles data refresh internally")
|
|
47
|
+
result = subprocess.run(cmd, text=True)
|
|
48
|
+
|
|
49
|
+
if result.returncode == 0:
|
|
50
|
+
print("✅ Enhanced trading analysis completed")
|
|
51
|
+
return True
|
|
52
|
+
else:
|
|
53
|
+
print(f"❌ Analysis failed with return code: {result.returncode}")
|
|
54
|
+
return False
|
|
55
|
+
|
|
56
|
+
except Exception as e:
|
|
57
|
+
print(f"❌ Error: {e}")
|
|
58
|
+
return False
|
|
59
|
+
|
|
60
|
+
def generate_analysis_charts(self) -> bool:
|
|
61
|
+
"""Generate analysis charts for all instruments."""
|
|
62
|
+
success_count = 0
|
|
63
|
+
|
|
64
|
+
for instrument in self.instruments:
|
|
65
|
+
try:
|
|
66
|
+
print(f"📈 Generating chart for {instrument} {self.timeframe}")
|
|
67
|
+
|
|
68
|
+
cmd = [
|
|
69
|
+
'jgtads', '-i', instrument, '-t', self.timeframe,
|
|
70
|
+
'--save_figure', 'charts/',
|
|
71
|
+
'--save_figure_as_timeframe'
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
result = subprocess.run(cmd, capture_output=True, text=True)
|
|
75
|
+
|
|
76
|
+
if result.returncode == 0:
|
|
77
|
+
print(f"✅ Chart generated for {instrument}")
|
|
78
|
+
success_count += 1
|
|
79
|
+
else:
|
|
80
|
+
print(f"⚠️ Chart generation failed for {instrument}: {result.stderr}")
|
|
81
|
+
|
|
82
|
+
except Exception as e:
|
|
83
|
+
print(f"❌ Error generating chart for {instrument}: {e}")
|
|
84
|
+
|
|
85
|
+
return success_count > 0
|
|
86
|
+
|
|
87
|
+
def update_trailing_stops(self) -> bool:
|
|
88
|
+
"""Update trailing stops for active trades."""
|
|
89
|
+
try:
|
|
90
|
+
mode_flag = '--demo' if self.demo else '--real'
|
|
91
|
+
|
|
92
|
+
# Refresh trade data
|
|
93
|
+
cmd_refresh = ['jgtapp', 'fxtr', mode_flag]
|
|
94
|
+
print("🔄 Refreshing trade data...")
|
|
95
|
+
|
|
96
|
+
result = subprocess.run(cmd_refresh, capture_output=True, text=True)
|
|
97
|
+
if result.returncode != 0:
|
|
98
|
+
print("⚠️ No active trades found or trade data unavailable")
|
|
99
|
+
return False
|
|
100
|
+
|
|
101
|
+
print("✅ Trade data refreshed")
|
|
102
|
+
|
|
103
|
+
# Update FDB-based trailing stops with Alligator fallback
|
|
104
|
+
print("🐊 Updating FDB-based trailing stops with Alligator fallback...")
|
|
105
|
+
cmd_stops = ['jgtapp', 'fxmvstopfdb', '-t', self.timeframe, '--lips', mode_flag]
|
|
106
|
+
|
|
107
|
+
result = subprocess.run(cmd_stops, capture_output=True, text=True)
|
|
108
|
+
if result.returncode == 0:
|
|
109
|
+
print("✅ FDB trailing stops updated")
|
|
110
|
+
return True
|
|
111
|
+
else:
|
|
112
|
+
print(f"⚠️ FDB trailing stops update failed: {result.stderr}")
|
|
113
|
+
return False
|
|
114
|
+
|
|
115
|
+
except Exception as e:
|
|
116
|
+
print(f"❌ Error updating trailing stops: {e}")
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
def process_timeframe_trigger(self) -> bool:
|
|
120
|
+
"""Process actions when timeframe is triggered."""
|
|
121
|
+
print(f"🎯 Processing {self.timeframe} timeframe trigger...")
|
|
122
|
+
|
|
123
|
+
if self.timeframe in ["H4", "H1", "D1"]:
|
|
124
|
+
print("📈 PRIMARY MARKET ANALYSIS MODE")
|
|
125
|
+
|
|
126
|
+
# Step 1: Enhanced trading analysis
|
|
127
|
+
if not self.run_enhanced_trading_analysis():
|
|
128
|
+
return False
|
|
129
|
+
|
|
130
|
+
# Step 2: Generate analysis charts
|
|
131
|
+
if not self.generate_analysis_charts():
|
|
132
|
+
print("⚠️ Chart generation had issues but continuing...")
|
|
133
|
+
|
|
134
|
+
return True
|
|
135
|
+
|
|
136
|
+
elif self.timeframe in ["m15", "m5"]:
|
|
137
|
+
print("🎯 TRADE MANAGEMENT MODE")
|
|
138
|
+
|
|
139
|
+
# Enhanced trading analysis for trade management
|
|
140
|
+
if not self.run_enhanced_trading_analysis():
|
|
141
|
+
print("⚠️ Enhanced analysis failed, continuing with basic trade management...")
|
|
142
|
+
|
|
143
|
+
# Update trailing stops
|
|
144
|
+
self.update_trailing_stops()
|
|
145
|
+
|
|
146
|
+
return True
|
|
147
|
+
|
|
148
|
+
elif self.timeframe == "m1":
|
|
149
|
+
print("⚡ RAPID MONITORING MODE")
|
|
150
|
+
|
|
151
|
+
# Quick enhanced analysis
|
|
152
|
+
return self.run_enhanced_trading_analysis()
|
|
153
|
+
|
|
154
|
+
else:
|
|
155
|
+
print(f"❌ Unsupported timeframe: {self.timeframe}")
|
|
156
|
+
return False
|
|
157
|
+
|
|
158
|
+
def run_single_cycle(self) -> bool:
|
|
159
|
+
"""Run a single trading cycle."""
|
|
160
|
+
if self.test_mode:
|
|
161
|
+
print(f"🔄 SIMULATION: {self.timeframe} timeframe reached")
|
|
162
|
+
time.sleep(1)
|
|
163
|
+
|
|
164
|
+
return self.run_enhanced_trading_analysis()
|
|
165
|
+
|
|
166
|
+
def run_continuous(self, max_cycles: int = None) -> None:
|
|
167
|
+
"""Run continuous trading orchestration."""
|
|
168
|
+
cycle_count = 0
|
|
169
|
+
|
|
170
|
+
if self.test_mode:
|
|
171
|
+
# In test mode, just run once or a few cycles
|
|
172
|
+
max_cycles = max_cycles or 1
|
|
173
|
+
print(f"🧪 Test mode: Running {max_cycles} cycle(s)")
|
|
174
|
+
|
|
175
|
+
for i in range(max_cycles):
|
|
176
|
+
print(f"\n--- Test Cycle {i+1}/{max_cycles} ---")
|
|
177
|
+
self.run_single_cycle()
|
|
178
|
+
if i < max_cycles - 1:
|
|
179
|
+
time.sleep(2) # Short delay between test cycles
|
|
180
|
+
|
|
181
|
+
print("🎯 Test cycles completed")
|
|
182
|
+
return
|
|
183
|
+
|
|
184
|
+
# Real-time mode - single execution (called by timeframe scheduler)
|
|
185
|
+
self.run_single_cycle()
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
def main():
|
|
189
|
+
"""Main entry point."""
|
|
190
|
+
parser = argparse.ArgumentParser(
|
|
191
|
+
description="Simple JGT Trading System Orchestrator",
|
|
192
|
+
epilog="Example: python simple_trading_orchestrator.py --timeframe m5 --instruments EUR-USD --demo --test-mode"
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
parser.add_argument(
|
|
196
|
+
'--timeframe', '-t',
|
|
197
|
+
default='H4',
|
|
198
|
+
help='Trading timeframe (m1, m5, m15, H1, H4, D1)'
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
parser.add_argument(
|
|
202
|
+
'--instruments', '-i',
|
|
203
|
+
default='EUR-USD',
|
|
204
|
+
help='Comma-separated list of instruments (e.g., EUR-USD,GBP-USD)'
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
parser.add_argument(
|
|
208
|
+
'--quality-threshold', '-q',
|
|
209
|
+
type=float,
|
|
210
|
+
default=8.0,
|
|
211
|
+
help='Quality threshold for trading signals (default: 8.0)'
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
parser.add_argument(
|
|
215
|
+
'--demo',
|
|
216
|
+
action='store_true',
|
|
217
|
+
default=True,
|
|
218
|
+
help='Use demo account (default: True)'
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
parser.add_argument(
|
|
222
|
+
'--real',
|
|
223
|
+
action='store_true',
|
|
224
|
+
help='Use real account (overrides --demo)'
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
parser.add_argument(
|
|
228
|
+
'--test-mode',
|
|
229
|
+
action='store_true',
|
|
230
|
+
help='Run in test mode (simulation)'
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
parser.add_argument(
|
|
234
|
+
'--max-cycles',
|
|
235
|
+
type=int,
|
|
236
|
+
help='Maximum cycles for test mode'
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
args = parser.parse_args()
|
|
240
|
+
|
|
241
|
+
# Parse instruments
|
|
242
|
+
instruments = [inst.strip() for inst in args.instruments.split(',')]
|
|
243
|
+
|
|
244
|
+
# Determine demo/real mode
|
|
245
|
+
demo_mode = not args.real if args.real else args.demo
|
|
246
|
+
|
|
247
|
+
# Create orchestrator
|
|
248
|
+
orchestrator = SimpleTradingOrchestrator(
|
|
249
|
+
timeframe=args.timeframe,
|
|
250
|
+
instruments=instruments,
|
|
251
|
+
quality_threshold=args.quality_threshold,
|
|
252
|
+
demo=demo_mode,
|
|
253
|
+
test_mode=args.test_mode
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
# Run orchestrator
|
|
257
|
+
orchestrator.run_continuous(max_cycles=args.max_cycles)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
if __name__ == "__main__":
|
|
261
|
+
main()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jgtml
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.334
|
|
4
4
|
Summary: JGT Ml - Machine Learning Tools
|
|
5
5
|
Home-page: https://github.com/jgwill/jgtml
|
|
6
6
|
Author: GUillaume Isabelle
|
|
@@ -17,7 +17,7 @@ License-File: LICENSE
|
|
|
17
17
|
Requires-Dist: pandas>=0.25.1
|
|
18
18
|
Requires-Dist: python-dateutil>=2.8.0
|
|
19
19
|
Requires-Dist: python-dotenv>=0.19.2
|
|
20
|
-
Requires-Dist: jgtpy>=0.5.
|
|
20
|
+
Requires-Dist: jgtpy>=0.5.116
|
|
21
21
|
Requires-Dist: matplotlib>=3.3.1
|
|
22
22
|
Requires-Dist: plotly>=5.18.0
|
|
23
23
|
Requires-Dist: mplfinance>=0.12.10b0
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "jgtml"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.334"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Guillaume Isabelle", email="jgi@jgwill.com" },
|
|
10
10
|
]
|
|
@@ -17,7 +17,7 @@ dependencies = [
|
|
|
17
17
|
'pandas>=0.25.1',
|
|
18
18
|
'python-dateutil>=2.8.0',
|
|
19
19
|
'python-dotenv>=0.19.2',
|
|
20
|
-
'jgtpy>=0.5.
|
|
20
|
+
'jgtpy>=0.5.116',
|
|
21
21
|
'matplotlib>=3.3.1',
|
|
22
22
|
'plotly>=5.18.0',
|
|
23
23
|
'mplfinance>=0.12.10b0',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|