1 Introduction
Thank you for trying Merchant of Venice (Venice).
Venice is a stock market trading programme that supports portfolio management, charting, technical analysis, paper trading and experimental methods like Genetic Programming. Venice runs in a graphical user interface with online help and has full documentation. Venice runs on UNIX (including Mac OS X), and Windows.
3 Importing and Exporting Preferences
You can load from or save to an XML file the whole Venice preferences.
You can reach the import preferences dialog by:
You can reach the export preferences dialog by:
This feature can be used in several ways:
5 Tables
Venice has the ability to list quote prices for a single day's trading in a table, and the ability to list all quote prices for a list of given stocks. When listing you need to decide which stocks you are interested in. Currently you can select from All Ordinaries, Market Indices and All Symbols. These categories are based on the ASX (Australian Stock Exchange) so might not be very relevant for other exchanges. Currently Venice is very ASXcentric. At the moment Venice does not have access to any data relating to the symbols it is given, so it has to guess which category the symbol falls in. All Ordinaries lists all 3 letter symbols except those starting with an X. Market Indices lists all symbols starting with an X, on the ASX almost all of these are market indices. All Symbols lists all the symbols.
You can display a table by doing the following:
The List All option allows you to list all the stock quotes on the given date.
The List By Date option allows you to specify the date of the stock quotes to list.
The List By Rule option allows you to specify the initial filter. The filter is an equation which specifies which stocks should be listed and which hidden, see below for more details about this, also see the 9 Gondola Language for details about the format of the equations.
The List By Symbols option allows you to specify the stock symbols to list. Then all the quotes for those stock symbols will be listed.
5.1 Apply Equations
You can run multiple equations against every stock listed in the table and list the result of the equation. Click on the Table menu, then click on the Apply Equations menu item. This will bring up a dialog where you can enter up to 5 equations that can be run against each stock. For each you can enter the name of the column and the equation to be run. See 9 Gondola Language for details about the format of these equations. Also see 2 Preferences for how to get Venice to remember equations so you don't have to keep typing them in all the time. To get you started, an example equation is
avg(close, 30, 0)
which will calculate the average day close value over the last 30 days, including today.
5.2 Apply Filter
You can restrict which stocks are listed in the table by setting up an equation filter. This equation is run against each stock listed in the table, if the equation equates to true for a stock, then that stock is listed. Otherwise it is hidden. You can reach this by clicking on the Apply Filter menu item. Again, see 9 Gondola Language for details about the format of these equations. Also see 2 Preferences for how to get Venice to remember equations so you don't have to keep typing them in all the time. To get you started, an example equation filter is
lag(close, 0) > lag(close, 1)
which will list all quotes where the day close of today is higher than the day close of the last trading day.
5.3 General Table Features
Every table in Venice supports the following:
By clicking on a column header you can sort by that column, click again and you reverse the sort. You can change the order of the columns by dragging a column and dropping it into a new position.
Some tables in Venice support the following:
By right clicking on a row you can raise a context sensitive menu. If you double click on a row the most common operation is invoked, typically Graphing. Some tables also have a menu item Show Columns which lets you specify which columns are shown.
6 Watch Screens
Watch screens provide a way to monitor the value of a group of stocks. Watch screens can be created using any stocks, and any indicator can be applied to the stocks. Venice supports both intraday and end of day watch screens. If Venice is currently downloading intraday quotes, it will display the latest quotes, otherwise it will display the latest end of day quotes. You can create a new watch screen by doing the following:
This will create a new watch screen which you will need to name. You can then add symbols that should be displayed in this watch screen.
7 Graphs
7.1 Portfolio Graphs
You can graph the value of any portfolio over time by doing the following:
 Clicking on the Graph menu item.
 Then clicking on the Portfolio menu item.
 Then clicking on the name of the portfolio you wish to graph.
Depending on the size of your portfolio and the time it has existed, this might take a while as Venice has to load in stock quotes for every stock traded for every day of the portfolio.
Apart from graphing the value of the portfolio over time, you can also graph the profit/loss of the portfolio. To do this, graph the portfolio as above, then click on the menu item with the same name as your portfolio, then select the Graph menu item and then click on Profit/Loss. The profit and loss graph is calculated by ignoring any deposits and withdrawals made to the portfolio, the balance of that portfolio over time will reflect the profit and loss made.
7.2 Market Indicator Charts
A market indicator is an indicator that can be used to help determine the state of the market. They are calculated using multiple stocks on the market, for example Advance/Decline uses all ordinary stocks in its calculations.
7.2.1 Advance/Decline
Currently the only market indicator that Venice can graph is the advance/decline indicator. You can graph this indicator by:
 Clicking on Graph menu item.
 Then clicking on the Market Indicator menu item.
 Then clicking on the Advance/Decline menu item.
