/ Executors / src / module.jl
module.jl
 1  
 2  using Strategies: Strategies
 3  using Strategies.OrderTypes
 4  using Strategies: Instances, Instruments
 5  using Strategies.Misc
 6  using .Misc.TimeTicks
 7  using .Misc: Lang
 8  using .Misc.DocStringExtensions
 9  import .Misc: call!, call!
10  
11  include("context.jl")
12  include("checks.jl")
13  include("functions.jl")
14  
15  include("orders/iter.jl")
16  include("orders/utils.jl")
17  include("orders/state.jl")
18  include("orders/limit.jl")
19  include("orders/market.jl")
20  include("trades.jl")
21  
22  include("positions/utils.jl")
23  include("positions/state.jl")
24  include("positions/info.jl")
25  
26  @doc "(DEPRECATED) order updates are done internally now."
27  struct UpdateOrders <: ExecAction end # not impl
28  @doc "(DEPRECATED) The shuffled version of [`UpdateOrders`](@ref)."
29  struct UpdateOrdersShuffled <: ExecAction end
30  @doc "Action to cancel open orders."
31  struct CancelOrders <: ExecAction end
32  @doc "Action to update positions size."
33  struct UpdatePositions <: ExecAction end # not impl
34  @doc "Action to update leverage."
35  struct UpdateLeverage <: ExecAction end
36  @doc "Action to update margin mode."
37  struct UpdateMargin <: ExecAction end # not impl
38  @doc "Action executed after a new trade occurs."
39  struct NewTrade <: ExecAction end
40  
41  @doc "Action to setup an OHLCV watcher."
42  struct WatchOHLCV <: ExecAction end
43  @doc "Action to update OHLCV data (from watchers)."
44  struct UpdateData <: ExecAction end
45  @doc "Action to initialize OHLCV data."
46  struct InitData <: ExecAction end
47  
48  @doc "Action to setup an optimizer (context and params)."
49  struct OptSetup <: ExecAction end
50  @doc "Action run before a single simulation during optimization."
51  struct OptRun <: ExecAction end
52  @doc "Action to get the score of a single simulation (after it has finished)."
53  struct OptScore <: ExecAction end
54  @doc "Action to indicate if the optimization is a minimization problem."
55  struct OptMinimize <: ExecAction end
56  
57  export call!, UpdateOrders, UpdateOrdersShuffled, CancelOrders
58  export UpdateLeverage, UpdateMargin, UpdatePositions
59  export OptSetup, OptRun, OptScore, OptMinimize
60  export NewTrade
61  export WatchOHLCV, UpdateData, InitData
62  export limitorder, marketorder
63  export unfilled, committed, isfilled, islastfill, isfirstfill, trades, cost, feespaid
64  export queue!, cancel!, commit!
65  export orders, hasorders, hastrade, ordershistory, orderscount, isnocost
66  export OrderIterator, trades, tradescount, closedorders