StraTrader
Search:

Object Model

The following object chart shows some StraTrader interfaces and their methods and properties. (Not all interfaces and methods/peroperties are shown here). Find interfaces description below the chart.

IEngine - the main object. Embeds project, stores pointer to UI (user interface) and provides some methods to load/create project.

  • Project - the pointer to the currenlty loaded project object.
  • UI - the pointer to the User Interface object.
  • SymbolRegistry - the ISymbolRegistry object that stores information about symbols.
  • LoadProject - Loads project from file.
  • CreateProject - Creates new project.
  • UnloadProject - Unloads project.

IProject - the project currently loaded into Engine. This object has a collection of tickers (each associated with Data Stream), and optionaly Strategy and Broker.

  • Strategy - object of type IProjectStrategy, this object is created by user and it represents the logic that creates/modifies orders at the project level.
  • Engine - Pointer back to the parent Engine object.
  • DataSource - the object that contains DataStream's and allows user to select/create them. You can create your own object implementing IDataSource and connect it to project. This way you can retreive data from your own sources (such as files, database, internet, etc.).
  • Tickers - The collection of Tickers.
  • Broker - object that executes orders. You can create your own implementation of IBroker interface and connect it to project. This way you can direct orders to your own execution authority.
  • Account - represents current state of the account (total value, market value, profit/loss etc) and its state for all past bars.
  • Orders - The collection of orders placed by this project (by all Tickers in this project).
  • Trades - The collection of trades produced by this project (by all Tickers in this project).
  • Run - Runs the project. It makes TickerStrategy and ProjectStrategy objects execute their logic, place orders and produce trades; performance summary is calculated;
  • Optimize - Runs project multiple times to find best combination of strategy arguments.
  • Stop - Stops project run.

ITickers - Collection of Tickers that belong to this Project.

ITicker - represents one Ticker (Instrument may be the better name), such as stock symbol, futures contract, etc.

  • Project - Pointer back to the parent Project.
  • DataStream - The source of the market data for this ticker. You can implement your own object and connect it to Ticker.
  • Orders - Collection of Orders placed by this Ticker (acutaly, the TickerStrategy linked to this Ticker).
  • Trades - Collection of Trades placed by this Ticker (acutaly, the TickerStrategy linked to this Ticker).

IOrders - Collection of Orders. Has property to return number of Orders, return Order by its number and return the last placed Order.

IOrder - The Order object.

  • Price, Volume, etc. - The properties of Order.
  • Ticker - The pointer to Ticker that placed this order.
  • Trade - If this order has been executed, the pointer to the Trade object.

ITrades - Collection of Trades. Has property to return number of Trades, return Trade by its number and return the last generated Trade.

ITrade - The Trade object.

  • Price, Volume, etc. - The properties of Trade.
  • Order - Pointer to the Order object that initialized this Trade.

IPosition - Object storing information about current Ticker position, profit, etc, as well as information about all previous values.

ITickerStrategy - The user-created object that contains logic to analize current market situation and place orders.

  • Ticker - Pointer to the parent Ticker object. TickerStrategy has access to market information of this Ticker (such as Open, High, Low, Close) and can place orders to buy/sell this Ticker shares.
  • ProcessBar - User-defined function that is called on each bar; Orders can be placed in this function.
  • ProcessTrade - User-defined function that is called each time a new Trade is created.

IProjectStrategy - The user-defined object that contains logic to modify/cancel orders placed by TickerStrategy.

  • Project - Pointer to the parent Project object. ProjectStrategy has access to market information of all Tickers in this project and to all Orders placed by these Tickers, so it can modify/cancel some of them.
  • BeforeBar - User-defined function that is called before TickerStrategy's place Orders.
  • AfterBar - User-defined function that is called after TickerStrategy's place Orders.

IDataSource - The object that provides methods to browse/create DataStreams. You can create your own object based on this interface and connect it to project. This way you can get data from your own sources.

  • GetStream - returns DataStream object based on stream info (such as Symbol, Exchange, etc).

IDataStream - Retrieves market data from file, internet, etc. You can create your own object implementing this interface and get data from your own sources.

  • GetStream - returns DataStream object based on stream info (such as Symbol, Exchange, etc).


About Us   Contact Us   Download   ©2007-2009 Mike Kramarenko in association with SmartProj.com