Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
m5l14i11 committed Aug 7, 2023
1 parent 2f926d3 commit 636b424
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ta_lib/strategies/base/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl BaseStrategy {
}
}

fn add_data(&mut self, data: OHLCV) {
fn store(&mut self, data: OHLCV) {
self.data.push_back(data);

if self.data.len() > self.lookback_period {
Expand All @@ -109,7 +109,7 @@ impl BaseStrategy {

impl Strategy for BaseStrategy {
fn next(&mut self, data: OHLCV) -> TradeAction {
self.add_data(data);
self.store(data);

if !self.can_process() {
return TradeAction::default();
Expand Down
2 changes: 1 addition & 1 deletion ta_lib/strategies/base/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub mod base;
pub mod base;

0 comments on commit 636b424

Please sign in to comment.