mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-04 19:41:02 +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:
19
web/node_modules/d3-array/src/mean.js
generated
vendored
Normal file
19
web/node_modules/d3-array/src/mean.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
export default function mean(values, valueof) {
|
||||
let count = 0;
|
||||
let sum = 0;
|
||||
if (valueof === undefined) {
|
||||
for (let value of values) {
|
||||
if (value != null && (value = +value) >= value) {
|
||||
++count, sum += value;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let index = -1;
|
||||
for (let value of values) {
|
||||
if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {
|
||||
++count, sum += value;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count) return sum / count;
|
||||
}
|
||||
Reference in New Issue
Block a user