Documentation ¶
Index ¶
- Constants
- Variables
- func MktNextWeekMin(v tme.Tme) (r tme.Tme)
- func MktPrvWeekMax(v tme.Tme) (r tme.Tme)
- func MktWeek(v tme.Tme) (r tme.Rng)
- func MktWeekMax(v tme.Tme) (r tme.Tme)
- func MktWeekMin(v tme.Tme) (r tme.Tme)
- type Acnt
- type Instr
- func (x *Instr) BytRed(b []byte) (idx int)
- func (x *Instr) BytWrt(b *bytes.Buffer)
- func (x *Instr) Bytes() []byte
- func (x *Instr) CalcMktWeeks(mktHr tme.Tme)
- func (x *Instr) CalcStats()
- func (x *Instr) Cpy() (r *Instr)
- func (x *Instr) OanJsnRed(txt string)
- func (x *Instr) PipScl() flt.Flt
- func (x *Instr) Pipette() flt.Flt
- func (x *Instr) PipetteScl() flt.Flt
- func (x *Instr) Spd(bid, ask flt.Flt) flt.Flt
- func (x *Instr) StrWrt(b *strings.Builder) string
- func (x *Instr) String() string
- func (x *Instr) Sub(rx TmeIdxRx, id uint32)
- func (x *Instr) Unsub(id uint32)
- type InstrTic
- type Instrs
- type Oan
- func (x *Oan) AcntRefresh() flt.Flt
- func (x *Oan) CalcCls(t *Trd, i *Instr)
- func (x *Oan) CalcOpn(t *Trd, i *Instr)
- func (x *Oan) CloneInstrs(vs map[str.Str]*Instr)
- func (x *Oan) Cls()
- func (x *Oan) ClsTrd(t *Trd, i *Instr) (ok bol.Bol)
- func (x *Oan) DskLoadInstrDetail(i *Instr) bool
- func (x *Oan) DskLoadInstrStm(i *Instr) bool
- func (x *Oan) DskSavInstrDetail(i *Instr)
- func (x *Oan) DskSavInstrStm(i *Instr)
- func (x *Oan) Ifc() interface{}
- func (x *Oan) Instr(name str.Str) (r *Instr)
- func (x *Oan) Load(i *Instr, rng tme.Rng) (r *Stm)
- func (x *Oan) LoadHst(i *Instr)
- func (x *Oan) MayTrd() bol.Bol
- func (x *Oan) OpnEnd()
- func (x *Oan) OpnStart()
- func (x *Oan) OpnTrd(t *Trd, i *Instr) (bol.Bol, TrdRsnOpn)
- func (x *Oan) Sub(i *Instr)
- func (x *Oan) Unsub(i *Instr)
- type OrdReq
- type Port
- type PortScp
- type PosClsReq
- type Prfm
- type PrfmDlt
- type PrfmDltScp
- type PrfmScp
- type Prfms
- func (x *Prfms) At(idx unt.Unt) *Prfm
- func (x *Prfms) Clr() *Prfms
- func (x *Prfms) Cnt() unt.Unt
- func (x *Prfms) Cpy() *Prfms
- func (x *Prfms) CstComUsds() (r *flts.Flts)
- func (x *Prfms) CstSpdUsds() (r *flts.Flts)
- func (x *Prfms) CstTotUsds() (r *flts.Flts)
- func (x *Prfms) DayCnts() (r *unts.Unts)
- func (x *Prfms) Del(idx unt.Unt) (r *Prfm)
- func (x *Prfms) Dque() (r *Prfm)
- func (x *Prfms) DurAvgs() (r *tmes.Tmes)
- func (x *Prfms) DurLimMaxs() (r *tmes.Tmes)
- func (x *Prfms) DurMaxs() (r *tmes.Tmes)
- func (x *Prfms) DurMdns() (r *tmes.Tmes)
- func (x *Prfms) DurMins() (r *tmes.Tmes)
- func (x *Prfms) From(idx unt.Unt) *Prfms
- func (x *Prfms) Fst() *Prfm
- func (x *Prfms) FstIdx() unt.Unt
- func (x *Prfms) In(idx, lim unt.Unt) *Prfms
- func (x *Prfms) InBnd(b bnd.Bnd) *Prfms
- func (x *Prfms) Ins(idx unt.Unt, elm *Prfm) *Prfms
- func (x *Prfms) LosLimMaxs() (r *flts.Flts)
- func (x *Prfms) Lst() *Prfm
- func (x *Prfms) LstIdx() unt.Unt
- func (x *Prfms) Mdl() *Prfm
- func (x *Prfms) MdlIdx() unt.Unt
- func (x *Prfms) Mrg(a ...*Prfms) *Prfms
- func (x *Prfms) Ok() bol.Bol
- func (x *Prfms) OpnPerDays() (r *flts.Flts)
- func (x *Prfms) PipAvgs() (r *flts.Flts)
- func (x *Prfms) PipMaxs() (r *flts.Flts)
- func (x *Prfms) PipMdns() (r *flts.Flts)
- func (x *Prfms) PipMins() (r *flts.Flts)
- func (x *Prfms) PipPerDays() (r *flts.Flts)
- func (x *Prfms) PipSums() (r *flts.Flts)
- func (x *Prfms) PnlPcts() (r *flts.Flts)
- func (x *Prfms) PnlUsds() (r *flts.Flts)
- func (x *Prfms) Pop() (r *Prfm)
- func (x *Prfms) Pths() (r *strs.Strs)
- func (x *Prfms) Push(a ...*Prfm) *Prfms
- func (x *Prfms) Que(vs ...*Prfm) *Prfms
- func (x *Prfms) Rand() *Prfms
- func (x *Prfms) Rev() *Prfms
- func (x *Prfms) ScsPcts() (r *flts.Flts)
- func (x *Prfms) ScsPerDays() (r *flts.Flts)
- func (x *Prfms) StrWrt(b *strings.Builder)
- func (x *Prfms) String() string
- func (x *Prfms) To(lim unt.Unt) *Prfms
- func (x *Prfms) TrdCnts() (r *unts.Unts)
- func (x *Prfms) TrdPcts() (r *flts.Flts)
- func (x *Prfms) Upd(idx unt.Unt, elm *Prfm) *Prfms
- func (x *Prfms) UsdPerDays() (r *flts.Flts)
- type PrfmsScp
- type Prv
- type Pth
- type Stm
- func (x *Stm) AskAt(idx unt.Unt) flt.Flt
- func (x *Stm) AskBndByTmeBnd(tmeBnd bnd.Bnd) (r bnd.Bnd)
- func (x *Stm) AsksAt(idx unt.Unt) *flts.Flts
- func (x *Stm) AsksByTmeBnd(tmeBnd bnd.Bnd) *flts.Flts
- func (x *Stm) BidAsk(t tme.Tme) (bid, ask flt.Flt)
- func (x *Stm) BidAskAt(idx unt.Unt) (bid, ask flt.Flt)
- func (x *Stm) BidAt(idx unt.Unt) flt.Flt
- func (x *Stm) BidBndByTmeBnd(tmeBnd bnd.Bnd) (r bnd.Bnd)
- func (x *Stm) BidsAsks(t tme.Tme) (bids, asks *flts.Flts)
- func (x *Stm) BidsAsksAt(idx unt.Unt) (bids, asks *flts.Flts)
- func (x *Stm) BidsAt(idx unt.Unt) *flts.Flts
- func (x *Stm) BidsByTmeBnd(tmeBnd bnd.Bnd) *flts.Flts
- func (x *Stm) BytRed(b []byte) (idx int)
- func (x *Stm) BytWrt(b *bytes.Buffer)
- func (x *Stm) Bytes() []byte
- func (x *Stm) Clr() (r *Stm)
- func (x *Stm) Cnt() unt.Unt
- func (x *Stm) Cpy() (r *Stm)
- func (x *Stm) From(idx unt.Unt) (r *Stm)
- func (x *Stm) GapFil(skpMktWeek ...bool)
- func (x *Stm) GapFilLst() (r TmeIdx)
- func (x *Stm) GapFilTo(heartTme tme.Tme)
- func (x *Stm) In(idx, lim unt.Unt) (r *Stm)
- func (x *Stm) InRng(fromTo ...tme.Tme) (r *Stm)
- func (x *Stm) OanJsnRed(j *jsn.Jsnr)
- func (x *Stm) Push(v *Stm) *Stm
- func (x *Stm) PushGap(gapTme tme.Tme, v *Tic)
- func (x *Stm) PushTic(v *Tic)
- func (x *Stm) Rng() (r tme.Rng)
- func (x *Stm) Spds(i *Instr) (r *flts.Flts)
- func (x *Stm) Tic(idx unt.Unt) (r *Tic)
- func (x *Stm) To(lim unt.Unt) (r *Stm)
- func (x *Stm) Validate()
- func (x *Stm) ValidateLen()
- func (x *Stm) ValidateLims()
- func (x *Stm) ValidateOneLims(name string, vs *unts.Unts)
- func (x *Stm) ValidateTmeGap()
- type Tic
- type TicRow
- type Ticr
- type TmeFlt
- type TmeFltRx
- type TmeFltRxs
- type TmeFltTx
- type TmeFltTxr
- type TmeFlts
- type TmeFltsRx
- type TmeFltsRxs
- type TmeFltsTx
- type TmeFltsTxr
- type TmeIdx
- type TmeIdxRx
- type TmeIdxRxs
- type TmeIdxTx
- type TmeIdxTxr
- type TmeIdxs
- func (x *TmeIdxs) At(idx unt.Unt) TmeIdx
- func (x *TmeIdxs) Clr() *TmeIdxs
- func (x *TmeIdxs) Cnt() unt.Unt
- func (x *TmeIdxs) Cpy() *TmeIdxs
- func (x *TmeIdxs) Del(idx unt.Unt) (r TmeIdx)
- func (x *TmeIdxs) Dque() (r TmeIdx)
- func (x *TmeIdxs) From(idx unt.Unt) *TmeIdxs
- func (x *TmeIdxs) Fst() TmeIdx
- func (x *TmeIdxs) FstIdx() unt.Unt
- func (x *TmeIdxs) In(idx, lim unt.Unt) *TmeIdxs
- func (x *TmeIdxs) InBnd(b bnd.Bnd) *TmeIdxs
- func (x *TmeIdxs) Ins(idx unt.Unt, elm TmeIdx) *TmeIdxs
- func (x *TmeIdxs) Lst() TmeIdx
- func (x *TmeIdxs) LstIdx() unt.Unt
- func (x *TmeIdxs) Mdl() TmeIdx
- func (x *TmeIdxs) MdlIdx() unt.Unt
- func (x *TmeIdxs) Mrg(a ...*TmeIdxs) *TmeIdxs
- func (x *TmeIdxs) Ok() bol.Bol
- func (x *TmeIdxs) Pop() (r TmeIdx)
- func (x *TmeIdxs) Push(a ...TmeIdx) *TmeIdxs
- func (x *TmeIdxs) Que(vs ...TmeIdx) *TmeIdxs
- func (x *TmeIdxs) Rand() *TmeIdxs
- func (x *TmeIdxs) Rev() *TmeIdxs
- func (x *TmeIdxs) To(lim unt.Unt) *TmeIdxs
- func (x *TmeIdxs) Upd(idx unt.Unt, elm TmeIdx) *TmeIdxs
- type Trd
- type TrdRsnCls
- type TrdRsnOpn
- type TrdRx
- type TrdRxs
- type TrdScp
- type TrdTx
- type TrdTxr
- type Trds
- func (x *Trds) At(idx unt.Unt) *Trd
- func (x *Trds) Clr() *Trds
- func (x *Trds) ClsAsks() (r *flts.Flts)
- func (x *Trds) ClsBalUsdActs() (r *flts.Flts)
- func (x *Trds) ClsBalUsds() (r *flts.Flts)
- func (x *Trds) ClsBids() (r *flts.Flts)
- func (x *Trds) ClsReqs() (r *strs.Strs)
- func (x *Trds) ClsRess() (r *strs.Strs)
- func (x *Trds) ClsRsns() (r *strs.Strs)
- func (x *Trds) ClsSpds() (r *flts.Flts)
- func (x *Trds) ClsTmes() (r *tmes.Tmes)
- func (x *Trds) Cnt() unt.Unt
- func (x *Trds) Cpy() *Trds
- func (x *Trds) CstClsSpdUsds() (r *flts.Flts)
- func (x *Trds) CstComUsds() (r *flts.Flts)
- func (x *Trds) CstOpnSpdUsds() (r *flts.Flts)
- func (x *Trds) Del(idx unt.Unt) (r *Trd)
- func (x *Trds) Dque() (r *Trd)
- func (x *Trds) Durs() (r *tmes.Tmes)
- func (x *Trds) From(idx unt.Unt) *Trds
- func (x *Trds) Fst() *Trd
- func (x *Trds) FstIdx() unt.Unt
- func (x *Trds) In(idx, lim unt.Unt) *Trds
- func (x *Trds) InBnd(b bnd.Bnd) *Trds
- func (x *Trds) Ins(idx unt.Unt, elm *Trd) *Trds
- func (x *Trds) Instrs() (r *strs.Strs)
- func (x *Trds) IsLongs() (r *bols.Bols)
- func (x *Trds) Lst() *Trd
- func (x *Trds) LstIdx() unt.Unt
- func (x *Trds) Mdl() *Trd
- func (x *Trds) MdlIdx() unt.Unt
- func (x *Trds) Mrg(a ...*Trds) *Trds
- func (x *Trds) MrgnRtios() (r *flts.Flts)
- func (x *Trds) Ok() bol.Bol
- func (x *Trds) OpnAsks() (r *flts.Flts)
- func (x *Trds) OpnBalUsds() (r *flts.Flts)
- func (x *Trds) OpnBids() (r *flts.Flts)
- func (x *Trds) OpnReqs() (r *strs.Strs)
- func (x *Trds) OpnRess() (r *strs.Strs)
- func (x *Trds) OpnSpds() (r *flts.Flts)
- func (x *Trds) OpnTmes() (r *tmes.Tmes)
- func (x *Trds) Pips() (r *flts.Flts)
- func (x *Trds) PnlGrsUsds() (r *flts.Flts)
- func (x *Trds) PnlPctPredicts() (r *flts.Flts)
- func (x *Trds) PnlPcts() (r *flts.Flts)
- func (x *Trds) PnlUsds() (r *flts.Flts)
- func (x *Trds) Pop() (r *Trd)
- func (x *Trds) Push(a ...*Trd) *Trds
- func (x *Trds) Que(vs ...*Trd) *Trds
- func (x *Trds) Rand() *Trds
- func (x *Trds) Rev() *Trds
- func (x *Trds) SelClsAskEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsAskGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsAskGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsAskLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsAskLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsAskNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsAskSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelClsBalUsdActEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdActGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdActGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdActLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdActLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdActNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdActSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelClsBalUsdEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBalUsdSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelClsBidEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBidGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBidGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBidLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBidLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBidNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsBidSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelClsReqEql(v str.Str) (r *Trds)
- func (x *Trds) SelClsReqGeq(v str.Str) (r *Trds)
- func (x *Trds) SelClsReqGtr(v str.Str) (r *Trds)
- func (x *Trds) SelClsReqLeq(v str.Str) (r *Trds)
- func (x *Trds) SelClsReqLss(v str.Str) (r *Trds)
- func (x *Trds) SelClsReqNeq(v str.Str) (r *Trds)
- func (x *Trds) SelClsReqSplt(v str.Str) (btm, top *Trds)
- func (x *Trds) SelClsResEql(v str.Str) (r *Trds)
- func (x *Trds) SelClsResGeq(v str.Str) (r *Trds)
- func (x *Trds) SelClsResGtr(v str.Str) (r *Trds)
- func (x *Trds) SelClsResLeq(v str.Str) (r *Trds)
- func (x *Trds) SelClsResLss(v str.Str) (r *Trds)
- func (x *Trds) SelClsResNeq(v str.Str) (r *Trds)
- func (x *Trds) SelClsResSplt(v str.Str) (btm, top *Trds)
- func (x *Trds) SelClsRsnEql(v str.Str) (r *Trds)
- func (x *Trds) SelClsRsnGeq(v str.Str) (r *Trds)
- func (x *Trds) SelClsRsnGtr(v str.Str) (r *Trds)
- func (x *Trds) SelClsRsnLeq(v str.Str) (r *Trds)
- func (x *Trds) SelClsRsnLss(v str.Str) (r *Trds)
- func (x *Trds) SelClsRsnNeq(v str.Str) (r *Trds)
- func (x *Trds) SelClsRsnSplt(v str.Str) (btm, top *Trds)
- func (x *Trds) SelClsSpdEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsSpdGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsSpdGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsSpdLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsSpdLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsSpdNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelClsSpdSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelClsTmeEql(v tme.Tme) (r *Trds)
- func (x *Trds) SelClsTmeGeq(v tme.Tme) (r *Trds)
- func (x *Trds) SelClsTmeGtr(v tme.Tme) (r *Trds)
- func (x *Trds) SelClsTmeLeq(v tme.Tme) (r *Trds)
- func (x *Trds) SelClsTmeLss(v tme.Tme) (r *Trds)
- func (x *Trds) SelClsTmeNeq(v tme.Tme) (r *Trds)
- func (x *Trds) SelClsTmeSplt(v tme.Tme) (btm, top *Trds)
- func (x *Trds) SelCstClsSpdUsdEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstClsSpdUsdGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstClsSpdUsdGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstClsSpdUsdLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstClsSpdUsdLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstClsSpdUsdNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstClsSpdUsdSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelCstComUsdEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstComUsdGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstComUsdGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstComUsdLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstComUsdLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstComUsdNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstComUsdSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelCstOpnSpdUsdEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstOpnSpdUsdGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstOpnSpdUsdGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstOpnSpdUsdLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstOpnSpdUsdLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstOpnSpdUsdNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelCstOpnSpdUsdSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelDurEql(v tme.Tme) (r *Trds)
- func (x *Trds) SelDurGeq(v tme.Tme) (r *Trds)
- func (x *Trds) SelDurGtr(v tme.Tme) (r *Trds)
- func (x *Trds) SelDurLeq(v tme.Tme) (r *Trds)
- func (x *Trds) SelDurLss(v tme.Tme) (r *Trds)
- func (x *Trds) SelDurNeq(v tme.Tme) (r *Trds)
- func (x *Trds) SelDurSplt(v tme.Tme) (btm, top *Trds)
- func (x *Trds) SelInstrEql(v str.Str) (r *Trds)
- func (x *Trds) SelInstrGeq(v str.Str) (r *Trds)
- func (x *Trds) SelInstrGtr(v str.Str) (r *Trds)
- func (x *Trds) SelInstrLeq(v str.Str) (r *Trds)
- func (x *Trds) SelInstrLss(v str.Str) (r *Trds)
- func (x *Trds) SelInstrNeq(v str.Str) (r *Trds)
- func (x *Trds) SelInstrSplt(v str.Str) (btm, top *Trds)
- func (x *Trds) SelIsLongEql(v bol.Bol) (r *Trds)
- func (x *Trds) SelIsLongNeq(v bol.Bol) (r *Trds)
- func (x *Trds) SelMrgnRtioEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelMrgnRtioGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelMrgnRtioGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelMrgnRtioLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelMrgnRtioLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelMrgnRtioNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelMrgnRtioSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelOpnAskEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnAskGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnAskGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnAskLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnAskLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnAskNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnAskSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelOpnBalUsdEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBalUsdGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBalUsdGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBalUsdLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBalUsdLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBalUsdNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBalUsdSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelOpnBidEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBidGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBidGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBidLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBidLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBidNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnBidSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelOpnReqEql(v str.Str) (r *Trds)
- func (x *Trds) SelOpnReqGeq(v str.Str) (r *Trds)
- func (x *Trds) SelOpnReqGtr(v str.Str) (r *Trds)
- func (x *Trds) SelOpnReqLeq(v str.Str) (r *Trds)
- func (x *Trds) SelOpnReqLss(v str.Str) (r *Trds)
- func (x *Trds) SelOpnReqNeq(v str.Str) (r *Trds)
- func (x *Trds) SelOpnReqSplt(v str.Str) (btm, top *Trds)
- func (x *Trds) SelOpnResEql(v str.Str) (r *Trds)
- func (x *Trds) SelOpnResGeq(v str.Str) (r *Trds)
- func (x *Trds) SelOpnResGtr(v str.Str) (r *Trds)
- func (x *Trds) SelOpnResLeq(v str.Str) (r *Trds)
- func (x *Trds) SelOpnResLss(v str.Str) (r *Trds)
- func (x *Trds) SelOpnResNeq(v str.Str) (r *Trds)
- func (x *Trds) SelOpnResSplt(v str.Str) (btm, top *Trds)
- func (x *Trds) SelOpnSpdEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnSpdGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnSpdGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnSpdLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnSpdLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnSpdNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelOpnSpdSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelOpnTmeEql(v tme.Tme) (r *Trds)
- func (x *Trds) SelOpnTmeGeq(v tme.Tme) (r *Trds)
- func (x *Trds) SelOpnTmeGtr(v tme.Tme) (r *Trds)
- func (x *Trds) SelOpnTmeLeq(v tme.Tme) (r *Trds)
- func (x *Trds) SelOpnTmeLss(v tme.Tme) (r *Trds)
- func (x *Trds) SelOpnTmeNeq(v tme.Tme) (r *Trds)
- func (x *Trds) SelOpnTmeSplt(v tme.Tme) (btm, top *Trds)
- func (x *Trds) SelPipEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelPipGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPipGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelPipLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPipLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelPipNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPipSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelPnlGrsUsdEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlGrsUsdGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlGrsUsdGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlGrsUsdLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlGrsUsdLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlGrsUsdNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlGrsUsdSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelPnlPctEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctPredictEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctPredictGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctPredictGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctPredictLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctPredictLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctPredictNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlPctPredictSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelPnlPctSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelPnlUsdEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlUsdGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlUsdGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlUsdLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlUsdLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlUsdNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelPnlUsdSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelTrdPctEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelTrdPctGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelTrdPctGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelTrdPctLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelTrdPctLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelTrdPctNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelTrdPctSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) SelUnitsEql(v flt.Flt) (r *Trds)
- func (x *Trds) SelUnitsGeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelUnitsGtr(v flt.Flt) (r *Trds)
- func (x *Trds) SelUnitsLeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelUnitsLss(v flt.Flt) (r *Trds)
- func (x *Trds) SelUnitsNeq(v flt.Flt) (r *Trds)
- func (x *Trds) SelUnitsSplt(v flt.Flt) (btm, top *Trds)
- func (x *Trds) StrWrt(b *strings.Builder)
- func (x *Trds) String() string
- func (x *Trds) To(lim unt.Unt) *Trds
- func (x *Trds) TrdPcts() (r *flts.Flts)
- func (x *Trds) Unitss() (r *flts.Flts)
- func (x *Trds) Upd(idx unt.Unt, elm *Trd) *Trds
- type TrdsScp
- type Tx
Constants ¶
View Source
const ( No = uint32(0) Yes = uint32(1) )
View Source
const (
MktSessionGap = tme.D1
)
View Source
const (
NextTier = 0
)
Variables ¶
View Source
var (
Cfg *cfg.Cfg
)
Functions ¶
Types ¶
type Acnt ¶
type Acnt struct { Created tme.Tme Currency str.Str Alias str.Str MarginRate flt.Flt HedgingEnabled bol.Bol LastTransactionID unt.Unt Balance flt.Flt OpnTrdCnt unt.Unt OpnPosCnt unt.Unt PndOrdCnt unt.Unt Pl flt.Flt ResettablePL flt.Flt Financing flt.Flt Commission flt.Flt UnrealizedPL flt.Flt NAV flt.Flt MarginAvailable flt.Flt PositionValue flt.Flt MarginCloseoutUnrealizedPL flt.Flt MarginCloseoutNAV flt.Flt MarginCloseoutMarginUsed flt.Flt MarginCloseoutPositionValue flt.Flt MarginCloseoutPercent flt.Flt WithdrawalLimit flt.Flt MarginCallMarginUsed flt.Flt MarginCallPercent flt.Flt }
Acnt is an Oanda account.
type Instr ¶
type Instr struct { Name str.Str Pip flt.Flt MrgnRtio flt.Flt SpdMin flt.Flt SpdMax flt.Flt SpdMdn flt.Flt SpdAvg flt.Flt SpdStd flt.Flt SpdOpnLim flt.Flt Fst tme.Tme Lst tme.Tme TmeCnt unt.Unt DayCnt unt.Unt DisplayPrecision unt.Unt TradeUnitsPrecision unt.Unt MinTrdSize unt.Unt MaxTrailingStopDistance flt.Flt MinTrailingStopDistance flt.Flt MaxPositionSize unt.Unt MaxOrderUnits unt.Unt Typ str.Str Prv Prv HstStm *Stm HstMu sync.RWMutex RltStm *Stm RltSubs TmeIdxRxs RltSubsMu sync.Mutex RltLstPktTme tme.Tme RltInrvlMax tme.Tme MktWeeks *tme.Rngs MktDays *tme.Rngs MktHrs *tme.Rngs }
func (*Instr) CalcMktWeeks ¶
func (*Instr) PipetteScl ¶
type Oan ¶
var (
PrvOan *Oan
)
func (*Oan) AcntRefresh ¶
func (*Oan) DskLoadInstrDetail ¶
func (*Oan) DskLoadInstrStm ¶
func (*Oan) DskSavInstrDetail ¶
func (*Oan) DskSavInstrStm ¶
type OrdReq ¶
type OrdReq struct { Type str.Str Instrument str.Str Units bscint.Int TimeInForce str.Str PriceBound flt.Flt }
type Prfm ¶
type Prfm struct { PnlPct flt.Flt ScsPct flt.Flt PipPerDay flt.Flt UsdPerDay flt.Flt ScsPerDay flt.Flt OpnPerDay flt.Flt PnlUsd flt.Flt PipAvg flt.Flt PipMdn flt.Flt PipMin flt.Flt PipMax flt.Flt PipSum flt.Flt DurAvg tme.Tme DurMdn tme.Tme DurMin tme.Tme DurMax tme.Tme LosLimMax flt.Flt DurLimMax tme.Tme DayCnt unt.Unt TrdCnt unt.Unt TrdPct flt.Flt CstTotUsd flt.Flt CstSpdUsd flt.Flt CstComUsd flt.Flt Pth str.Str }
type PrfmDlt ¶
type PrfmDlt struct { PnlPctA flt.Flt PnlPctB flt.Flt PnlPctDlt flt.Flt ScsPctA flt.Flt ScsPctB flt.Flt ScsPctDlt flt.Flt PipPerDayA flt.Flt PipPerDayB flt.Flt PipPerDayDlt flt.Flt UsdPerDayA flt.Flt UsdPerDayB flt.Flt UsdPerDayDlt flt.Flt ScsPerDayA flt.Flt ScsPerDayB flt.Flt ScsPerDayDlt flt.Flt OpnPerDayA flt.Flt OpnPerDayB flt.Flt OpnPerDayDlt flt.Flt PnlUsdA flt.Flt PnlUsdB flt.Flt PnlUsdDlt flt.Flt PipAvgA flt.Flt PipAvgB flt.Flt PipAvgDlt flt.Flt PipMdnA flt.Flt PipMdnB flt.Flt PipMdnDlt flt.Flt PipMinA flt.Flt PipMinB flt.Flt PipMinDlt flt.Flt PipMaxA flt.Flt PipMaxB flt.Flt PipMaxDlt flt.Flt PipSumA flt.Flt PipSumB flt.Flt PipSumDlt flt.Flt DurAvgA tme.Tme DurAvgB tme.Tme DurAvgDlt flt.Flt DurMdnA tme.Tme DurMdnB tme.Tme DurMdnDlt flt.Flt DurMinA tme.Tme DurMinB tme.Tme DurMinDlt flt.Flt DurMaxA tme.Tme DurMaxB tme.Tme DurMaxDlt flt.Flt TrdCntA unt.Unt TrdCntB unt.Unt TrdCntDlt flt.Flt TrdPctA flt.Flt TrdPctB flt.Flt TrdPctDlt flt.Flt PthB str.Str }
type PrfmDltScp ¶
type Prfms ¶
type Prfms []*Prfm
func MakeEmpPrfms ¶
func (*Prfms) CstComUsds ¶
func (*Prfms) CstSpdUsds ¶
func (*Prfms) CstTotUsds ¶
func (*Prfms) DurLimMaxs ¶
func (*Prfms) LosLimMaxs ¶
func (*Prfms) OpnPerDays ¶
func (*Prfms) PipPerDays ¶
func (*Prfms) ScsPerDays ¶
func (*Prfms) UsdPerDays ¶
type Stm ¶
type Stm struct { Tmes *tmes.Tmes Bids *flts.Flts Asks *flts.Flts BidLims *unts.Unts AskLims *unts.Unts RxIdx unt.Unt RxTme tme.Tme }
func (*Stm) ValidateLen ¶
func (x *Stm) ValidateLen()
func (*Stm) ValidateLims ¶
func (x *Stm) ValidateLims()
func (*Stm) ValidateTmeGap ¶
func (x *Stm) ValidateTmeGap()
type Ticr ¶
type TmeFltsRxs ¶
type TmeFltsTxr ¶
type Trd ¶
type Trd struct { OpnTme tme.Tme ClsTme tme.Tme OpnBid flt.Flt ClsBid flt.Flt OpnAsk flt.Flt ClsAsk flt.Flt OpnSpd flt.Flt ClsSpd flt.Flt ClsRsn str.Str Pip flt.Flt Dur tme.Tme IsLong bol.Bol PnlPct flt.Flt PnlPctPredict flt.Flt PnlUsd flt.Flt PnlGrsUsd flt.Flt CstComUsd flt.Flt CstClsSpdUsd flt.Flt CstOpnSpdUsd flt.Flt OpnBalUsd flt.Flt ClsBalUsd flt.Flt ClsBalUsdAct flt.Flt TrdPct flt.Flt MrgnRtio flt.Flt Units flt.Flt Instr str.Str OpnReq str.Str OpnRes str.Str ClsReq str.Str ClsRes str.Str }
type Trds ¶
type Trds []*Trd
func MakeEmpTrds ¶
func (*Trds) ClsBalUsdActs ¶
func (*Trds) ClsBalUsds ¶
func (*Trds) CstClsSpdUsds ¶
func (*Trds) CstComUsds ¶
func (*Trds) CstOpnSpdUsds ¶
func (*Trds) OpnBalUsds ¶
func (*Trds) PnlGrsUsds ¶
func (*Trds) PnlPctPredicts ¶
Source Files ¶
- ana.go
- instr.gen.go
- instr.go
- oan.go
- oanAcnt.go
- ord.go
- port.gen.go
- prfm.gen.go
- prfm.go
- prfmDlt.gen.go
- prfms.gen.go
- prv.gen.go
- pth.gen.go
- stm.gen.go
- stm.go
- tic.gen.go
- ticr.go
- tmeFlt.gen.go
- tmeFlts.gen.go
- tmeIdx.gen.go
- tmeIdxs.gen.go
- trd.gen.go
- trd.go
- trdRsnCls.gen.go
- trdRsnCls.go
- trdRsnOpn.gen.go
- trds.gen.go
Click to show internal directories.
Click to hide internal directories.