Log messages

When something happens, Zorro will print a message in the message window and record it in the .log file. This file can be opened with any text editor. Details about Zorro's other produced files files can be found under file formats. The messages below are 'hardwired' in the software; their 'verbosity' can be set up with the Verbose variable. Additional messages can be inserted in the log by the strategy script using the print functions.

In a message, a trade is identified like this:

[AUD/USD:CY:S1234] - Short trade (S) with AUD/USD, CY algorithm identifier, and a trade ID number ending with 1234. The ID can be used to identify the trade in the broker's platform. If a trade is partially closed, the ID can change. Trade types are short S, long L, put P, or call C.

[SPY::LP0103] - Long put (LP) with SPY, no algorithm identifier, and ID ending with 0103.

{AUD/USD:CY:s1234} - Short phantom trade (lowercase s and winged brackets). Phantom trades are simulated, not executed.

(AUD/USD::L) - Long pending trade (round parentheses). Pending trades are not yet opened and thus have no trade number.

If a message - especially a broker error, see below - is too long and outside the right window border, the content of the message window can be copied by double clicking into the window, then pasted in a text editor.

Startup messages

The following messages are generated at start:

Loading AUD/USD prices... 1000 h

Zorro downloaded 1000 hours recent price history from the broker's server and used it for the LookBack period. If an asset is not available for trading - which can happen with assets that US residents are not allowed to trade, f.i. some CFDs - an error message is issued and the asset must be excluded from the strategy.

Loading AUD/USD prices... 910+111 h

The PRELOAD flag was set and historic price data was available. Zorro read 910 hours price data from its history files and downloaded additional 111 hours price history from the broker's server. For portfolio strategies the number of downloaded hours can differ from asset to asset.

Loading AUD/USD prices... 1000 h, gap 36 h

There is a 36 hours gap between the end of the price data and the current time. This happens when a not suited price source was used for historical data, or when the price server was not recently updated, for instance after a weekend or holiday, or when the market was closed at session start. If the gap is harmful or not depends on strategy and gap size.

Loading AUD/USD prices... 835 h, 65 bars added

The price server could not cover the full LookBack period in time; 65 bars had to be substituted by Zorro. This can happen with some MTR4 brokers. MTR4 servers sometimes get the missing data after a waiting time; in that case the strategy just needs to be restarted after a minute. Added bars are normally not harmful, as missing prices are interpolated. But when a large number of bars has been added, indicators with long time periods can be less accurate at strategy start and cause reduced performance during the first time. Use the PRELOAD flag for overcoming price server limitations.

Loading AUD/USD prices... failed

The asset is available, but price data can not be downloaded. This can happen with MTR4 servers that need a long time for sending assets that have not been requested before (f.i. because no chart with that asset was opened in the MTR4 client). In such a case, start the strategy again after a minute - chances are that the MTR4 server meanwhile got its act together.

[AUD/USD:CY:L4401] - resumed

Zorro is resuming a previously closed or interrupted trading session and continues the trades that were opened in the previous session. Previous trades are not resumed when the new session opened new trades already in the first run.

[AUD/USD:CY:L4401] - (closed)

The trade cannot be resumed. Either an asset named "AUD/USD" was not available at session start (see Error 053), or the trade was externally closed through a 'safety net' stop loss or manually in the broker platform.

Read Trend.par Trend.c Trend.fac

The parameters, rules, and capital allocation factors of the Trend strategy were loaded. This message is generated at start and again when the strategy was re-trained (see below).

End of lookback period

All data series are filled and trading is now enabled.

Bar messages

[21: Wed 11-01-19 00:00] (95.18)

Bar number, bar end time bar end time rounded to 1 second, and optional ask price of the asset selected with the scrollbox. The number of decimals depends on the PIP value of the asset.

[217: Wed 11-01-19 01:15:00] 91.41/96.02\91.35/95.90

Bar number, rounded bar end time, and optional open/high\low/close ask prices of the selected asset with Verbose at 2. If none of the assets used in the script is selected with the scrollbox, no prices are displayed.

[217: Wed 11-01-19 01:15:00] 91.41/96.02\91.35/95.90 -0.15

As before, but with current ask/bid spread with Verbose at 3. The spread is displayed as a negative value to be subtracted from the ask prices for getting the bid prices.

[1385: Fri 12-06-29 00:00] 9038 +1438 9/7 (97.69)

Bar number, rounded bar end time, current equity, current open value, number of open winning/losing positions, and current price (when trades have been opened). The decimals of the equity and open value numbers depend on the decimals setting in the account list.

Trade messages - normal trades

The following messages are generated when trades are entered or exited. Prices and profits displayed are based on the last price quote. Prices are generally displayed as ask prices, even when the position was in fact opened or closed at the bid price. Profits include estimated trading costs. In live trading, real fill prices and profits can slightly deviate due to slippage and differences in trading costs.

[AUD/USD:CY:S] Skipped - Lots/Margin 0

The trade was not entered because Lots or Margin was set to 0.

