Documentation ¶
Index ¶
- func And(a, b gbt.AlgoHandler) gbt.AlgoHandler
- func BiggerThan(first, second gbt.AlgoHandler) gbt.AlgoHandler
- func BoolAlgo(b bool) gbt.AlgoHandler
- func CreateSignal(direction string) gbt.AlgoHandler
- func Equal(first, second gbt.AlgoHandler) gbt.AlgoHandler
- func If(condition, action gbt.AlgoHandler) gbt.AlgoHandler
- func IsInvested(symbols ...string) gbt.AlgoHandler
- func NotInvested(symbols ...string) gbt.AlgoHandler
- func Or(a, b gbt.AlgoHandler) gbt.AlgoHandler
- func RunDaily(opt ...string) gbt.AlgoHandler
- func RunMonthly(opt ...string) gbt.AlgoHandler
- func RunOnce() gbt.AlgoHandler
- func RunQuarterly(opt ...string) gbt.AlgoHandler
- func RunWeekly(opt ...string) gbt.AlgoHandler
- func RunYearly(opt ...string) gbt.AlgoHandler
- func SMA(i int) gbt.AlgoHandler
- func SmallerThan(first, second gbt.AlgoHandler) gbt.AlgoHandler
- func Xor(a, b gbt.AlgoHandler) gbt.AlgoHandler
- type PeriodRunner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func And ¶
func And(a, b gbt.AlgoHandler) gbt.AlgoHandler
And compares if both condition algos are true.
func BiggerThan ¶
func BiggerThan(first, second gbt.AlgoHandler) gbt.AlgoHandler
BiggerThan compares the value of the two containing algos.
func BoolAlgo ¶
func BoolAlgo(b bool) gbt.AlgoHandler
BoolAlgo returns a simple true/false algo ready to use.
func CreateSignal ¶
func CreateSignal(direction string) gbt.AlgoHandler
CreateSignal creates a signal with a specified direction.
func Equal ¶
func Equal(first, second gbt.AlgoHandler) gbt.AlgoHandler
Equal compares the value of two algos.
func If ¶
func If(condition, action gbt.AlgoHandler) gbt.AlgoHandler
If triggers an action algo if a condition algo is true.
func IsInvested ¶
func IsInvested(symbols ...string) gbt.AlgoHandler
IsInvested check if the portfolio hols a position for the given symbol.
func NotInvested ¶
func NotInvested(symbols ...string) gbt.AlgoHandler
NotInvested check if the portfolio holds no position for the given symbol.
func Or ¶
func Or(a, b gbt.AlgoHandler) gbt.AlgoHandler
Or compares if any or both of two algos are true.
func RunDaily ¶
func RunDaily(opt ...string) gbt.AlgoHandler
RunDaily returns a RunDaily Algo ready to use.
func RunMonthly ¶
func RunMonthly(opt ...string) gbt.AlgoHandler
RunMonthly return a RunMonthly Algo ready to use.
func RunQuarterly ¶
func RunQuarterly(opt ...string) gbt.AlgoHandler
RunQuarterly return a RunMonthly Algo ready to use.
func RunWeekly ¶
func RunWeekly(opt ...string) gbt.AlgoHandler
RunWeekly return a RunDaily Algo ready to use.
func RunYearly ¶
func RunYearly(opt ...string) gbt.AlgoHandler
RunYearly return a RunMonthly Algo ready to use.
func SmallerThan ¶
func SmallerThan(first, second gbt.AlgoHandler) gbt.AlgoHandler
SmallerThan compares if the value of the first algo is smaller than second.
func Xor ¶
func Xor(a, b gbt.AlgoHandler) gbt.AlgoHandler
Xor compares if any one but only one of two algos is true.