This operation reads in almost all of the available stock quotes, so it may take a while.
The advance/decline indicator is calculated by taking an arbitrary start value (currently 0). Each day's value is calculated by taking the number of stocks that advanced (i.e. have a higher day close than day open) minus the number of stocks that declined and adding that to the previous day's value. This creates a cumulative graph whose trend may be used to give an indication of possible future direction of the market.
7.3 Stock Charts
Venice supports a variety of technical charts. Some of these charts are described below, for the others, please consult the literature for their meaning and interpretation.
7.3.1 Custom
Venice supports the charting of userdefined custom indicators. Using the 9 Gondola Language you can write custom indicators which can then be charted. The custom chart user interface allows you to enter a Gondola equation to chart and to specify the chart as either primary or secondary. A primary chart is one that appears in the top graph. A secondary chart will appear in its own smaller graph below.
7.3.2 Point And Figure
The Point and Figure graph attempts to highligh only significant price movement, independant of time. This means it differs from most of the other charts in that there is not necessarily any data shown for a particular date range.
If you switch to the Point and Figure graph while zoomed in on an area which does not have any Point and Figure data or you attempt to zoom in on such an area, a warning dialogue is displayed and the operation will be cancelled.
7.3.3 Fibonacci Charts
The Fibonacci Retracement Chart is used to estimate possible support and resistence levels between two price levels. This indicator draws horizontal lines at levels corresponding to the following Fibonacci Ratios: 0%, 23.6%, 38.2% , 50.0%, 61.8%, 78.6%, 100%
The Fibonacci Chart takes two parameters:
 0% Level: Minimum price point for the indicator
 100% Level: Maximum price point for the indicator
7.3.4 Chart Functions
The graph functions are accessed via the toolbar which is created on the left of the chart by default. The functions are:
 Zoom in
 Zoom out
 Clone
 Draw straight line
 Move line
 Draw freehand line
 Write text on chart
 Erase
 Flip chart
