Skip to content

Commit

Permalink
fixed findings 5
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaron committed Aug 5, 2024
1 parent 3836328 commit 4a3b196
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import org.roboquant.feeds.EventChannel
import org.roboquant.feeds.Feed
import org.roboquant.journals.MemoryJournal
import org.roboquant.strategies.Strategy
import org.roboquant.traders.FlexTrader
import org.roboquant.traders.Trader
import java.util.concurrent.ConcurrentHashMap
import kotlin.collections.set

Expand Down Expand Up @@ -97,6 +99,7 @@ open class WebServer(configure: WebServerConfig.() -> Unit = {}) {
name: String = getRunName(),
feed: Feed,
strategy: Strategy,
trader: Trader = FlexTrader(),
journal: MemoryJournal = MemoryJournal(),
timeframe: Timeframe = Timeframe.INFINITE,
broker: Broker = SimBroker(),
Expand All @@ -108,7 +111,16 @@ open class WebServer(configure: WebServerConfig.() -> Unit = {}) {
val info = RunInfo(journal, timeframe, pausubaleStrategy, broker)
runs[name] = info
logger.info { "Starting new run name=$name timeframe=$timeframe" }
org.roboquant.runAsync(feed, pausubaleStrategy, journal = journal, timeframe = timeframe, broker = broker, channel = channel, timeOutMillis = timeOutMillis)
org.roboquant.runAsync(
feed,
pausubaleStrategy,
trader,
journal = journal,
timeframe = timeframe,
broker = broker,
channel = channel,
timeOutMillis = timeOutMillis
)
}

}
Expand Down

0 comments on commit 4a3b196

Please sign in to comment.