Query Builder

This chapter gives a high level description of the buttons available in the Query Builder window accessible from the Query Builder tab.

XMIM is designed to query a comprehensive database that includes, to name a few, security prices, volume, sentiment indicators, energy, weather and economic indicator data. There are two basic types of queries that can be created within the program: the SHOW/WHEN query and the ORDER query.

Query blocks form the skeleton of the MIM query language. To learn more about how query blocks are constructed see the MIM Query Language Overview document.

SHOW/WHEN allows you to ask what happens to the data series when certain conditions hold true. The SHOW/WHEN query is an excellent research aid that allows users to understand, for example, how the price of their securities reacted historically to certain market conditions. The other type of query, ORDER, allows you to test trading ideas by placing buy or sell orders when certain conditions exist. Users often use the analysis prepared in the SHOW/WHEN query to develop trading strategies used within their ORDER block queries.

The SHOW WHEN query is the default in the Query Builder. You can set the type of query by selecting Tools>Add Query Block from the menu bar. The other types of queries you can make are: ORDER, DO SHOW WHEN, DO EVERY TRADE, DO EVERY PERIOD.

Queries are created by making selections within the Query Builder window or, after you have gained a familiarity with the XMIM language, by typing the query directly into the Edit pane of the Query Builder window.

Query Builder Window

The default Query Builder window consists of the Edit, SHOW and WHEN panes. The Edit pane is where a user, if they are familiar with the query language may type in a query directly into the query window. The SHOW and WHEN panes are described in detail below.