- Scala Machine Learning Projects
- Md. Rezaul Karim
- 51字
- 2025-02-14 21:30:16
TraderActor
TraderActor receives the prediction and, based on the label, writes a log message. It can trigger an HTTP request to the specified endpoint:
override def receive: Receive = {
case data: CurrentDataWithShortTermPrediction =>
Logger.debug("received short-term prediction" + data)
data.prediction match {
case "0" => notifySellShortTerm()
case "1" => notifyHoldShortTerm()
}