[AUD/USD:CY:S] Skipped - Margin 10, Min 45

The trade was not entered because MARGINLIMIT is set and the allocated Margin of 10 account currency units was too low for buying 1 lot of the asset, which would require margin 45. If the ACCUMULATE flag is set, the margin of those skipped trades will be accumulated until a trade is eventually entered.

[AUD/USD:CY:S] Skipped - Risk 40, Min 90

The trade was not entered because the allowed Risk of 40 (in account currency units) was too low to cover the trade risk of 90 (see RISKLIMIT).

[AUD/USD:CY:S] Skipped - Total Margin 450

The trade was not entered because MARGINLIMIT is set and the account has not enough free margin to cover the Risk of the trade in a safe distance from a margin call. Either reduce the trade volume, or close open trades, or add some money to the account. You can see the current free margin in the broker platform, f.i. in the Account status of the FXCM Trading Station.

[AUD/USD:CY:S] Skipped - Total Risk 900

The trade was not entered because there's not enough balance in the account to safely cover the total risk of all open trades (see RISKLIMIT).

[AUD/USD:CY:S] Skipped (bar outside ...)

Only in a verbose log. The trade was not entered because trading was disabled on that bar, for instance due to SKIP flags, in the LookBack period, inside a TimeFrame, or during weekends or holidays.

(AUD/USD:CY:S) Short 3@0.87400 Entry stop

A pending trade was opened, with an entry stop at 0.87400. If the price drops to the entry stop within EntryTime, 3 lots will be bought at 0.87400 plus slippage. Note that pending trades are not sent to the broker.

(AUD/USD:CY:S) Short 3@0.87600 Entry limit

A pending trade was opened, with an entry limit at 0.87600. If the price rises to the entry limit within EntryTime, 3 lots will be bought at 0.87600 plus slippage. Note that pending trades are not sent to the broker.

(AUD/USD:CY:S) Missed entry 0.87400 after 2 bars

The pending trade was not executed because the entry price was not met within the allowed time period (EntryTime). This message is not displayed in the window, but in the log file.

(AUD/USD:CY:S) Missed entry 0.87400 at cancellation

The pending trade was not executed because the entry price was not met until the next exit command. This message is not displayed in the window, but in the log file.

(AUD/USD:CY:S) Order expired after 48 hours

The trade was not executed because the order was entered just before the market was closed at a weekend or holiday, and EntryTime was not long enough to cover that period. This message is not displayed in the window, but in the log file.

(AUD/USD:CY:S) Balance limit exceeded

The trade was not executed because you're already too rich. Withdraw capital until your account balance stays below the limit for the free Zorro version.

[AUD/USD:CY:S4400] Short 1@0.87310 Risk 116 ptlsx

A short trade was entered at market. The trade volume was 1 lot, the last price quote (not necessarily the fill price) was 0.87310. The risk of this trade - the maximum amount that can be lost due to a stop loss - is 116 units of the account currency. Other exit conditions are displayed with letters: "p" for a profit target, "t" for trailing, "l" for a profit lock, "s" for a fixed trailing step, and "x" for a fixed exit time. In the log file the entry time is also listed.

{AUD/USD:CY:l4500} Long 3@0.87310 Risk 200

A long phantom trade - mind the winged brackets and the lowercase l - was entered at market. 3 imaginary lots were bought at the price 0.87310.

[AUD/USD:CY:l4500] Long 3@0.87310 Pool trade

A pool trade in virtual hedging mode was entered at market in reaction on the opening or closing of phantom trades. 3 lots were bought at price 0.87310.

[AUD/USD:CY:S4400] Cover 1@0.85934: +105 at 17:01

A short trade was closed by an exitShort call. 1 lot was covered at 17:01 UTC at current price 0.85934 and profit of 105 account currency units. Since displayed profit and exit price are based on the last price quote and estimated trading costs, the real profit or loss of the trade can slightly deviate from the displayed values, and is visible in the broker platform.

[AUD/USD:CY:L4501] Sell % 1@0.85945: +33 at 17:01

A long trade was partially closed by an exitLong call. 1 lot was sold at 17:01 UTC at exit price 0.85945 and profit 33. The rest of the position remains open. The trade ID usually changes by partially closing, and the displayed ID and all further messages of that trade are for the remaining open position.

[AUD/USD:CY:L4401] Reverse 1@0.85945: +33 at 17:01

A long trade was closed by opening a short trade in opposite direction.

[AUD/USD:CY:L4451] Expired 1@0.85945: +33 at 17:01

A long trade was automatically closed because its LifeTime expired.

[AUD/USD:CY:L4444] Liquidated 50@0.8567: -1044 at 17:01

A long trade was liquidated due to a margin call by spending all Capital.

[AUD/USD:CY:S4400] Exit 1@0.85934: +105 at 17:01

A trade was closed by the trade management function. 1 lot was sold at the price 0.85934. The profit was 105.

[AUD/USD:CY:S2210] Closed 1@0.80201: +20.5 at 17:01

