[INFO] cloning repository https://github.com/windopper/ctb [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/windopper/ctb" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwindopper%2Fctb", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwindopper%2Fctb'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] cceb98b8fb0ad60c514eb764c6fa630790b15ea5 [INFO] building windopper/ctb against master#c7f6aa2869acdbf014d094c6e427e554e160b6db for pr-146237-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwindopper%2Fctb" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/windopper/ctb [INFO] removed 0 missing tests [INFO] finished tweaking git repo https://github.com/windopper/ctb [INFO] tweaked toml for git repo https://github.com/windopper/ctb written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/windopper/ctb on toolchain c7f6aa2869acdbf014d094c6e427e554e160b6db [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+c7f6aa2869acdbf014d094c6e427e554e160b6db" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/windopper/ctb already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+c7f6aa2869acdbf014d094c6e427e554e160b6db" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded webhook v2.1.2 [INFO] [stderr] Downloaded jwt v0.16.0 [INFO] [stderr] Downloaded dotenv_codegen_implementation v0.15.0 [INFO] [stderr] Downloaded linregress v0.5.4 [INFO] [stderr] Downloaded dotenv_codegen v0.15.0 [INFO] [stderr] Downloaded ctrlc v3.4.7 [INFO] [stderr] Downloaded nalgebra v0.33.2 [INFO] [stderr] Downloaded openssl-src v300.5.1+3.5.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+c7f6aa2869acdbf014d094c6e427e554e160b6db" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0b11aa71864249c0b03d318ad0fdf1b9f6be3102ab9ca2c5e2a6631e1b1a5a61 [INFO] running `Command { std: "docker" "start" "-a" "0b11aa71864249c0b03d318ad0fdf1b9f6be3102ab9ca2c5e2a6631e1b1a5a61", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0b11aa71864249c0b03d318ad0fdf1b9f6be3102ab9ca2c5e2a6631e1b1a5a61", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0b11aa71864249c0b03d318ad0fdf1b9f6be3102ab9ca2c5e2a6631e1b1a5a61", kill_on_drop: false }` [INFO] [stdout] 0b11aa71864249c0b03d318ad0fdf1b9f6be3102ab9ca2c5e2a6631e1b1a5a61 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+c7f6aa2869acdbf014d094c6e427e554e160b6db" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 89b93a7dc9f45c7e0699a001194b127d7759538c6498796309bd55861e18c7a0 [INFO] running `Command { std: "docker" "start" "-a" "89b93a7dc9f45c7e0699a001194b127d7759538c6498796309bd55861e18c7a0", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling cfg-if v1.0.1 [INFO] [stderr] Compiling smallvec v1.15.1 [INFO] [stderr] Compiling cc v1.2.30 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling bitflags v2.9.1 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Compiling zerocopy v0.8.26 [INFO] [stderr] Compiling log v0.4.27 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling slab v0.4.10 [INFO] [stderr] Compiling hashbrown v0.15.4 [INFO] [stderr] Compiling serde_json v1.0.141 [INFO] [stderr] Compiling bytemuck v1.23.1 [INFO] [stderr] Compiling http-body v0.4.6 [INFO] [stderr] Compiling matrixmultiply v0.3.10 [INFO] [stderr] Compiling proc-macro-hack v0.5.20+deprecated [INFO] [stderr] Compiling safe_arch v0.7.4 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling memchr v2.7.5 [INFO] [stderr] Compiling nix v0.30.1 [INFO] [stderr] Compiling rawpointer v0.2.1 [INFO] [stderr] Compiling sha1 v0.10.6 [INFO] [stderr] Compiling data-encoding v2.9.0 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Compiling encoding_rs v0.8.35 [INFO] [stderr] Compiling iana-time-zone v0.1.63 [INFO] [stderr] Compiling colored v2.2.0 [INFO] [stderr] Compiling wide v0.7.33 [INFO] [stderr] Compiling indexmap v2.10.0 [INFO] [stderr] Compiling openssl-src v300.5.1+3.5.1 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Compiling num-integer v0.1.46 [INFO] [stderr] Compiling approx v0.5.1 [INFO] [stderr] Compiling num-complex v0.4.6 [INFO] [stderr] Compiling chrono v0.4.41 [INFO] [stderr] Compiling num-rational v0.4.2 [INFO] [stderr] Compiling simba v0.9.0 [INFO] [stderr] Compiling ppv-lite86 v0.2.21 [INFO] [stderr] Compiling dotenv_codegen_implementation v0.15.0 [INFO] [stderr] Compiling parking_lot_core v0.9.11 [INFO] [stderr] Compiling mio v1.0.4 [INFO] [stderr] Compiling signal-hook-registry v1.4.5 [INFO] [stderr] Compiling socket2 v0.5.10 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Compiling rand_core v0.9.3 [INFO] [stderr] Compiling uuid v1.17.0 [INFO] [stderr] Compiling dotenv_codegen v0.15.0 [INFO] [stderr] Compiling rand_chacha v0.9.0 [INFO] [stderr] Compiling parking_lot v0.12.4 [INFO] [stderr] Compiling rand v0.9.2 [INFO] [stderr] Compiling ctrlc v3.4.7 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling tokio v1.46.1 [INFO] [stderr] Compiling futures-util v0.3.31 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Compiling yoke v0.8.0 [INFO] [stderr] Compiling zerovec v0.11.2 [INFO] [stderr] Compiling zerotrie v0.2.2 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Compiling tinystr v0.8.1 [INFO] [stderr] Compiling potential_utf v0.1.2 [INFO] [stderr] Compiling icu_collections v2.0.0 [INFO] [stderr] Compiling icu_locale_core v2.0.0 [INFO] [stderr] Compiling icu_provider v2.0.0 [INFO] [stderr] Compiling nalgebra v0.33.2 [INFO] [stderr] Compiling icu_normalizer v2.0.0 [INFO] [stderr] Compiling icu_properties v2.0.1 [INFO] [stderr] Compiling idna_adapter v1.2.1 [INFO] [stderr] Compiling tokio-util v0.7.15 [INFO] [stderr] Compiling idna v1.0.3 [INFO] [stderr] Compiling url v2.5.4 [INFO] [stderr] Compiling serde_urlencoded v0.7.1 [INFO] [stderr] Compiling h2 v0.3.27 [INFO] [stderr] Compiling jwt v0.16.0 [INFO] [stderr] Compiling hyper v0.14.32 [INFO] [stderr] Compiling linregress v0.5.4 [INFO] [stderr] Compiling tokio-native-tls v0.3.1 [INFO] [stderr] Compiling tungstenite v0.27.0 [INFO] [stderr] Compiling hyper-tls v0.5.0 [INFO] [stderr] Compiling reqwest v0.11.27 [INFO] [stderr] Compiling webhook v2.1.2 [INFO] [stderr] Compiling tokio-tungstenite v0.27.0 [INFO] [stderr] Compiling ctb v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `level::find_support_resistance`, `previous::find_previous_trough_with_index`, and `rsi::calculate_rsi` [INFO] [stdout] --> src/strategy/vwma_ma.rs:4:47 [INFO] [stdout] | [INFO] [stdout] 4 | ...te_adx, AdxCandle}, level::find_support_resistance, previous::find_previous_trough_with_index, rsi::calculate_rsi, sma::calculate_sma,... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `level::find_support_resistance` and `previous::find_previous_trough_with_index` [INFO] [stdout] --> src/strategy/vwma_ma_grok.rs:4:100 [INFO] [stdout] | [INFO] [stdout] 4 | ...rCandle}, ema::calculate_ema, level::find_support_resistance, previous::find_previous_trough_with_index, rsi::calculate_rsi, sma::calc... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/strategy/orderbook.rs:52:15 [INFO] [stdout] | [INFO] [stdout] 52 | } else if (supports.len() == 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 52 - } else if (supports.len() == 1) { [INFO] [stdout] 52 + } else if supports.len() == 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/strategy/orderbook.rs:84:15 [INFO] [stdout] | [INFO] [stdout] 84 | } else if (resistances.len() == 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 84 - } else if (resistances.len() == 1) { [INFO] [stdout] 84 + } else if resistances.len() == 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `footprint`, `orderbook::Orderbook`, and `orderbook::top_n_orderbook_ratio` [INFO] [stdout] --> src/strategy/of1.rs:3:81 [INFO] [stdout] | [INFO] [stdout] 3 | ...}, orderbook::Orderbook, signal::{Signal, SignalReason}, ticker::Ticker, trade::Trade}, helper::{footprint::{footprint, FootprintValue}, orderbook::top_n_orderbook_ratio}}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AtrCandle`, `CandleTrait`, and `calculate_atr` [INFO] [stdout] --> src/strategy/candle_pattern.rs:3:29 [INFO] [stdout] | [INFO] [stdout] 3 | core::{candle::{Candle, CandleTrait}, signal::{Signal, SignalReason}}, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 4 | helper::{atr::{calculate_atr, AtrCandle}, bollinger_bands::calculate_bollinger_bands, candle::{identify_candle_pattern, CandlePattern... [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/helper/support_resistance.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `lib::MarketState` and `orderbook` [INFO] [stdout] --> src/backtest/simulate.rs:8:107 [INFO] [stdout] | [INFO] [stdout] 8 | ...{candle_pattern, lib::MarketState, of1::{calculate_of1_indicator_every_1mcandle, of1, Of1Params, Of1State}, orderbook}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/webhook/lib.rs:49:28 [INFO] [stdout] | [INFO] [stdout] 49 | let profit_potential = ((take_profit - price) / price * 100.0); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 49 - let profit_potential = ((take_profit - price) / price * 100.0); [INFO] [stdout] 49 + let profit_potential = (take_profit - price) / price * 100.0 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/webhook/lib.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | let loss_potential = ((price - stop_loss) / price * 100.0); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 50 - let loss_potential = ((price - stop_loss) / price * 100.0); [INFO] [stdout] 50 + let loss_potential = (price - stop_loss) / price * 100.0 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result` [INFO] [stdout] --> src/webhook/lib.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | Ok(result) => { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `color_emoji` [INFO] [stdout] --> src/webhook/lib.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | let (emoji, color_emoji) = if profit_loss >= 0.0 { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_color_emoji` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `candle::CandleTrait` [INFO] [stdout] --> src/strategy/vwma_ma.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | core::{candle::CandleTrait, signal::{Signal, SignalReason}}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `candle::CandleTrait` [INFO] [stdout] --> src/strategy/vwma_ma_grok.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | core::{candle::CandleTrait, signal::{Signal, SignalReason}}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/vi_rsi.rs:15:37 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn run(state: &mut MarketState, params: &StrategyParams, current_position: &mut PositionState) -> Signal { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `second_last_ema_5` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let second_last_ema_5 = ema_5[ema_5.len() - 2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 26 | let _second_last_ema_5 = ema_5[ema_5.len() - 2]; [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 26 - let second_last_ema_5 = ema_5[ema_5.len() - 2]; [INFO] [stdout] 26 + let backtest::lib::INITIAL_ASSET = ema_5[ema_5.len() - 2]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `second_last_ema_20` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let second_last_ema_20 = ema_20[ema_20.len() - 2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 29 | let _second_last_ema_20 = ema_20[ema_20.len() - 2]; [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 29 - let second_last_ema_20 = ema_20[ema_20.len() - 2]; [INFO] [stdout] 29 + let backtest::lib::INITIAL_ASSET = ema_20[ema_20.len() - 2]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `is_last_macd_positive` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let is_last_macd_positive = last_macd > 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_is_last_macd_positive` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:10:37 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn run(state: &mut MarketState, params: &StrategyParams, current_position: &mut PositionState) -> Signal { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rsi` [INFO] [stdout] --> src/strategy/scalp.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let rsi = calculate_rsi(&closes, 14); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_rsi` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_price` [INFO] [stdout] --> src/strategy/orderbook.rs:109:47 [INFO] [stdout] | [INFO] [stdout] 109 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_asset` [INFO] [stdout] --> src/strategy/orderbook.rs:109:60 [INFO] [stdout] | [INFO] [stdout] 109 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_asset: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trailing_stop_price` [INFO] [stdout] --> src/strategy/orderbook.rs:109:92 [INFO] [stdout] | [INFO] [stdout] 109 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try ignoring the field: `trailing_stop_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/orderbook.rs:6:37 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn run(state: &mut MarketState, params: &StrategyParams, position: &mut PositionState) -> Signal { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `ask_volume_sum` is assigned to, but never used [INFO] [stdout] --> src/strategy/of1.rs:105:21 [INFO] [stdout] | [INFO] [stdout] 105 | let mut ask_volume_sum = 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_ask_volume_sum` instead [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 105 - let mut ask_volume_sum = 0.0; [INFO] [stdout] 105 + let mut backtest::lib::INITIAL_ASSET = 0.0; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/of1.rs:74:69 [INFO] [stdout] | [INFO] [stdout] 74 | pub fn calculate_of1_indicator_every_1mcandle(state: &mut Of1State, params: &Of1Params) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_price` [INFO] [stdout] --> src/strategy/of1.rs:215:47 [INFO] [stdout] | [INFO] [stdout] 215 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_asset` [INFO] [stdout] --> src/strategy/of1.rs:215:60 [INFO] [stdout] | [INFO] [stdout] 215 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_asset: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `calculated_stop` [INFO] [stdout] --> src/strategy/candle_pattern.rs:203:13 [INFO] [stdout] | [INFO] [stdout] 203 | let calculated_stop = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 203 | let _calculated_stop = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 203 - let calculated_stop = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] 203 + let backtest::lib::INITIAL_ASSET = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `avg_volume` [INFO] [stdout] --> src/strategy/candle_pattern.rs:389:28 [INFO] [stdout] | [INFO] [stdout] 389 | let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 389 | let (volume_ratio, _avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 389 - let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] 389 + let (volume_ratio, backtest::lib::INITIAL_ASSET) = self.calculate_volume_ratio(config); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `config` [INFO] [stdout] --> src/strategy/candle_pattern.rs:599:38 [INFO] [stdout] | [INFO] [stdout] 599 | fn calculate_volume_ratio(&self, config: &CandlePatternStrategyConfig) -> (f64, f64) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_config` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `avg_volume` [INFO] [stdout] --> src/strategy/candle_pattern.rs:656:28 [INFO] [stdout] | [INFO] [stdout] 656 | let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 656 | let (volume_ratio, _avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 656 - let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] 656 + let (volume_ratio, backtest::lib::INITIAL_ASSET) = self.calculate_volume_ratio(config); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `min_trade_interval` [INFO] [stdout] --> src/strategy/candle_pattern.rs:709:9 [INFO] [stdout] | [INFO] [stdout] 709 | let min_trade_interval = 3; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_min_trade_interval` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `next_sar` is never read [INFO] [stdout] --> src/helper/parabolic_sar.rs:30:17 [INFO] [stdout] | [INFO] [stdout] 30 | let mut next_sar = sar; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `orderbook` [INFO] [stdout] --> src/helper/orderbook.rs:3:25 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn orderbook_helper(orderbook: &Orderbook) { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_orderbook` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `RSI_OVERBOUGHT` is never used [INFO] [stdout] --> src/strategy/scalp.rs:17:7 [INFO] [stdout] | [INFO] [stdout] 17 | const RSI_OVERBOUGHT: f64 = 70.0; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `RSI_OVERSOLD` is never used [INFO] [stdout] --> src/strategy/scalp.rs:18:7 [INFO] [stdout] | [INFO] [stdout] 18 | const RSI_OVERSOLD: f64 = 30.0; // 매수 조건에 활용 가능 [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `risk_pct` is never read [INFO] [stdout] --> src/strategy/vwma_ma_grok.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct StrategyParams { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 14 | risk_pct: f64, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `volume_threshold`, `max_consecutive_losses`, `trend_strength_threshold`, and `ema_slope_period` are never read [INFO] [stdout] --> src/strategy/candle_pattern.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 18 | pub struct CandlePatternStrategyConfig { [INFO] [stdout] | --------------------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 23 | volume_threshold: f64, // 거래량 임계값 (평균 대비) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | max_consecutive_losses: usize, // 최대 연속 손실 허용 횟수 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 34 | trend_strength_threshold: f64, // 추세 강도 임계값 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 35 | reversal_volume_multiplier: f64, // 반전 신호 거래량 배수 [INFO] [stdout] 36 | ema_slope_period: usize, // EMA 기울기 계산을 위한 기간 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DateTime`, `Duration`, `TimeZone`, and `Utc` [INFO] [stdout] --> src/main.rs:7:14 [INFO] [stdout] | [INFO] [stdout] 7 | use chrono::{DateTime, Utc, Duration, TimeZone}; [INFO] [stdout] | ^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `CODES` is never used [INFO] [stdout] --> src/main.rs:10:7 [INFO] [stdout] | [INFO] [stdout] 10 | const CODES: [&str; 5] = ["KRW-XRP", "KRW-BLAST", "KRW-BTC", "KRW-ETH", "KRW-GLM"]; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `realtime_simulation` is never used [INFO] [stdout] --> src/main.rs:60:10 [INFO] [stdout] | [INFO] [stdout] 60 | async fn realtime_simulation() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3m 46s [INFO] running `Command { std: "docker" "inspect" "89b93a7dc9f45c7e0699a001194b127d7759538c6498796309bd55861e18c7a0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "89b93a7dc9f45c7e0699a001194b127d7759538c6498796309bd55861e18c7a0", kill_on_drop: false }` [INFO] [stdout] 89b93a7dc9f45c7e0699a001194b127d7759538c6498796309bd55861e18c7a0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+c7f6aa2869acdbf014d094c6e427e554e160b6db" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 27bac0df477abfcb63808d288c4266296497058c7da3741848119f2027aa9146 [INFO] running `Command { std: "docker" "start" "-a" "27bac0df477abfcb63808d288c4266296497058c7da3741848119f2027aa9146", kill_on_drop: false }` [INFO] [stdout] warning: unused imports: `level::find_support_resistance`, `previous::find_previous_trough_with_index`, and `rsi::calculate_rsi` [INFO] [stdout] --> src/strategy/vwma_ma.rs:4:47 [INFO] [stdout] | [INFO] [stdout] 4 | ...te_adx, AdxCandle}, level::find_support_resistance, previous::find_previous_trough_with_index, rsi::calculate_rsi, sma::calculate_sma,... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `level::find_support_resistance` and `previous::find_previous_trough_with_index` [INFO] [stdout] --> src/strategy/vwma_ma_grok.rs:4:100 [INFO] [stdout] | [INFO] [stdout] 4 | ...rCandle}, ema::calculate_ema, level::find_support_resistance, previous::find_previous_trough_with_index, rsi::calculate_rsi, sma::calc... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/strategy/orderbook.rs:52:15 [INFO] [stdout] | [INFO] [stdout] 52 | } else if (supports.len() == 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 52 - } else if (supports.len() == 1) { [INFO] [stdout] 52 + } else if supports.len() == 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/strategy/orderbook.rs:84:15 [INFO] [stdout] | [INFO] [stdout] 84 | } else if (resistances.len() == 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 84 - } else if (resistances.len() == 1) { [INFO] [stdout] 84 + } else if resistances.len() == 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `footprint`, `orderbook::Orderbook`, and `orderbook::top_n_orderbook_ratio` [INFO] [stdout] --> src/strategy/of1.rs:3:81 [INFO] [stdout] | [INFO] [stdout] 3 | ...}, orderbook::Orderbook, signal::{Signal, SignalReason}, ticker::Ticker, trade::Trade}, helper::{footprint::{footprint, FootprintValue}, orderbook::top_n_orderbook_ratio}}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AtrCandle`, `CandleTrait`, and `calculate_atr` [INFO] [stdout] --> src/strategy/candle_pattern.rs:3:29 [INFO] [stdout] | [INFO] [stdout] 3 | core::{candle::{Candle, CandleTrait}, signal::{Signal, SignalReason}}, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 4 | helper::{atr::{calculate_atr, AtrCandle}, bollinger_bands::calculate_bollinger_bands, candle::{identify_candle_pattern, CandlePattern... [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/helper/support_resistance.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `lib::MarketState` and `orderbook` [INFO] [stdout] --> src/backtest/simulate.rs:8:107 [INFO] [stdout] | [INFO] [stdout] 8 | ...{candle_pattern, lib::MarketState, of1::{calculate_of1_indicator_every_1mcandle, of1, Of1Params, Of1State}, orderbook}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/webhook/lib.rs:49:28 [INFO] [stdout] | [INFO] [stdout] 49 | let profit_potential = ((take_profit - price) / price * 100.0); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 49 - let profit_potential = ((take_profit - price) / price * 100.0); [INFO] [stdout] 49 + let profit_potential = (take_profit - price) / price * 100.0 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/webhook/lib.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | let loss_potential = ((price - stop_loss) / price * 100.0); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 50 - let loss_potential = ((price - stop_loss) / price * 100.0); [INFO] [stdout] 50 + let loss_potential = (price - stop_loss) / price * 100.0 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result` [INFO] [stdout] --> src/webhook/lib.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | Ok(result) => { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `color_emoji` [INFO] [stdout] --> src/webhook/lib.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | let (emoji, color_emoji) = if profit_loss >= 0.0 { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_color_emoji` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `candle::CandleTrait` [INFO] [stdout] --> src/strategy/vwma_ma.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | core::{candle::CandleTrait, signal::{Signal, SignalReason}}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `candle::CandleTrait` [INFO] [stdout] --> src/strategy/vwma_ma_grok.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | core::{candle::CandleTrait, signal::{Signal, SignalReason}}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/vi_rsi.rs:15:37 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn run(state: &mut MarketState, params: &StrategyParams, current_position: &mut PositionState) -> Signal { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `second_last_ema_5` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let second_last_ema_5 = ema_5[ema_5.len() - 2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 26 | let _second_last_ema_5 = ema_5[ema_5.len() - 2]; [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 26 - let second_last_ema_5 = ema_5[ema_5.len() - 2]; [INFO] [stdout] 26 + let backtest::lib::INITIAL_ASSET = ema_5[ema_5.len() - 2]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `second_last_ema_20` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let second_last_ema_20 = ema_20[ema_20.len() - 2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 29 | let _second_last_ema_20 = ema_20[ema_20.len() - 2]; [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 29 - let second_last_ema_20 = ema_20[ema_20.len() - 2]; [INFO] [stdout] 29 + let backtest::lib::INITIAL_ASSET = ema_20[ema_20.len() - 2]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `is_last_macd_positive` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let is_last_macd_positive = last_macd > 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_is_last_macd_positive` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling ctb v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:10:37 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn run(state: &mut MarketState, params: &StrategyParams, current_position: &mut PositionState) -> Signal { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rsi` [INFO] [stdout] --> src/strategy/scalp.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let rsi = calculate_rsi(&closes, 14); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_rsi` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_price` [INFO] [stdout] --> src/strategy/orderbook.rs:109:47 [INFO] [stdout] | [INFO] [stdout] 109 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_asset` [INFO] [stdout] --> src/strategy/orderbook.rs:109:60 [INFO] [stdout] | [INFO] [stdout] 109 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_asset: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trailing_stop_price` [INFO] [stdout] --> src/strategy/orderbook.rs:109:92 [INFO] [stdout] | [INFO] [stdout] 109 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try ignoring the field: `trailing_stop_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/orderbook.rs:6:37 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn run(state: &mut MarketState, params: &StrategyParams, position: &mut PositionState) -> Signal { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `ask_volume_sum` is assigned to, but never used [INFO] [stdout] --> src/strategy/of1.rs:105:21 [INFO] [stdout] | [INFO] [stdout] 105 | let mut ask_volume_sum = 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_ask_volume_sum` instead [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 105 - let mut ask_volume_sum = 0.0; [INFO] [stdout] 105 + let mut backtest::lib::INITIAL_ASSET = 0.0; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/of1.rs:74:69 [INFO] [stdout] | [INFO] [stdout] 74 | pub fn calculate_of1_indicator_every_1mcandle(state: &mut Of1State, params: &Of1Params) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_price` [INFO] [stdout] --> src/strategy/of1.rs:215:47 [INFO] [stdout] | [INFO] [stdout] 215 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_asset` [INFO] [stdout] --> src/strategy/of1.rs:215:60 [INFO] [stdout] | [INFO] [stdout] 215 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_asset: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `calculated_stop` [INFO] [stdout] --> src/strategy/candle_pattern.rs:203:13 [INFO] [stdout] | [INFO] [stdout] 203 | let calculated_stop = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 203 | let _calculated_stop = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 203 - let calculated_stop = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] 203 + let backtest::lib::INITIAL_ASSET = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `avg_volume` [INFO] [stdout] --> src/strategy/candle_pattern.rs:389:28 [INFO] [stdout] | [INFO] [stdout] 389 | let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 389 | let (volume_ratio, _avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 389 - let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] 389 + let (volume_ratio, backtest::lib::INITIAL_ASSET) = self.calculate_volume_ratio(config); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `config` [INFO] [stdout] --> src/strategy/candle_pattern.rs:599:38 [INFO] [stdout] | [INFO] [stdout] 599 | fn calculate_volume_ratio(&self, config: &CandlePatternStrategyConfig) -> (f64, f64) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_config` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `avg_volume` [INFO] [stdout] --> src/strategy/candle_pattern.rs:656:28 [INFO] [stdout] | [INFO] [stdout] 656 | let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 656 | let (volume_ratio, _avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 656 - let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] 656 + let (volume_ratio, backtest::lib::INITIAL_ASSET) = self.calculate_volume_ratio(config); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `min_trade_interval` [INFO] [stdout] --> src/strategy/candle_pattern.rs:709:9 [INFO] [stdout] | [INFO] [stdout] 709 | let min_trade_interval = 3; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_min_trade_interval` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `next_sar` is never read [INFO] [stdout] --> src/helper/parabolic_sar.rs:30:17 [INFO] [stdout] | [INFO] [stdout] 30 | let mut next_sar = sar; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `orderbook` [INFO] [stdout] --> src/helper/orderbook.rs:3:25 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn orderbook_helper(orderbook: &Orderbook) { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_orderbook` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `RSI_OVERBOUGHT` is never used [INFO] [stdout] --> src/strategy/scalp.rs:17:7 [INFO] [stdout] | [INFO] [stdout] 17 | const RSI_OVERBOUGHT: f64 = 70.0; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `RSI_OVERSOLD` is never used [INFO] [stdout] --> src/strategy/scalp.rs:18:7 [INFO] [stdout] | [INFO] [stdout] 18 | const RSI_OVERSOLD: f64 = 30.0; // 매수 조건에 활용 가능 [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `risk_pct` is never read [INFO] [stdout] --> src/strategy/vwma_ma_grok.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct StrategyParams { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 14 | risk_pct: f64, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `volume_threshold`, `max_consecutive_losses`, `trend_strength_threshold`, and `ema_slope_period` are never read [INFO] [stdout] --> src/strategy/candle_pattern.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 18 | pub struct CandlePatternStrategyConfig { [INFO] [stdout] | --------------------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 23 | volume_threshold: f64, // 거래량 임계값 (평균 대비) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | max_consecutive_losses: usize, // 최대 연속 손실 허용 횟수 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 34 | trend_strength_threshold: f64, // 추세 강도 임계값 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 35 | reversal_volume_multiplier: f64, // 반전 신호 거래량 배수 [INFO] [stdout] 36 | ema_slope_period: usize, // EMA 기울기 계산을 위한 기간 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DateTime`, `Duration`, `TimeZone`, and `Utc` [INFO] [stdout] --> src/main.rs:7:14 [INFO] [stdout] | [INFO] [stdout] 7 | use chrono::{DateTime, Utc, Duration, TimeZone}; [INFO] [stdout] | ^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `CODES` is never used [INFO] [stdout] --> src/main.rs:10:7 [INFO] [stdout] | [INFO] [stdout] 10 | const CODES: [&str; 5] = ["KRW-XRP", "KRW-BLAST", "KRW-BTC", "KRW-ETH", "KRW-GLM"]; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `realtime_simulation` is never used [INFO] [stdout] --> src/main.rs:60:10 [INFO] [stdout] | [INFO] [stdout] 60 | async fn realtime_simulation() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `CandleTrait` [INFO] [stdout] --> examples/candle_patterns.rs:1:45 [INFO] [stdout] | [INFO] [stdout] 1 | use ctb::core::candle::{Candle, CandleBase, CandleTrait}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DateTime`, `Duration`, `TimeZone`, and `Utc` [INFO] [stdout] --> src/main.rs:7:14 [INFO] [stdout] | [INFO] [stdout] 7 | use chrono::{DateTime, Utc, Duration, TimeZone}; [INFO] [stdout] | ^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `CODES` is never used [INFO] [stdout] --> src/main.rs:10:7 [INFO] [stdout] | [INFO] [stdout] 10 | const CODES: [&str; 5] = ["KRW-XRP", "KRW-BLAST", "KRW-BTC", "KRW-ETH", "KRW-GLM"]; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `realtime_simulation` is never used [INFO] [stdout] --> src/main.rs:60:10 [INFO] [stdout] | [INFO] [stdout] 60 | async fn realtime_simulation() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused implementer of `Future` that must be used [INFO] [stdout] --> tests/webhook.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | / send_buy_signal( [INFO] [stdout] 12 | | "KRW-BTC", [INFO] [stdout] 13 | | 50000000.0, [INFO] [stdout] 14 | | 0.001, [INFO] [stdout] ... | [INFO] [stdout] 18 | | "SuperTrend + EMA" [INFO] [stdout] 19 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: futures do nothing unless you `.await` or poll them [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused implementer of `Future` that must be used [INFO] [stdout] --> tests/webhook.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / send_sell_signal( [INFO] [stdout] 25 | | "KRW-BTC", [INFO] [stdout] 26 | | 52000000.0, [INFO] [stdout] 27 | | 0.001, [INFO] [stdout] ... | [INFO] [stdout] 31 | | "목표가 도달" [INFO] [stdout] 32 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: futures do nothing unless you `.await` or poll them [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused implementer of `Future` that must be used [INFO] [stdout] --> tests/webhook.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / send_sell_signal( [INFO] [stdout] 38 | | "KRW-BTC", [INFO] [stdout] 39 | | 48000000.0, [INFO] [stdout] 40 | | 0.001, [INFO] [stdout] ... | [INFO] [stdout] 44 | | "손절가 도달" [INFO] [stdout] 45 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: futures do nothing unless you `.await` or poll them [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused implementer of `Future` that must be used [INFO] [stdout] --> tests/webhook.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | / send_trade_summary( [INFO] [stdout] 51 | | "KRW-BTC", [INFO] [stdout] 52 | | 100, [INFO] [stdout] 53 | | 65, [INFO] [stdout] ... | [INFO] [stdout] 57 | | -500000.0 [INFO] [stdout] 58 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: futures do nothing unless you `.await` or poll them [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `level::find_support_resistance`, `previous::find_previous_trough_with_index`, and `rsi::calculate_rsi` [INFO] [stdout] --> src/strategy/vwma_ma.rs:4:47 [INFO] [stdout] | [INFO] [stdout] 4 | ...te_adx, AdxCandle}, level::find_support_resistance, previous::find_previous_trough_with_index, rsi::calculate_rsi, sma::calculate_sma,... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `level::find_support_resistance` and `previous::find_previous_trough_with_index` [INFO] [stdout] --> src/strategy/vwma_ma_grok.rs:4:100 [INFO] [stdout] | [INFO] [stdout] 4 | ...rCandle}, ema::calculate_ema, level::find_support_resistance, previous::find_previous_trough_with_index, rsi::calculate_rsi, sma::calc... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/strategy/orderbook.rs:52:15 [INFO] [stdout] | [INFO] [stdout] 52 | } else if (supports.len() == 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 52 - } else if (supports.len() == 1) { [INFO] [stdout] 52 + } else if supports.len() == 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/strategy/orderbook.rs:84:15 [INFO] [stdout] | [INFO] [stdout] 84 | } else if (resistances.len() == 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 84 - } else if (resistances.len() == 1) { [INFO] [stdout] 84 + } else if resistances.len() == 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `footprint`, `orderbook::Orderbook`, and `orderbook::top_n_orderbook_ratio` [INFO] [stdout] --> src/strategy/of1.rs:3:81 [INFO] [stdout] | [INFO] [stdout] 3 | ...}, orderbook::Orderbook, signal::{Signal, SignalReason}, ticker::Ticker, trade::Trade}, helper::{footprint::{footprint, FootprintValue}, orderbook::top_n_orderbook_ratio}}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AtrCandle`, `CandleTrait`, and `calculate_atr` [INFO] [stdout] --> src/strategy/candle_pattern.rs:3:29 [INFO] [stdout] | [INFO] [stdout] 3 | core::{candle::{Candle, CandleTrait}, signal::{Signal, SignalReason}}, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 4 | helper::{atr::{calculate_atr, AtrCandle}, bollinger_bands::calculate_bollinger_bands, candle::{identify_candle_pattern, CandlePattern... [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/helper/support_resistance.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `lib::MarketState` and `orderbook` [INFO] [stdout] --> src/backtest/simulate.rs:8:107 [INFO] [stdout] | [INFO] [stdout] 8 | ...{candle_pattern, lib::MarketState, of1::{calculate_of1_indicator_every_1mcandle, of1, Of1Params, Of1State}, orderbook}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/webhook/lib.rs:49:28 [INFO] [stdout] | [INFO] [stdout] 49 | let profit_potential = ((take_profit - price) / price * 100.0); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 49 - let profit_potential = ((take_profit - price) / price * 100.0); [INFO] [stdout] 49 + let profit_potential = (take_profit - price) / price * 100.0 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/webhook/lib.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | let loss_potential = ((price - stop_loss) / price * 100.0); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 50 - let loss_potential = ((price - stop_loss) / price * 100.0); [INFO] [stdout] 50 + let loss_potential = (price - stop_loss) / price * 100.0 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result` [INFO] [stdout] --> src/webhook/lib.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | Ok(result) => { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `color_emoji` [INFO] [stdout] --> src/webhook/lib.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | let (emoji, color_emoji) = if profit_loss >= 0.0 { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_color_emoji` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `candle::CandleTrait` [INFO] [stdout] --> src/strategy/vwma_ma.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | core::{candle::CandleTrait, signal::{Signal, SignalReason}}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `candle::CandleTrait` [INFO] [stdout] --> src/strategy/vwma_ma_grok.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | core::{candle::CandleTrait, signal::{Signal, SignalReason}}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/vi_rsi.rs:15:37 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn run(state: &mut MarketState, params: &StrategyParams, current_position: &mut PositionState) -> Signal { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `second_last_ema_5` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let second_last_ema_5 = ema_5[ema_5.len() - 2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 26 | let _second_last_ema_5 = ema_5[ema_5.len() - 2]; [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 26 - let second_last_ema_5 = ema_5[ema_5.len() - 2]; [INFO] [stdout] 26 + let backtest::lib::INITIAL_ASSET = ema_5[ema_5.len() - 2]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `second_last_ema_20` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let second_last_ema_20 = ema_20[ema_20.len() - 2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 29 | let _second_last_ema_20 = ema_20[ema_20.len() - 2]; [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 29 - let second_last_ema_20 = ema_20[ema_20.len() - 2]; [INFO] [stdout] 29 + let backtest::lib::INITIAL_ASSET = ema_20[ema_20.len() - 2]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `is_last_macd_positive` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let is_last_macd_positive = last_macd > 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_is_last_macd_positive` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/supertrend_ema.rs:10:37 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn run(state: &mut MarketState, params: &StrategyParams, current_position: &mut PositionState) -> Signal { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rsi` [INFO] [stdout] --> src/strategy/scalp.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let rsi = calculate_rsi(&closes, 14); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_rsi` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_price` [INFO] [stdout] --> src/strategy/orderbook.rs:109:47 [INFO] [stdout] | [INFO] [stdout] 109 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_asset` [INFO] [stdout] --> src/strategy/orderbook.rs:109:60 [INFO] [stdout] | [INFO] [stdout] 109 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_asset: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trailing_stop_price` [INFO] [stdout] --> src/strategy/orderbook.rs:109:92 [INFO] [stdout] | [INFO] [stdout] 109 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try ignoring the field: `trailing_stop_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/orderbook.rs:6:37 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn run(state: &mut MarketState, params: &StrategyParams, position: &mut PositionState) -> Signal { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `ask_volume_sum` is assigned to, but never used [INFO] [stdout] --> src/strategy/of1.rs:105:21 [INFO] [stdout] | [INFO] [stdout] 105 | let mut ask_volume_sum = 0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_ask_volume_sum` instead [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 105 - let mut ask_volume_sum = 0.0; [INFO] [stdout] 105 + let mut backtest::lib::INITIAL_ASSET = 0.0; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `params` [INFO] [stdout] --> src/strategy/of1.rs:74:69 [INFO] [stdout] | [INFO] [stdout] 74 | pub fn calculate_of1_indicator_every_1mcandle(state: &mut Of1State, params: &Of1Params) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_params` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_price` [INFO] [stdout] --> src/strategy/of1.rs:215:47 [INFO] [stdout] | [INFO] [stdout] 215 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_price: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `entry_asset` [INFO] [stdout] --> src/strategy/of1.rs:215:60 [INFO] [stdout] | [INFO] [stdout] 215 | } else if let PositionState::InPosition { entry_price, entry_asset, take_profit_price, trailing_stop_price } = position { [INFO] [stdout] | ^^^^^^^^^^^ help: try ignoring the field: `entry_asset: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `calculated_stop` [INFO] [stdout] --> src/strategy/candle_pattern.rs:203:13 [INFO] [stdout] | [INFO] [stdout] 203 | let calculated_stop = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 203 | let _calculated_stop = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 203 - let calculated_stop = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] 203 + let backtest::lib::INITIAL_ASSET = candle_based_stop.max(support_based_stop).max(fixed_stop).max(atr_based_stop); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `avg_volume` [INFO] [stdout] --> src/strategy/candle_pattern.rs:389:28 [INFO] [stdout] | [INFO] [stdout] 389 | let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 389 | let (volume_ratio, _avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 389 - let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] 389 + let (volume_ratio, backtest::lib::INITIAL_ASSET) = self.calculate_volume_ratio(config); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `config` [INFO] [stdout] --> src/strategy/candle_pattern.rs:599:38 [INFO] [stdout] | [INFO] [stdout] 599 | fn calculate_volume_ratio(&self, config: &CandlePatternStrategyConfig) -> (f64, f64) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_config` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `avg_volume` [INFO] [stdout] --> src/strategy/candle_pattern.rs:656:28 [INFO] [stdout] | [INFO] [stdout] 656 | let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 656 | let (volume_ratio, _avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] | + [INFO] [stdout] help: you might have meant to pattern match on the similarly named constant `INITIAL_ASSET` [INFO] [stdout] | [INFO] [stdout] 656 - let (volume_ratio, avg_volume) = self.calculate_volume_ratio(config); [INFO] [stdout] 656 + let (volume_ratio, backtest::lib::INITIAL_ASSET) = self.calculate_volume_ratio(config); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `min_trade_interval` [INFO] [stdout] --> src/strategy/candle_pattern.rs:709:9 [INFO] [stdout] | [INFO] [stdout] 709 | let min_trade_interval = 3; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_min_trade_interval` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `next_sar` is never read [INFO] [stdout] --> src/helper/parabolic_sar.rs:30:17 [INFO] [stdout] | [INFO] [stdout] 30 | let mut next_sar = sar; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `orderbook` [INFO] [stdout] --> src/helper/orderbook.rs:3:25 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn orderbook_helper(orderbook: &Orderbook) { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_orderbook` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `RSI_OVERBOUGHT` is never used [INFO] [stdout] --> src/strategy/scalp.rs:17:7 [INFO] [stdout] | [INFO] [stdout] 17 | const RSI_OVERBOUGHT: f64 = 70.0; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `RSI_OVERSOLD` is never used [INFO] [stdout] --> src/strategy/scalp.rs:18:7 [INFO] [stdout] | [INFO] [stdout] 18 | const RSI_OVERSOLD: f64 = 30.0; // 매수 조건에 활용 가능 [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `risk_pct` is never read [INFO] [stdout] --> src/strategy/vwma_ma_grok.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct StrategyParams { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 14 | risk_pct: f64, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `volume_threshold`, `max_consecutive_losses`, `trend_strength_threshold`, and `ema_slope_period` are never read [INFO] [stdout] --> src/strategy/candle_pattern.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 18 | pub struct CandlePatternStrategyConfig { [INFO] [stdout] | --------------------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 23 | volume_threshold: f64, // 거래량 임계값 (평균 대비) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | max_consecutive_losses: usize, // 최대 연속 손실 허용 횟수 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 34 | trend_strength_threshold: f64, // 추세 강도 임계값 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 35 | reversal_volume_multiplier: f64, // 반전 신호 거래량 배수 [INFO] [stdout] 36 | ema_slope_period: usize, // EMA 기울기 계산을 위한 기간 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 13.03s [INFO] running `Command { std: "docker" "inspect" "27bac0df477abfcb63808d288c4266296497058c7da3741848119f2027aa9146", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "27bac0df477abfcb63808d288c4266296497058c7da3741848119f2027aa9146", kill_on_drop: false }` [INFO] [stdout] 27bac0df477abfcb63808d288c4266296497058c7da3741848119f2027aa9146