7.3.4.1 Zoom
The "Zoom in" function will zoom in on a selected area, where as "Zoom out" always returns to the intial setting, regardless of how many times the user zooms in.
7.3.4.2 Chart Drawing
The chart drawing functions allow the user to draw lines and add text to a chart in a fairly basic manner. Any lines drawn on a chart scale with the zoom level.
7.3.4.3 Others
The "Clone" button opens a window with the same chart type.
The "Flip chart" button toggles the orientation of the chart. The initial orientation is for the origin of the chart to be in the top left hand corner. Therefore, pressing the button twice returns the chart to it's original position.
8 Portfolios
Venice allows you to keep track of multiple portfolios. One portfolio might be for your actual portfolio and others could be used for paper trading. You can create a new portfolio by:
A portfolio is made up of several Cash Accounts and several Share Accounts. A Cash Account can be a bank account, a term deposit, a Cash Management Account or any account which stores money. A Share Account is any account where you can trade shares. To create a trading account you will need at least one of each.
A portfolio is made up of several accounts and also transactions. A transaction is any financial transaction that involves one or more of the accounts. See transactions for more details.
8.2 Transaction History
You can view a list of all the transactions that have occurred in the portfolio. You can reach this by clicking on the Transaction menu item and then clicking on the Show History menu item.
8.3 Transactions
Venice currently supports several common transactions: Accumulate Transaction, Deposit Transaction, Dividend Transaction, Dividend DRP Transaction, Fee Transaction, Interest Transaction, Reduce Transaction, Transfer Transaction and Withdrawal Transaction.
Once a portfolio is open, you can add a transaction by clicking on the Transaction menu item, then clicking on the New menu item. You will see in a drop down box a list of the transactions available. Some of these might not be available yet, e.g. you cannot enter a Reduce Transaction (sell shares) without having bought any.
8.3.1 Accumulate Transaction
The accumulate transaction is the "buy shares" transaction. To enter this transaction you will need the date the transaction took place, the cash account where you withdrew the money from, the share account that accumulated the shares, the symbol of the stock you accumulated (e.g. CBA), the number of shares you accumulated, the total value of the shares at the time of purchase and finally the cost of the trade. This information should all be available from your broker.
8.3.2 Deposit Transaction
The deposit transaction is the transaction where you deposit money into a cash account such as a bank account. To enter this transaction you will need the date the transaction took place, the cash account you deposited the money to and the amount you deposited.
8.3.3 Dividend Transaction
The dividend transaction is the transaction when you receive a share dividend. To enter this transaction you will need the date the transaction took place, the cash account that received the money, the share account containing the stock, the symbol of the stock and the dividend amount paid to you.
8.3.4 Dividend DRP Transaction
The dividend DRP (dividend reinvestment programme) transaction is the transaction when you receive a share dividend that is automatically reinvested back into the company by buying more shares. To enter this transaction you will need the date the transaction took place, the share account containing the stock, the symbol of the stock and the amount of shares acquired.
8.3.5 Fee Transaction
The fee transaction is the transaction when you receive any kind of fee such as account keeping fees, Tax etc. To enter this transaction you will need the date the transaction took place, the cash account that received the fee and the amount that you were charged.
8.3.6 Interest Transaction
The interest transaction is the transaction when you receive any interest in one of your cash accounts. To enter this transaction you will need the date the transaction took place, the cash account that received the interest and the amount that you were credited. If your account is in the negative and this was the interest that was debited from your account, then put a minus sign in front of the value.
8.3.7 Reduce Transaction
The reduce transaction is the "sell shares" transaction. To enter this transaction you will need the date the transaction took place, the cash account where the money from the sale will go, the share account that reduced the shares, the symbol of the stock you reduced (e.g. CBA), the number of shares you reduced, the total value of the shares at the time of sale and finally the cost of the trade. This information should all be available from your broker.
8.3.8 Transfer Transaction
The transfer transaction is the transaction where you transfer money from one cash account to another. To enter this transaction you will need the cash account where you withdrew the money, the destination cash account and the amount you transferred. If there was a fee for the transfer, you need to enter this as a separate transaction.
9 Gondola Language
The Gondola Language is a language for analysing stock market data. The language allows you to do a variety of tasks from listing stocks in tables that only match your criteria to creating automated buy/sell paper trade rules. The language is closely modelled after the C programming language, so if you know that language, then you should find Gondola easy and familliar to work with.
Whenever you enter a Gondola expression there are two implicit variables that are always set: the current date and the current stock. For example if you are displaying a 5 Tables of stock quotes, you can execute an equation for each stock. If you entered this line:
avg(close, 30)
It would display, for each stock, the average day close value over the last 30 days starting from today. Here the current date would be set to the most recent day you have a quote for and the current stock would be set to the current stock.
You can also enter equations when performing 11 Analysis. If you entered the following as a buy rule:
avg(close, 15) > avg(close, 30, 1)
It would only buy the stock when the average day close over the last 15 days was higher than the average day close of over the last 30 days, where the 30 day average would be calculated starting from the previous day and working backwards. So here the current date would be set to whatever date the trade was to be analysed for.
The Gondola language is very type strict. What this means is that each value has a given type, whether it is an integer, real or boolean. This means that the numbers
12
and
12.0
are different, and
1
and
true
are different. If you get a type mismatch error, you've probably entered an integer number (e.g.
12
) instead of a real number (e.g.
12.0
).
9.1 Gondola Operators
The Gondola language supports the following boolean operators: and, or and not. For example:

close > 12.0 or open > 12.0

close > 12.0 and open > 12.0

not(avg(open, 15) > 12.0)
It also supports basic arithmetic: +, , * and /. For example:

close + lag(close, 1)

close  lag(close, 1)

close / lag(close, 1)

close * lag(close, 1)
The type of returned value of arithmetic operators is the same of the first operand. The following examples explain the behaviour:
 INTEGER_TYPE + INTEGER_TYPE returns an INTEGER_TYPE
 INTEGER_TYPE  FLOAT_TYPE returns an INTEGER_TYPE
 FLOAT_TYPE  INTEGER_TYPE returns a FLOAT_TYPE
 FLOAT_TYPE / INTEGER_TYPE returns a FLOAT_TYPE
 FLOAT_TYPE * FLOAT_TYPE returns a FLOAT_TYPE
