mirror of
https://github.com/lukewilson2002/autotrader.git
synced 2025-08-02 05:09:33 +00:00
Implemented TP, SL, TSL
This commit is contained in:
@@ -42,6 +42,14 @@ func NewOandaBroker(token, accountID string, practice bool) *OandaBroker {
|
||||
}
|
||||
}
|
||||
|
||||
// Price returns the ask price if wantToBuy is true and the bid price if wantToBuy is false.
|
||||
func (b *OandaBroker) Price(symbol string, wantToBuy bool) float64 {
|
||||
if wantToBuy {
|
||||
return b.Ask(symbol)
|
||||
}
|
||||
return b.Bid(symbol)
|
||||
}
|
||||
|
||||
func (b *OandaBroker) Bid(symbol string) float64 {
|
||||
return 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user