mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-03 02:50:59 +08:00
Initial commit: NOFX AI Trading System
- Multi-AI competition mode (Qwen vs DeepSeek) - Binance Futures integration - AI self-learning mechanism - Professional web dashboard - Complete risk management system
This commit is contained in:
29
web/node_modules/d3-array/src/extent.js
generated
vendored
Normal file
29
web/node_modules/d3-array/src/extent.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
export default function extent(values, valueof) {
|
||||
let min;
|
||||
let max;
|
||||
if (valueof === undefined) {
|
||||
for (const value of values) {
|
||||
if (value != null) {
|
||||
if (min === undefined) {
|
||||
if (value >= value) min = max = value;
|
||||
} else {
|
||||
if (min > value) min = value;
|
||||
if (max < value) max = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let index = -1;
|
||||
for (let value of values) {
|
||||
if ((value = valueof(value, ++index, values)) != null) {
|
||||
if (min === undefined) {
|
||||
if (value >= value) min = max = value;
|
||||
} else {
|
||||
if (min > value) min = value;
|
||||
if (max < value) max = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return [min, max];
|
||||
}
|
||||
Reference in New Issue
Block a user