The trade was manually closed in the broker platform. 1 lot was sold at the price 0.80201. The profit was 20.5.

[AUD/USD:CY:L1200] Stop 1@0.78713: -49.30 at 17:25

The trade was stopped out at 17:25 UTC. 1 lot was sold at the price 0.78713. The loss was 49.30.

[AUD/USD:CY:L1200] TP 1@0.7971: +55.70 at 17:25

The trade hit the profit target at 17:25 UTC. 1 lot was sold at the price 0.7971. The profit was 55.70.

[AUD/USD:CY:S4400] Trail 1@0.79414 Stop 0.80012

The stop loss moved, either by script, or by trailing, or by updating the trade. The new stop is 0.80012. In TICKS mode and in life trading, a trade can trail several times within a bar. A trail message is only printed when the stop loss has moved by more than 2 pips, therefore the real stop limit at the end of the bar be different than the last printed value. Smaller PIP values produce more trail messages.

Trade messages - options and futures

The following messages are generated when option or future contracts are entered, closed, or exercised. Note that displayed underlying prices are taken from the options history when available, and thus can sometimes slightly deviate from the unadjusted asset prices taken from the price history. Displayed premiums, unlike underlying prices that are always the ask price, include the ask-bid spread.

[SPY:COT:LP0103] Buy 1 Put 20170118 210.0 100@1.16 Val 10 at 20:00

Buy a SPY put option with expiration at January 18, 2017 and strike price 210 at a $116 premium (100 * 1.16). The Val element of the contract was 10.

[SPY:COT:SC0104] Write 1 Call 20170118 215.0 100@1.09 at 20:00

Sell short a SPY call option with expiration at January 18, 2017 and strike price 215 for a $109 premium (100 * 1.09).

[SPY::LP6633] Exercise 1 Put 212.0 100@209.84: +124$ at 19:00

Exercise a SPY put option with a strike price 212 at an underlying ask price of 209.84, and sell the underlying at market for a total win of $124.

[SPY::LC6634] Sell 1 Call 210.0 100@1.46: -22.00 at 19:00

Sell back a long SPY call option at $1.46, for a total loss of $22.

[SPY::SC6634] Cover 1 Call 210.0 100@1.46: +22.00 at 19:00

Buy back a short SPY call option at $1.46, for a total win of $22.

[SPY::LP5727] Expired OTM 1 Put 207.0 100@0.0: -190$ at 19:00

A long SPY put option expired out of the money. The $190 premium was lost.

[SPY::LC5131] Lapsed 1 Call 207.0 100@150.00: +50$ at 19:00

A long SPY call option position was found by contractCheck() to be externally closed on the account, by expiration, manual closing, being exercised, or similar events. A profit of $50 was assumed, based on the premium and the current underlying price 150.

[SPY::LC5728] Expired ITM 1 Call 207.0 100@209.50: +112$ at 19:00

A long SPY call option expired in the money at current underlying ask price 209.50. The underlying was sold at market. The total profit, minus the paid premium, was $112.

Other messages

Thursday 24.1.2012 --- Profit $880 ---

The daily profit or loss in relation to the previous day (if Verbose >= 2).

[AUD/USD:CY:S4400] +116$ s0.8733 c0.8729 e0.8731

Daily list of all currently open trades (if Verbose >= 3); also displayed on the status page. The trade made 116$ profit, based on a stop price of 0.8733, current price of 0.8729, and entry price of 0.8731.

Current DD: 2100$ (65%) in 11 days, CBI 23%

If Verbose >= 2: Depth and duration of the last or current equity drawdown in percent of the preceding equity peak; also displayed on the status page. CBI is the probability of the current drawdown based on the PnL curve from the last backtest. Note that the CBI is only valid when the backtest used the same trade volume as the live trading session, and no trades from a previous session have been resumed.

Market closes on 02.01.2017 23:00

It's weekend or holiday. Zorro takes a break and suspends trading until Sunday night when the Sydney stock market opens again (see also BarMode, StartWeek and EndWeek).

Liquidation / Margin call in 2016 (Equity 12800$ Margin 13500$)

The current margin requirement exceeds the available capital on the account (when the Capital variable is set). The trade is liquidated at market and the MARGINCALL status flag is set.

!ZDAS Exception - there is no tradeable price
[AUD/USD:CY:L] Can't open 1@0.82345 at 21:05:30

Messages that begin with an exclamation mark ("!") are information, errors, warnings, diagnostics, or other messages from the broker API (see Error Messages). A frequent message is about not being able to open or close a trade because no price quote is currently available or trading is temporarily suspended ("Instrument trading halted", "There is no tradeable price" etc.). This happens especially when assets are traded outside business hours. If a trade can not be closed, Zorro will attempt in regular intervals to close it again.

Error XXX ....
Warning XXX ...

Error messages normally indicate a bug in the script or a problem with the historical data. Warning messages indicate a potential problem. For details see Error Messages.

See also:

Bar, testing, trading, file formats, error messages, performance report


► latest version online