And finally it also supports the relational operators: ==, >, >=, <, <= and !=. For example:

volume == lag(volume, 1)

close > lag(close, 1)

close >= lag(close, 1)

close < lag(close, 1)

close <= lag(close, 1)

volume != lag(volume, 1)
9.2 Gondola Variables
The Gondola language has full support for variables, which allow you to store, retrieve and manipulate values. When defining a new variable you need to specify whether the variable can change or is constant, the variable type, the name of the variable and optionally the initial value of the variable.
Examples:

int averageValue

const boolean myValue = true

float averageValue = 10.0*12.0
9.3 Gondola Functions
9.3.1 Absolute Value
The absoluate value function returns the absolute value of the given value. The absolute value is the positive value of a number. For example the absolute value of 12 is 12, and the absolute value of 12 is 12.
abs(VALUE)
Where VALUE is the initial value.
Example:
abs(28.0)
Returns the absolute value of 28.0 which is 28.0.
9.3.2 Average
The average function averages a series of stock quotes.
avg(QUOTE, DAYS[, START_OFFSET])
Where QUOTE is open, close, low, high or volume. Where DAYS is the number of days to average. Where START_OFFSET is the most recent date to average, 0 means the current trading date, 1 means the previous trading date, etc.
Example:
avg(open, 15, 1)
Returns the average of the day open value for the current stock for the last 15 days, ending with yesterday.
9.3.3 Bollinger Bands
The bollinger bands are: bol_upper=avg+2sd, bol_lower=avg2sd .
bol_lower(QUOTE, DAYS[, START_OFFSET])
bol_upper(QUOTE, DAYS[, START_OFFSET])
Where QUOTE is open, close, low, high or volume. Where DAYS is the number of days to average. Where START_OFFSET is the most recent date to average, 0 means the current trading date, 1 means the previous trading date, etc.
Example:
bol_upper(close, 26, 1)
Returns the bollinger band value of the day close value for the current stock for the last 26 days, ending with yesterday.
The expression
bol_lower(close, 26, 0)
is the same as
bol_lower(close, 26)
similarly for
open
,
high
and
low
.
The expression
bol_upper(close, 26, 0)
is the same as
bol_upper(close, 26)
similarly for
open
,
high
and
low
.
9.3.4 Correlation
The correlation function returns the correlation between two stock quotes.
corr(SYMBOL, QUOTE, DAYS[, START_OFFSET])
Where SYMBOL is the stock symbol. Where QUOTE is open, close, low, high or volume. Where DAYS is the number of days to correlate. Where START_OFFSET is the most recent date to correlate, 0 means the current trading date, 1 means the previous trading date, etc.
Example:
corr("CBA", close, 30, 1)
Returns the correlation of the day close values of this stock and CBA over 30 days ending in yesterday.
9.3.5 Cosine
The cosine function returns the cosine of the given value.
cos(VALUE)
Where VALUE can be any float or integer.
Example:
cos(0)
Returns 1.0
cos(3.141592653589793/2)
Returns 0.0
cos(3.141592653589793)
Returns 1.0
cos((3*3.141592653589793)/2)
Returns 0.0
cos(2*3.141592653589793)
Returns 1.0
9.3.6 Day
The day function returns the current day of the month.
day()
Example:
day()
Returns the current day, which will be 31, if it is the 31st.
9.3.7 Day of Week
The day of week function returns the current day of the week.
dayofweek()
Example:
dayofweek()
Returns the current day of the week, which will be 1, if it is a Sunday.
9.3.8 Day of Year
The day of year function returns the current day of the year.
dayofyear()
Example:
dayofyear()
Returns the current day of the year, which might be 365, if it is New Years Eve.
9.3.9 Exponential
The exp function returns the exponential of the given value.
exp(VALUE)
Where VALUE is any float or integer.
Example:
exp(0)
Returns 1.0
9.3.10 Exponential Moving Average
The exponential moving average function averages a series of stock quotes according to the following equation: EMA(current) = EMA(previous) + SMOOTHING_CONSTANT * (QUOTE  EMA(previous).
ema(QUOTE, DAYS[, START_OFFSET][, SMOOTHING_CONSTANT])
Where QUOTE is open, close, low, high or volume. Where DAYS is the number of days to average. Where START_OFFSET is the most recent date to average, 0 means the current trading date, 1 means the previous trading date, etc. Where SMOOTHING_CONSTANT is the smoothing constant.
Example:
ema(close, 26, 0.1, 1)
Returns the average of the day close value for the current stock for the last 26 days, ending with yesterday.
The expression
ema(close, 26, 0, 0.1)
is the same as
ema(close, 26)
similarly for
open
,
high
and
low
.
The expression
ema(close, 26, 0, 0.2)
is the same as
ema(close, 26, 0.2)
similarly for
open
,
high
and
low
.
The expression
ema(close, 26, 1, 0.1)
is the same as
ema(close, 26, 1)
similarly for
open
,
high
and
low
.
9.3.11 For
The for function is a looping function that allows you to loop over an expression of code. Typically the loop is tied to a variable, so you need to set the initial value of the variable, a condition where the loop will terminate, and how the variable should change after each loop.
for(INITIAL; CONDITION; LOOP) { COMMAND }
The function will execute the INITIAL expression, then execute the COMMAND expression, and then execute the LOOP expression. It will then execute the CONDITION expression. If the CONDITION expression was FALSE then the function will return. Otherwise it will run the COMMAND expression, then the LOOP expression, then check the CONDITION expression, etc.
Example:
int b = 0
for(int i = 0; i < 10; i = i + 1) {
b = b + i
}
The above code will sum the numbers 0, 1, 2, ... 9 and store the result in the b variable.
9.3.12 If
The if function allows a selection of which code to be executed.
if(VALUE) { TRUE } else { FALSE }
If the value of the VALUE expression is true, then the TRUE expression will be executed, otherwise the FALSE expression will be.
Example:
if(lag(open, 0) > lag(open, 1)) {
lag(open, 0)
}
else {
lag(open, 1)
}
Returns the greater of today and yesterday's day open values.
9.3.13 Lag
The lag function returns a stock quote.
lag(QUOTE[, OFFSET])
Where QUOTE is open, close, low, high or volume. Where OFFSET is the date to retrieve the stock quote, 0 means the current trading date, 1 means the previous trading date, etc.
Example:
lag(high, 5)
Returns the day high value of the current stock, 5 days previous.
The expression
lag(close, 0)
is the same as
lag(close)
and they can both be abbreviated to
close
; similarly for
open
,
high
and
low
.
9.3.14 Logarithm
The log function returns the natural logarithm of the given value.
log(VALUE)
Where VALUE is any positive float or integer.
Example:
log(1)
Returns 0.0
log(exp(1)))
Returns 1.0
9.3.15 Minimum
The minimum function finds the minimum of a series of stock quotes.
min(QUOTE, DAYS[, START_OFFSET])
Where QUOTE is open, close, low, high or volume. Where DAYS is the number of days to search. Where START_OFFSET is the most recent date to search, 0 means the current trading date, 1 means the previous trading date, etc.
Example:
min(volume, 15, 1)
Returns the minimum volume of trade for the current stock for the last 15 days, ending with yesterday.
9.3.16 Maximum
The maximum function finds the maximum of a series of stock quotes.
max(QUOTE, DAYS[, START_OFFSET])
Where QUOTE is open, close, low, high or volume. Where DAYS is the number of days to search. Where START_OFFSET is the most recent date to search, 0 means the current trading date, 1 means the previous trading date, etc.
Example:
max(volume, 15, 1)
Returns the maximum volume of trade for the current stock for the last 15 days, ending with yesterday.
9.3.17 Moving Average Convergence Divergence
The MACD is: MACD = 26 days EMA  12 days EMA.
macd(QUOTE[, START_OFFSET])
Where QUOTE is open, close, low, high or volume. Where START_OFFSET is the most recent date to average, 0 means the current trading date, 1 means the previous trading date, etc.
Example:
macd(close, 1)
Returns the macd value of the day close value for the current stock ending with yesterday.
The expression
macd(close, 0)
is the same as
macd(close)
similarly for
open
,
high
and
low
.
The expression
macd(close, 0)
is the same as
ema(close,26,0,0.1)ema(close,12,0,0.1)
similarly for
open
,
high
and
low
.
9.3.18 Momentum
The momentum is: momentum(now)=quote(now)quote(period deleyed).
momentum(QUOTE, DAYS[, START_OFFSET])
Where QUOTE is open, close, low, high or volume. Where DAYS is the number of days to delay. Where START_OFFSET is the most recent date to average, 0 means the current trading date, 1 means the previous trading date, etc.
Example:
momentum(close, 26, 1)
Returns the momentum value of the day close value for the current stock for the last 26 days, ending with yesterday.
The expression
momentum(close, 26, 0)
is the same as
momentum(close, 26)
similarly for
open
,
high
and
low
.
9.3.19 Month
The month function returns the current month.
month()
Example:
month()
Returns the current month, which will be 8, if it is August.
9.3.20 On Balance Volume
The OBV is the sum of volumes in the period, counted as positive if close is greater than open or as negative if open is greater then close.
obv(DAYS[, START_OFFSET[, INITIAL_VALUE]])
Where DAYS is the number of days to count over. Where START_OFFSET is the most recent date to average, 0 means the current trading date, 1 means the previous trading date, etc. Where INITIAL_VALUE is the initial value which counting from
Example:
obv(200, 1, 50000)
Returns the obv value counted over the last 200 days, ending with yesterday, starting with value 50000.
The expression
obv(200)
is the same as
obv(200, 0, 50000)
.
9.3.21 Percent
The percent function returns the given percent of the given value.
percent(VALUE, PERCENT)
Where VALUE is the initial value and PERCENT is the ratio to return.
Example:
percent(200, 10)
Returns 10% of 200 which is 20.
9.3.22 Relative Strength Index
This function calculates the Relative Strength Index (RSI) of the current stock.
rsi([PERIOD[, START_OFFSET]])
Where PERIOD is the period to apply the RSI. Where START_OFFSET is the most recent date to calculate, 0 means the current trading date, 1 means the previous trading date, etc.
Example:
rsi()
Returns the RSI of the current stock.
9.3.23 Sine
The sine function returns the sine of the given value.
sin(VALUE)
Where VALUE can be any float or integer.
Example:
sin(0)
Returns 0.0
sin(3.141592653589793/2)
Returns 1.0
sin(3.141592653589793)
Returns 0.0
sin((3*3.141592653589793)/2)
Returns 1.0
sin(2*3.141592653589793)
Returns 0.0
9.3.24 Square Root
The square root function returns the square root of the given value.
sqrt(VALUE)
Where VALUE is the initial value.
Example:
sqrt(144)
Returns the square root of 144 which is 12.
9.3.25 Standard Deviation
sd(QUOTE, DAYS[, START_OFFSET])
Where QUOTE is open, close, low, high or volume. Where DAYS is the number of days to average. Where START_OFFSET is the most recent date to average, 0 means the current trading date, 1 means the previous trading date, etc.
Example:
sd(close, 26, 1)
Returns the standard deviation value of the day close value for the current stock for the last 26 days, ending with yesterday.
The expression
sd(close, 26, 0)
is the same as
sd(close, 26)
similarly for
open
,
high
and
low
.
9.3.26 Sum
The sum function sums a series of stock quotes.
sum(QUOTE, DAYS[, START_OFFSET])
Where QUOTE is open, close, low, high or volume. Where DAYS is the number of days to sum. Where START_OFFSET is the most recent date to sum, 0 means the current trading date, 1 means the previous trading date, etc.
Example:
sum(open, 15, 1)
Returns the sum of the day open value for the current stock for the last 15 days, ending with yesterday.
9.3.27 While
The while function is a looping function that allows you to loop over an expression of code. The loop contains an expression that will be executed until a specific condition is not met.
while(CONDITION) { COMMAND }
The function will execute the COMMAND expression until the CONDITION is not met. If the CONDITION is never met, the loop will not be entered.
Example:
int sum = 1
while(sum < 100) {
sum = sum + 1
}
The above code will keep increment the value of sum until it is equal to 100.
10 Jython Macros
Since version 0.5, Venice supports the use of the Jython (http://www.jython.org) scripts to automate the operation of the program. More information and example scripts will be available soon. For the moment, suffice to say that any Java object that can be accessed by Venice source code is fair game for macrofication.
Here's a trivial example of a simple script that displays a progress dialog:
import nz.org.venice.ui.ProgressDialogManager as PM
import java.lang.Thread as T
p = PM.getProgressDialog()
p.setMaximum(10)
p.setProgress(0)
p.show("performing task");
p.setProgress(6)
T.sleep(500);
p.setProgress(4)
T.sleep(500);
p.setProgress(3)
T.sleep(500);
p.setProgress(9)