Skip to main content

The build fails

The project looks for the two libraries in the folder Deepchart is installed in. Pass your folder:
or change DeepchartDir in the project file. An old version of Deepchart does not have these libraries: update it.
The output folder is Documents\Deepchart\Indicators. If the build cannot write there, check that the folder exists and that no other program keeps the file open.
VolSysAPI.Structure (bars) and VolumetricaAPI.Connection.Structure (trades, order book) have the same name. Use an alias for the second one:

The indicator is not in the list

The most common cause. The build warns when the id is still YOUR-DEV-ID, and the log of Deepchart says DeepchartDevId ... is not the one of the user. See Developer id.
Deepchart checks a dll before loading it, and does not load it when it uses anything outside what an indicator may use. A notification names the dll, and the log lists every use with the method it is in:
An indicator may use:
  • the indicator API: VolSysAPI, VolumetricaAPI.Chart, and the types of VolumetricaCore the API gives you;
  • the basic types of System (numbers, strings, Math, DateTime, TimeSpan, Convert, Random, the common exceptions, Func and Action), System.Collections.Generic, LINQ to objects, StringBuilder, CultureInfo;
  • the attributes of System.ComponentModel, System.ComponentModel.DataAnnotations, System.Text.Json.Serialization and VolumetricaControls for the parameters;
  • Debug, Stopwatch and Console while you develop.
Everything else is rejected: reflection (typeof and GetType() included), records, dynamic, files, network, processes, threads, tasks and async, lock, unsafe code and DllImport, and references to other libraries.
An indicator is listed only if it has a public static method named Register returning IndicatorDescriptionBase.
Deepchart loads local indicators from Documents\Deepchart\Indicators. Check OutputPath if you changed it.
The constructor and the property initializers run when the list is built. Keep them simple and do the work in OnLoad.

The indicator is on the chart but draws nothing

  • No call was asked for. OnOpenCall, OnCloseCall, OnEndCall are Off by default. Set them in OnSet.
  • The points are hidden. A point added with IsHidden: true stays hidden until you set IsHidden = false.
  • The series is not enabled. definition.BaseSeries is null when Enabled is false.
  • An annotation was not added. Creating it is not enough: call VAn.AddAnnotation(group, annotation).
  • The annotation is in the wrong place. With absolute coordinates the bar i is at X = i + 1, and Y is a value of the axis of its area. Set Area = ChartArea to draw in the area of the indicator.
  • The state was not reset. After a parameter change the indicator is calculated again from OnLoad. Fields which keep their old values give wrong results from the second calculation on.

The indicator stops on the server

The chart shows what the server says:
  • Indicator not available: it takes too long to start. The constructor, the property initializers or OnSet took more than 4 seconds.
  • Indicator not available: it failed to start. One of them threw.
  • Indicator stopped: time or stack limit exceeded. A call went over its time limit, or a recursion went too deep. See Time limits on the server.
  • Indicator calculation failed. A call threw. The log of the server has the exception; the chart does not, so reproduce it on the desktop.

The indicator shows a message instead of drawing

The chart does not respect the constraint of the indicator: another symbol, or other bars. The message says which ones the indicator is for.

The values are wrong on the last bar

The last bar is still open. OnClose is not called for it: update it in OnEnd, which is called after the history and after every batch of realtime updates.

The orders are refused

InsertOrder returns -1 and the reason says why. The most common ones:
  • Automatic trading is not allowed in paper/live accounts. An indicator trades only on a backtesting or a simulation account.
  • Automatic trading is not available on this phase of chart. On a simulation account the orders of the history are refused: run a backtest (Autotrading > Execute Backtest) to test on the history, or wait for the realtime.
  • Trading account is not available. No account is selected on the chart.
  • TradingApi is null. The indicator is calculated on the server, where there is no trading interface.
See Trading for the whole table.

Volume by price is empty

Set NeedVbp = true in OnSet, and check PriceList and VbpListAll for null: some symbols and data feeds do not have it.