codifx 0.1.2 → 0.1.4
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.
- package/README.md +131 -0
- package/config/watchlist.json +791 -0
- package/dist/cli/commands/scan.d.ts +2 -0
- package/dist/cli/commands/scan.d.ts.map +1 -1
- package/dist/cli/commands/scan.js +38 -4
- package/dist/cli/commands/scan.js.map +1 -1
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/config/loader.d.ts +13 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +60 -5
- package/dist/config/loader.js.map +1 -1
- package/dist/data/provider.d.ts +1 -1
- package/dist/data/provider.d.ts.map +1 -1
- package/dist/data/provider.js.map +1 -1
- package/dist/data/yahoo.d.ts +2 -1
- package/dist/data/yahoo.d.ts.map +1 -1
- package/dist/data/yahoo.js +16 -4
- package/dist/data/yahoo.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -62,6 +62,137 @@ codifx scan --symbols BBCA TLKM --html
|
|
|
62
62
|
codifx scan --symbols BBCA TLKM --log
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
+
### Custom Profiles & Watchlists
|
|
66
|
+
|
|
67
|
+
Create custom trading strategies with your own profiles and symbol lists.
|
|
68
|
+
|
|
69
|
+
#### Creating a Custom Profile
|
|
70
|
+
|
|
71
|
+
Create a JSON file (e.g., `my-strategy.profile.json`):
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"tradingType": "day",
|
|
76
|
+
"timeframes": {
|
|
77
|
+
"primary": "5m",
|
|
78
|
+
"confirmation": "15m"
|
|
79
|
+
},
|
|
80
|
+
"indicators": {
|
|
81
|
+
"trend": ["EMA10", "EMA20", "EMA50"],
|
|
82
|
+
"oscillators": ["RSI", "Stochastic", "MACD", "ADX"]
|
|
83
|
+
},
|
|
84
|
+
"weights": {
|
|
85
|
+
"trend": 40,
|
|
86
|
+
"oscillator": 60
|
|
87
|
+
},
|
|
88
|
+
"filters": {
|
|
89
|
+
"minVolume": 1000000,
|
|
90
|
+
"minADX": 20,
|
|
91
|
+
"atrMinPercent": 1.0,
|
|
92
|
+
"atrMaxPercent": 4.0
|
|
93
|
+
},
|
|
94
|
+
"scoring": {
|
|
95
|
+
"minScore": 70
|
|
96
|
+
},
|
|
97
|
+
"dataSource": {
|
|
98
|
+
"market": "IDX",
|
|
99
|
+
"provider": "yahoo"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Key Parameters:**
|
|
105
|
+
|
|
106
|
+
- `weights.trend` / `weights.oscillator` - Must total 100
|
|
107
|
+
- `scoring.minScore` - Higher = more selective (60-80 recommended)
|
|
108
|
+
- `filters.minVolume` - Daily volume threshold
|
|
109
|
+
- `filters.minADX` - Trend strength (15-25 typical)
|
|
110
|
+
|
|
111
|
+
#### Creating a Custom Watchlist
|
|
112
|
+
|
|
113
|
+
**Simple Array Format:**
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
["BBCA", "TLKM", "ASII", "UNVR", "ICBP"]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Object Format with Metadata:**
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"name": "Banking Sector",
|
|
124
|
+
"market": "IDX",
|
|
125
|
+
"symbols": ["BBCA", "BBNI", "BBRI", "BMRI", "BDMN", "BNGA"]
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Multi-Market Format:**
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
[
|
|
133
|
+
{
|
|
134
|
+
"name": "IDX Blue Chips",
|
|
135
|
+
"market": "IDX",
|
|
136
|
+
"symbols": ["BBCA", "TLKM", "ASII", "UNVR"]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "US Tech",
|
|
140
|
+
"market": "NASDAQ",
|
|
141
|
+
"symbols": ["AAPL", "MSFT", "GOOGL", "NVDA"]
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### Usage Examples
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Use custom profile only
|
|
150
|
+
codifx scan --profile aggressive-day.json --symbols BBCA TLKM
|
|
151
|
+
|
|
152
|
+
# Use custom watchlist only
|
|
153
|
+
codifx scan --watchlist banking-sector.json --html
|
|
154
|
+
|
|
155
|
+
# Combine custom profile + watchlist
|
|
156
|
+
codifx scan \
|
|
157
|
+
--profile scalp.json \
|
|
158
|
+
--watchlist high-volume.json \
|
|
159
|
+
--date 2025-12-22 \
|
|
160
|
+
--html
|
|
161
|
+
|
|
162
|
+
# Built-in trade type + custom watchlist
|
|
163
|
+
codifx scan --trade-type swing --watchlist my-stocks.json
|
|
164
|
+
|
|
165
|
+
# All options combined
|
|
166
|
+
codifx scan \
|
|
167
|
+
--profile my-strategy.json \
|
|
168
|
+
--watchlist tech-stocks.json \
|
|
169
|
+
--direction buy \
|
|
170
|
+
--date 2025-12-20 \
|
|
171
|
+
--html \
|
|
172
|
+
--log
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Symbol Priority:** `--symbol` > `--symbols` > `--watchlist` > profile default
|
|
176
|
+
|
|
177
|
+
### Historical Backtesting
|
|
178
|
+
|
|
179
|
+
Test your strategy with historical data (max 7 days back):
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# Scan as of specific date
|
|
183
|
+
codifx scan --symbols BBCA TLKM --date 2025-12-22
|
|
184
|
+
|
|
185
|
+
# Backtest with HTML dashboard
|
|
186
|
+
codifx scan --symbols BBCA --date 2025-12-20 --html --log
|
|
187
|
+
|
|
188
|
+
# Compare historical vs current
|
|
189
|
+
codifx scan --symbols BBCA --date 2025-12-20 --log
|
|
190
|
+
codifx scan --symbols BBCA --log # Today's scan
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Date Format**: `YYYY-MM-DD` (e.g., `2025-12-22`)
|
|
194
|
+
**Limitation**: Maximum 7 days back, cannot be in the future
|
|
195
|
+
|
|
65
196
|
### Profile Management
|
|
66
197
|
|
|
67
198
|
```bash
|