Skip to content

Commit

Permalink
fix trading strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
Haehnchen committed Mar 31, 2019
1 parent 080465f commit c9a91b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions bot.sql
Expand Up @@ -16,8 +16,8 @@ CREATE TABLE IF NOT EXISTS candlesticks (
CREATE UNIQUE INDEX unique_candle
ON candlesticks (exchange, symbol, period, time);

CREATE INDEX time_idx ON candlesticks (time);

CREATE INDEX time_idx ON candlesticks (time);
CREATE INDEX exchange_symbol_idx ON candlesticks (exchange, symbol);

CREATE TABLE IF NOT EXISTS candlesticks_log (
id INTEGER PRIMARY KEY AUTOINCREMENT,
Expand Down Expand Up @@ -56,6 +56,7 @@ CREATE TABLE IF NOT EXISTS ticker_log (
income_at BIGINT NULL
);
CREATE INDEX ticker_log_idx ON ticker_log (exchange, symbol);
CREATE INDEX ticker_log_time_idx ON ticker_log (exchange, symbol, income_at);

CREATE TABLE IF NOT EXISTS signals (
id INTEGER PRIMARY KEY AUTOINCREMENT,
Expand Down
2 changes: 1 addition & 1 deletion modules/listener/tick_listener.js
Expand Up @@ -118,7 +118,7 @@ module.exports = class TickListener {
.filter(symbol => symbol.trade && symbol.trade.strategies && symbol.trade.strategies.length > 0)
.forEach(symbol => {
symbol.trade.strategies.forEach(strategy => {
promises.push(async () => { await this.visitStrategy(strategy, symbol)})
promises.push(async () => { await this.visitTradeStrategy(strategy, symbol)})
}
)}
)
Expand Down

0 comments on commit c9a91b1

Please sign in to comment.