ADD: added first version
This commit is contained in:
13
internal/model/bar.go
Normal file
13
internal/model/bar.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Bar struct {
|
||||
Symbol string
|
||||
Time time.Time
|
||||
Open float64
|
||||
High float64
|
||||
Low float64
|
||||
Close float64
|
||||
Volume int64
|
||||
}
|
||||
14
internal/model/trade.go
Normal file
14
internal/model/trade.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Trade struct {
|
||||
Time time.Time
|
||||
Symbol string
|
||||
Side string
|
||||
Price float64
|
||||
Qty int
|
||||
Cash float64
|
||||
StopPrice float64 // ATR-based stop
|
||||
TakeProfit float64 // ATR-based take profit
|
||||
}
|
||||
10
internal/model/types.go
Normal file
10
internal/model/types.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package model
|
||||
|
||||
type Signal int
|
||||
|
||||
const (
|
||||
Hold Signal = iota
|
||||
Buy
|
||||
Sell
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user