// cAlgo.API public surface, generated for reading by people and coding agents. It is not meant to compile.
// Full reference with examples: https://help.ctrader.com/ctrader-algo/references/
namespace cAlgo.API
{
/// Represents a stop loss defined at an absolute price level.
public class AbsoluteStopLossProtection
{
/// Represents a stop loss defined at an absolute price level.
public AbsoluteStopLossProtection(double Price);
public AbsoluteStopLossProtection(AbsoluteStopLossProtection original);
/// The absolute price at which the stop loss is triggered.
public double Price {get; set;}
}
/// Represents the final take profit in an absolute take profit ladder, closing any remaining order volume at a specified price.
public class AbsoluteTakeProfitLastProtection
{
/// Represents the final take profit in an absolute take profit ladder, closing any remaining order volume at a specified price.
public AbsoluteTakeProfitLastProtection(double Price);
public AbsoluteTakeProfitLastProtection(AbsoluteTakeProfitLastProtection original);
/// The absolute price at which the remaining volume is closed.
public double Price {get; set;}
}
/// Represents a partial take profit closing a portion of the order volume at an absolute price.
public class AbsoluteTakeProfitProtection
{
/// Represents a partial take profit closing a portion of the order volume at an absolute price.
public AbsoluteTakeProfitProtection(double Volume, double Price);
public AbsoluteTakeProfitProtection(AbsoluteTakeProfitProtection original);
/// The absolute price at which the take profit is triggered.
public double Price {get; set;}
/// The portion of the order volume to close when the take profit is triggered.
public double Volume {get; set;}
}
/// Represents a ladder of up to four partial take profits at absolute prices, followed by a final take profit that closes any remaining volume.
public class AbsoluteTakeProfitProtections
{
/// Initializes a new instance with only a final take profit.
public AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection lastTakeProfit);
/// Initializes a new instance with one partial take profit and a final take profit.
public AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection firstTakeProfit, AbsoluteTakeProfitLastProtection lastTakeProfit);
/// Initializes a new instance with two partial take profits and a final take profit.
public AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection firstTakeProfit, AbsoluteTakeProfitProtection secondTakeProfit, AbsoluteTakeProfitLastProtection lastTakeProfit);
/// Initializes a new instance with three partial take profits and a final take profit.
public AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection firstTakeProfit, AbsoluteTakeProfitProtection secondTakeProfit, AbsoluteTakeProfitProtection thirdTakeProfit, AbsoluteTakeProfitLastProtection lastTakeProfit);
/// Initializes a new instance with four partial take profits and a final take profit.
public AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection firstTakeProfit, AbsoluteTakeProfitProtection secondTakeProfit, AbsoluteTakeProfitProtection thirdTakeProfit, AbsoluteTakeProfitProtection fourthTakeProfit, AbsoluteTakeProfitLastProtection lastTakeProfit);
public AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtections original);
/// Gets the first partial take profit, if any.
public AbsoluteTakeProfitProtection FirstTakeProfit {get;}
/// Gets the fourth partial take profit, if any.
public AbsoluteTakeProfitProtection FourthTakeProfit {get;}
/// Gets the final take profit that closes the remaining volume.
public AbsoluteTakeProfitLastProtection LastTakeProfit {get;}
/// Gets the second partial take profit, if any.
public AbsoluteTakeProfitProtection SecondTakeProfit {get;}
/// Gets the third partial take profit, if any.
public AbsoluteTakeProfitProtection ThirdTakeProfit {get;}
}
/// cBots and Indicators Access Rights.
public enum AccessRights
{
/// Algorithm doesn’t require any access rights.
None,
/// Access to file system.
FileSystem,
/// Access to Internet or other networks.
Internet,
/// Access to windows registry.
Registry,
/// The unlimited access rights.
FullAccess,
}
/// Provides data for the account switched event.
public class AccountSwitchedEventArgs
{
/// Returns new account number.
public int CurrentAccountNumber {get;}
/// Returns previous account number.
public int PreviousAccountNumber {get;}
}
/// Provides data for the active frame changed event.
public class ActiveFrameChangedEventArgs
{
/// Returns the new active frame or null.
public Frame NewFrame {get;}
/// Returns the old / previous active frame or null.
public Frame OldFrame {get;}
}
/// The interface representing an indicator / robot instance parameter. Provides properties that allow for accessing various information about an algo instance parameter.
public interface AlgoInstanceParameter
{
/// Gets the display name of a parameter (shown in the 'Parameters' section of an instance).
string DisplayName {get;}
/// Gets the name of a parameter.
string Name {get;}
/// Gets the ALgoParameterType of a parameter.
AlgoParameterType Type {get;}
/// Gets the value of a parameter.
object Value {get; set;}
}
/// Represents the collection of all the parameters of an indicator or Robot.
public interface AlgoInstanceParameters
{
/// Gets the number of parameters.
int Count {get;}
/// Gets a parameter by it is index.
AlgoInstanceParameter Item {get;}
/// Gets a parameter by it is name.
AlgoInstanceParameter Item {get;}
}
/// Represents the predefined kinds of algorithm types.
public enum AlgoKind
{
/// Custom indicator
CustomIndicator,
/// Standard / built-in indicator
StandardIndicator,
/// Robot / cBot
Robot,
/// Plugin
Plugin,
}
/// Represents an algorithm parameter.
public interface AlgoParameter
{
/// Gets default value of the parameter.
object DefaultValue {get;}
/// Gets Parameter name.
string Name {get;}
/// Gets parameter type.
AlgoParameterType Type {get;}
}
/// Represents the different types of algorithm parameters.
public enum AlgoParameterType
{
/// Represents a parameter of type int .
Integer,
/// Represents a parameter of type double .
Double,
/// Represents a parameter of type bool .
Boolean,
/// Represents a parameter of type string .
String,
/// Represents a parameter of type enum .
Enum,
/// Represents a parameter of type DataSeries .
DataSeries,
/// Represents a parameter of type Color .
Color,
/// Represents a parameter of type TimeFrame .
TimeFrame,
/// Represents a parameter of type Symbol .
Symbol,
/// Represents a parameter of type DateTime .
DateTime,
/// Represents a parameter of type DateOnly .
DateOnly,
/// Represents a parameter of type TimeSpan .
TimeSpan,
/// Represents a parameter of type Enum[] .
MultiEnum,
/// Represents a parameter of type Symbol[] .
MultiSymbol,
/// Represents a parameter of type TimeFrame[] .
MultiTimeFrame,
/// Represents a parameter of type File .
File,
/// Represents a parameter of type MultiFile .
MultiFile,
}
/// Provides all installed algorithms data
public interface AlgoRegistry
{
/// Checks existence of an algorithm.
bool Exists(string name);
/// Checks existence of an algorithm.
bool Exists(string name, AlgoKind algoKind);
/// Returns an algorithm type by it is name.
AlgoType Get(string name);
/// Returns an algorithm type by it is name and kind.
AlgoType Get(string name, AlgoKind algoKind);
/// Returns number of specific kind of installed algorithms.
int GetCount(AlgoKind algoKind);
/// Installs an algo file from provided file path.
InstallationResult Install(string filePath);
/// Installs an algo file from provided URI.
InstallationResult Install(Uri uri);
/// Installs an algo file from provided URI asynchrounsly.
InstallationOperation InstallAsync(string filePath);
/// Installs an algo file from provided URI asynchrounsly.
InstallationOperation InstallAsync(string filePath, Action callback);
/// Installs an algo file from provided URI asynchrounsly.
InstallationOperation InstallAsync(Uri uri);
/// Installs an algo file from provided URI asynchrounsly.
InstallationOperation InstallAsync(Uri uri, Action callback);
/// Gets number of installed algorithms.
int Count {get;}
/// Gets the list of all installed indicators.
IReadonlyList Indicators {get;}
/// Gets the list of all installed plugins.
IReadonlyList Plugins {get;}
/// Gets the list of all installed robots.
IReadonlyList Robots {get;}
/// Occurs when an algorithm is changed.
event Action AlgoTypeChanged;
/// Occurs when an algorithm is deleted.
event Action AlgoTypeDeleted;
/// Occurs when a new algorithm is installed.
event Action AlgoTypeInstalled;
}
/// Base type for representing an algorithm.
public interface AlgoType
{
/// Gets algorithm kind.
AlgoKind AlgoKind {get;}
/// Gets algorithm name.
string Name {get;}
/// Gets algorithm project file ".csproj" path if it has source code, otherwise null.
string ProjectFilePath {get;}
}
/// Provides data for Algo type changed event.
public class AlgoTypeChangedEventArgs : AlgoTypeEventArgs
{
}
/// Provides data for Algo type deleted event.
public class AlgoTypeDeletedEventArgs : AlgoTypeEventArgs
{
}
/// Base structure that provides data for Algo registry events.
public abstract class AlgoTypeEventArgs
{
/// Algo Type Name
public string AlgoTypeName {get;}
}
/// Provides data for Algo type installed event.
public class AlgoTypeInstalledEventArgs : AlgoTypeEventArgs
{
}
/// Represents the application.
public interface Application
{
/// Gets the color theme.
ColorTheme ColorTheme {get;}
/// Gets application draggables.
ApplicationDraggables Draggables {get;}
/// Gets current drawing color.
Color DrawingColor {get;}
/// Gets the environment type.
EnvironmentType EnvironmentType {get;}
/// Gets the current language.
Language Language {get;}
/// Gets user time offset.
TimeSpan UserTimeOffset {get;}
/// Gets the version.
Version Version {get;}
/// Occurs when color theme has changed.
event Action ColorThemeChanged;
/// Occurs when DrawingColor has changed.
event Action DrawingColorChanged;
/// Occurs when Language has changed.
event Action LanguageChanged;
/// Occurs when user time offset has changed.
event Action UserTimeOffsetChanged;
}
/// Represents a draggable box that can host a control and shown over application.
public interface ApplicationDraggable
{
/// Get / set the content control inside the draggable.
ControlBase Child {get; set;}
/// Get unique ID of the Draggable.
string Id {get;}
/// Get / set visibility of draggable.
bool IsVisible {get; set;}
/// Get / set move grip visibility (default: true).
bool ShowGrip {get; set;}
/// Get / set X coordinate (default: 0).
double X {get; set;}
/// Get / set Y coordinate (default: 0).
double Y {get; set;}
/// Occurs when the draggable's location is changed.
event Action LocationChanged;
}
/// Provides data for LocationChanged event of ApplicationDraggable.
public class ApplicationDraggableLocationChangedEventArgs
{
/// Gets the draggable.
public ApplicationDraggable Draggable {get;}
}
/// Represents collection of application draggables.
public interface ApplicationDraggables
{
/// Adds a draggable to application.
ApplicationDraggable Add();
/// Removes a draggable from application.
void Remove(ApplicationDraggable draggable);
/// Gets count of draggables.
int Count {get;}
}
/// Represents the active symbol panel.
public interface Asp
{
/// Adds a new tab to active symbol panel.
AspTab AddTab(string title);
/// Removes a tab from active symbol panel.
bool RemoveTab(string id);
/// Removes a tab from active symbol panel.
bool RemoveTab(AspTab tab);
/// Symbol tab in active symbol panel.
AspSymbolTab SymbolTab {get;}
}
/// Represents an active symbol panel block.
public interface AspBlock
{
/// Get / set content of current block.
ControlBase Child {get; set;}
/// Returns detached window properties.
DetachedWindow DetachedWindow {get;}
/// Get / set height of current block (default is 200).
double Height {get; set;}
/// Returns unique ID of the current block.
string Id {get;}
/// Get index of current block.
int Index {get; set;}
/// Get / set block attached / detached state.
bool IsAttached {get; set;}
/// Get / set block detachability, if True user can attach or detach the block.
bool IsDetachable {get; set;}
/// Get expanded state of current block.
bool IsExpanded {get; set;}
/// Returns title of the current block.
string Title {get;}
/// Occurs when block attached.
event Action Attached;
/// Occurs when block is detached.
event Action Detached;
/// Occurs when block is updated.
event Action Updated;
}
/// Provides data for plugin ASP block attached event.
public class AspBlockAttachedEventArgs
{
/// Attached block.
public AspBlock AspBlock {get;}
}
/// Provides data for plugin ASP block detached event.
public class AspBlockDetachedEventArgs
{
/// Detached block.
public AspBlock AspBlock {get;}
}
/// Provides data for plugin ASP block updated event.
public class AspBlockUpdatedEventArgs
{
/// Updated block.
public AspBlock AspBlock {get;}
}
/// Provides data for active symbol panel symbol changed event.
public class AspSymbolChangedEventArgs
{
/// New symbol of active symbol panel.
public Symbol NewSymbol {get;}
/// Old symbol of active symbol panel.
public Symbol OldSymbol {get;}
}
/// Active symbol panel tab.
public interface AspSymbolTab
{
/// Adds a new section block to active symbol panel.
AspBlock AddBlock(string title);
/// Removes a section block from active symbol panel.
bool RemoveBlock(string id);
/// Removes a section block from active symbol panel.
bool RemoveBlock(AspBlock block);
/// Current symbol of Active symbol panel.
Symbol Symbol {get;}
/// Occurs when active symbol panel selected symbol changes.
event Action SymbolChanged;
}
/// Represents an active symbol panel tab.
public interface AspTab
{
/// Get / set content of current tab.
ControlBase Child {get; set;}
/// Returns unique ID of the current tab.
string Id {get;}
/// Get / set index of current tab (Must be greater than zero).
int Index {get; set;}
/// Get / set selected state of current tab.
bool IsSelected {get; set;}
/// Returns title of the current tab.
string Title {get;}
/// Occurs after tab IsSelected value change.
event Action IsSelectedChanged;
}
/// Provides data for plugin ASP tab IsSelectedChanged event.
public class AspTabIsSelectedChangedEventArgs
{
/// ASP tab.
public AspTab AspTab {get;}
}
/// The asset represents a currency.
public interface Asset
{
/// Converts value to another asset.
double Convert(Asset to, double value);
/// Converts value to another asset.
double Convert(string to, double value);
/// Number of asset digits
int Digits {get;}
/// The asset Name
string Name {get;}
}
/// Represents the list of all the assets with the asset names as string values.
public interface Assets
{
/// Defines if the specific asset exists.
bool Exists(string assetName);
/// Gets the asset.
Asset GetAsset(string assetName);
/// Get multiple assets on a single call.
Asset[] GetAssets(string[] assetNames);
/// Gets the total number of the assets.
int Count {get;}
/// Gets the desired asset.
string Item {get;}
}
/// Provides methods and events to manage and monitor backtesting processes.
public interface Backtesting
{
/// Starts the backtesting process.
BacktestingProcess Start(RobotType robotType, string symbolName, TimeFrame timeFrame, BacktestingSettings settings, object[] parameterValues);
/// Provides access to backtesting data sources.
BacktestingDataSources DataSources {get;}
/// Occurs when the backtesting process is completed.
event Action Completed;
/// Occurs when the backtesting progress changes.
event Action ProgressChanged;
}
/// Represents an OHLCV bar.
public sealed struct BacktestingBar : ValueType
{
/// Represents an OHLCV bar.
public BacktestingBar(DateTime Time, double Open, double High, double Low, double Close, long Volume);
/// Close Price
public double Close {get; set;}
/// High Price
public double High {get; set;}
/// Low Price
public double Low {get; set;}
/// Open Price
public double Open {get; set;}
/// Open Time
public DateTime Time {get; set;}
/// Volume Amount
public long Volume {get; set;}
}
/// Represents a collection of backtesting bars data.
public class BacktestingBarsData
{
/// Creates a new instance of BacktestingBarsData with passed data.
public BacktestingBarsData(IEnumerable data);
}
/// Provides data for the backtesting completed event.
public class BacktestingCompletedEventArgs
{
/// Gets the HTML report of the backtesting results.
public string HtmlReport {get;}
/// Gets the JSON report of the backtesting results.
public string JsonReport {get;}
/// Gets the backtesting process that has completed.
public BacktestingProcess Process {get;}
}
/// Base type for backtesting data used for backtesting data source.
public interface BacktestingData
{
}
/// Specifies the data mode used for backtesting.
public enum BacktestingDataMode
{
/// Tick data mode.
Ticks,
/// One-minute data mode.
M1,
/// One-minute CSV data mode.
M1Csv,
/// Open prices data mode.
OpenPrices,
/// Tick data from a CSV file.
TickCsv,
}
/// Represents a backtesting data request for a backtesting data source.
public interface BacktestingDataRequest
{
/// Completes current request.
void Complete(BacktestingData data);
/// Notifies current request failure if something went wrong.
void Fail(string errorMessage);
/// Gets request data type.
BacktestingDataSourceDataType DataType {get;}
/// Gets request end time.
DateTime EndTime {get;}
/// Gets request price data source Id (Symbol and TimeFrame).
PriceDataSourceId PriceDataSourceId {get;}
/// Gets request start time.
DateTime StartTime {get;}
/// Gets current status of request.
BacktestingDataRequestStatus Status {get;}
/// Occurs when request status is changed.
event Action StatusChanged;
}
/// Specifies the different status of a backtesting data request.
public enum BacktestingDataRequestStatus
{
/// Request is in progress.
InProgress,
/// Request is failed by plugin.
Failed,
/// Request is completed by plugin.
Completed,
/// Request is cancelled.
Cancelled,
}
/// Provides data for the backtesting data request status changed event.
public class BacktestingDataRequestStatusChangedEventArgs
{
/// Gets data request.
public BacktestingDataRequest DataRequest {get;}
}
/// Represents a backtesting data source.
public interface BacktestingDataSource
{
/// Clears cached price data of current data source if not being used.
bool ClearCache();
/// Gets unique name of backtesting data source.
string Name {get;}
/// Gets / sets if current backtesting data source can be used only for owner plugin custom TimeFrames or for both owner plugin custom TimeFrames and built-in TimeFrames. If True current source will only appear if backtesting TimeFrame is owner plugin created custom TimeFrame.
bool SupportOnlyOwnCustomTimeFrames {get; set;}
}
/// Specifies the different data types for backtesting data source.
public enum BacktestingDataSourceDataType
{
/// Tick data type.
Tick,
/// Minute OHLCV open prices.
M1OpenPrices,
/// TimeFrame OHLCV open prices.
OpenPrices,
}
/// Provides data for the backtesting data source min / max time handler.
public class BacktestingDataSourceMinMaxTimeArgs
{
/// Gets data type for the min / max time request.
public BacktestingDataSourceDataType DataType {get;}
/// Gets price data source Id for the min / max time request.
public PriceDataSourceId PriceDataSourceId {get;}
}
/// Represents options of a backtesting data source, used for creating new data source.
public class BacktestingDataSourceOptions
{
/// Represents options of a backtesting data source, used for creating new data source.
public BacktestingDataSourceOptions(BacktestingDataSourceDataType SupportedDataTypes, Func MinMaxTimeHandler, Action DataRequestHandler);
public BacktestingDataSourceOptions(BacktestingDataSourceOptions original);
/// Handler function for handling data requests.
public Action DataRequestHandler {get; set;}
/// Handler function for getting minimum and maximum time.
public Func MinMaxTimeHandler {get; set;}
/// Supported data types (ex: BacktestingDataSourceDateType.Tick | BacktestingDataSourceDateType.M1OpenPrices)
public BacktestingDataSourceDataType SupportedDataTypes {get; set;}
}
/// Provides access to backtesting data sources.
public interface BacktestingDataSources
{
/// Adds a new backtesting data source.
BacktestingDataSource Add(string name, BacktestingDataSourceOptions options);
/// Removes a previously added backtesting data source.
bool Remove(BacktestingDataSource dataSource);
/// Removes all previously added backtesting data sources that are not being used.
void RemoveAllUnused();
}
/// Specifies the error that stopped a backtesting process, None if there was no error.
public enum BacktestingError
{
/// %DOCUMENTATION%
None,
/// %DOCUMENTATION%
Other,
/// %DOCUMENTATION%
Net4IsNotSupported,
/// %DOCUMENTATION%
NoConnection,
/// %DOCUMENTATION%
NoHistoricalData,
/// %DOCUMENTATION%
NotSupported,
/// %DOCUMENTATION%
InvalidSettings,
}
/// Represents minimum and maximum time of available data for a TimeFrame Symbol on a back testing data source.
public sealed struct BacktestingMinMaxTime : ValueType
{
/// Represents minimum and maximum time of available data for a TimeFrame Symbol on a back testing data source.
public BacktestingMinMaxTime(DateTime MinTime, DateTime MaxTime);
/// Maximum Time
public DateTime MaxTime {get; set;}
/// Minimum Time
public DateTime MinTime {get; set;}
}
/// Represents a backtesting process with methods and properties to monitor its status and results.
public interface BacktestingProcess
{
/// Terminates the backtesting process.
void Terminate();
/// Gets the error information if the backtesting process failed.
BacktestingError BacktestingError {get;}
/// Gets the HTML report of the backtesting results. Returns null if the backtesting is not finished or an error occurred.
string HtmlReport {get;}
/// Gets a value indicating whether the backtesting process is completed.
bool IsCompleted {get;}
/// Gets the JSON report of the backtesting results. Returns null if the backtesting is not finished or an error occurred.
string JsonReport {get;}
/// Gets the Monte Carlo simulation result as JSON, which is the same snapshot that is written to the output file of the MonteCarlo settings. Returns null when no Monte Carlo simulation was configured, when the backtesting is not finished, when the backtest produced no trades, or when an error occurred.
string MonteCarloJsonReport {get;}
/// Occurs when the backtesting process is completed.
event Action Completed;
/// Occurs when the backtesting progress changes.
event Action ProgressChanged;
}
/// Provides data for the backtesting progress changed event.
public class BacktestingProgressChangedEventArgs
{
/// Gets the description of the current operation.
public string Operation {get;}
/// Gets the backtesting process that reported progress.
public BacktestingProcess Process {get;}
/// Gets the progress percentage of the backtesting process.
public double Progress {get;}
}
/// Represents settings for configuring the backtesting process.
public class BacktestingSettings
{
/// Represents settings for configuring the backtesting process.
public BacktestingSettings();
/// Gets or sets a value that indicates whether the commission type and value of the backtested symbol are applied automatically. When it is set to true the Commission and CommissionType properties are ignored. The default value is false.
public bool ApplyCommissionAutomatically {get; set;}
/// Gets or sets the initial balance for the backtesting.
public double Balance {get; set;}
/// Gets or sets the commission value, it is interpreted based on the CommissionType property value. It is ignored when ApplyCommissionAutomatically is set to true. The default value is 0.
public double Commission {get; set;}
/// Gets or sets the commission type that defines how the Commission property value is interpreted. It is ignored when ApplyCommissionAutomatically is set to true. The default value is SymbolCommissionType.UsdPerMillionUsdVolume.
public SymbolCommissionType CommissionType {get; set;}
/// Gets or sets the path to the data file used for backtesting.
public string DataFile {get; set;}
/// Gets or sets the data mode used for backtesting.
public BacktestingDataMode DataMode {get; set;}
/// Gets or sets the end time in UTC for the backtesting period.
public DateTime EndTimeUtc {get; set;}
/// Gets or sets the optional Monte Carlo simulation that runs on the completed backtest. When it is null, the default, no Monte Carlo simulation is performed and the backtest behaves exactly as before. When it is set, the simulation runs on the completed backtest and its result is written to the configured output file.
public MonteCarloSettings MonteCarlo {get; set;}
/// Gets or sets a value indicating whether historical data for additional symbols is downloaded to convert profit and margin into the account deposit currency precisely. When true, real historical exchange rates of the additional symbols are used; when false, the default, approximated rates are used. Enabling it can increase the run time and the amount of downloaded data.
public bool PreciseConversion {get; set;}
/// Gets or sets the spread in pips.
public double SpreadPips {get; set;}
/// Gets or sets the start time in UTC for the backtesting period.
public DateTime StartTimeUtc {get; set;}
[Obsolete("Use Commission with CommissionType instead")]
public double CommissionUsdPerMillionUsd {get; set;}
}
/// Represents a tick, used for backtesting data source tick data.
public sealed struct BacktestingTick : ValueType
{
/// Represents a tick, used for backtesting data source tick data.
public BacktestingTick(DateTime Time, double Bid, double Ask);
/// Ask Price
public double Ask {get; set;}
/// Bid Price
public double Bid {get; set;}
/// Timestamp
public DateTime Time {get; set;}
}
/// Represents a collection of backtesting tick data.
public class BacktestingTickData
{
/// Creates a new instance of BacktestingTickData with passed data.
public BacktestingTickData(IEnumerable data);
}
/// Represents the Bar object.
public sealed struct Bar : ValueType
{
/// Gets the Close price.
public double Close {get;}
/// Gets the High price.
public double High {get;}
/// Gets the Low price.
public double Low {get;}
/// Gets the open price.
public double Open {get;}
/// Gets the bar open time.
public DateTime OpenTime {get;}
/// Gets the Tick volume.
public long TickVolume {get;}
}
/// Provides data for the event when a bar closed on the chart.
public class BarClosedEventArgs
{
/// Gets the bar data.
public Bars Bars {get;}
}
/// Provides data for the event when a new bar opened on the chart.
public class BarOpenedEventArgs
{
/// Gets the bar data.
public Bars Bars {get;}
}
/// This attribute is used for marking an indicator IndicatorBars property as a bar Output.
public sealed class BarOutputAttribute : Attribute
{
/// Initializes a new instance of the BarOutputAttribute and sets the name.
public BarOutputAttribute(string name);
/// Gets or sets the color of the area chart.
public string AreaChartFillColor {get; set;}
/// Gets or sets the color of the bear candle fill.
public string BearFillColor {get; set;}
/// Gets or sets the color of the bear candle or bar outline.
public string BearOutlineColor {get; set;}
/// Gets or sets the color of the bull candle fill.
public string BullFillColor {get; set;}
/// Gets or sets the color of the bull candle or bar outline.
public string BullOutlineColor {get; set;}
/// Gets or sets the type of the chart - Bar, Candlesticks, Line or Dots chart.
public ChartType ChartType {get; set;}
/// Gets or sets description for output that will be shown in UI.
public string Description {get; set;}
/// Gets or sets the color of the dot chart.
public string DotChartColor {get; set;}
/// Gets or sets if Output line color is customizable or not.
public bool IsColorCustomizable {get; set;}
/// Gets or sets if output last value should be visible or not in instance title (default: true).
public bool IsLastValueVisibleInTitle {get; set;}
/// Gets or sets default visibility of output.
public bool IsVisible {get; set;}
/// The output name
public string Name {get;}
/// Gets or sets the color of the tick volume bars.
public string TickVolumeColor {get; set;}
}
/// Represents the Bars interface - the collection of Bar objects.
public interface Bars
{
/// Returns a data series from current Bars based on the passed StandardSeriesType.
DataSeries GetSeries(StandardSeriesType standardSeriesType);
/// Returns the first available server bar open time.
DateTime GetServerFirstBarOpenTime();
/// Gets the bar from the end of the collection.
Bar Last(int index);
/// Loads more historical bars. Method returns the number of loaded bars that were added to the beginning of the collection.
int LoadMoreHistory();
/// Loads more historical bars asynchronously.
void LoadMoreHistoryAsync();
/// Loads more historical bars asynchronously.
void LoadMoreHistoryAsync(Action callback);
/// Gets the average prices data (Open + High + Low + Close) / 4.
DataSeries AveragePrices {get;}
/// Gets the Close price bars data.
DataSeries ClosePrices {get;}
/// Gets the number of bars.
int Count {get;}
/// Gets the High price bars data.
DataSeries HighPrices {get;}
/// Returns a bar based on it is index
Bar Item {get;}
/// Gets the last bar in the chart.
Bar LastBar {get;}
/// Gets the Low price bars data.
DataSeries LowPrices {get;}
/// Gets the Median prices data (High + Low) / 2.
DataSeries MedianPrices {get;}
/// Gets the Open price bars data.
DataSeries OpenPrices {get;}
/// Gets the open bar time data.
TimeSeries OpenTimes {get;}
/// Gets the symbol name.
string SymbolName {get;}
/// Gets the Tick volumes data.
DataSeries TickVolumes {get;}
/// Get the timeframe.
TimeFrame TimeFrame {get;}
/// Gets the Typical prices data (High + Low + Close) / 3.
DataSeries TypicalPrices {get;}
/// Gets the Weighted prices data (High + Low + 2 * Close) / 4.
DataSeries WeightedPrices {get;}
/// Occurs when a new bar is opened; the event is called for the previous (closed) bar.
event Action BarClosed;
/// Occurs when the last bar is closed and a new bar is opened.
event Action BarOpened;
/// Occurs when more history is loaded due to chart scroll on the left or due to API call.
event Action HistoryLoaded;
/// Occurs when bars are refreshed due to reconnect.
event Action Reloaded;
/// Occurs when a new Tick arrives.
event Action Tick;
/// Returns a data series from current Bars based on passed PriceType.
[Obsolete("Use GetSeries(StandardSeriesType) instead.")]
DataSeries GetPrices(PriceType priceType);
}
/// Provides data for the history loaded event.
public class BarsHistoryLoadedEventArgs
{
/// Gets the bar objects data.
public Bars Bars {get;}
/// Gets the number of bars.
public int Count {get;}
}
/// Provides data for the tick bar event.
public class BarsTickEventArgs
{
/// Gets the Bar objects data.
public Bars Bars {get;}
/// Defines if current tick is the first tick of a new bar.
public bool IsBarOpened {get;}
}
/// Represents the border.
public class Border : ControlBase
{
/// Initializes a new instance of the Border class.
public Border();
/// Gets or sets the color of the border background. Check the Color class for the ARGB (alpha, red, green, blue) color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".
public Color BackgroundColor {get; set;}
/// Gets or sets the border line color. Check the Color class for the ARGB (alpha, red, green, blue) color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".
public Color BorderColor {get; set;}
/// Gets or sets the border thickness. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".
public Thickness BorderThickness {get; set;}
/// Gets or sets the border child object.
public ControlBase Child {get; set;}
/// Gets or sets the border corner radius. Property value can be set using CornerRadius, number, or a string: new CornerRadius(5), new CornerRadius(1, 2, 3, 4).
public CornerRadius CornerRadius {get; set;}
/// Gets or sets the border padding thickness. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".
public Thickness Padding {get; set;}
}
/// Represents the button.
public class Button : Control
{
/// Initializes a new instance of the Button class.
public Button();
/// Gets or sets the border line color. Check the Color class for the ARGB (alpha, red, green, blue) color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".
public Color BorderColor {get; set;}
/// Gets or sets the border thickness.
public Thickness BorderThickness {get; set;}
/// Gets or sets the content.
public ControlBase Content {get; set;}
/// Gets or sets the border corner radius. Property value can be set using CornerRadius, number, or a string: new CornerRadius(5), new CornerRadius(1, 2, 3, 4).
public CornerRadius CornerRadius {get; set;}
/// Gets or sets the text.
public string Text {get; set;}
/// Occurs when the button is clicked.
public event Action Click;
}
/// Represents the button click event data.
public class ButtonClickEventArgs
{
/// Gets the button data.
public Button Button {get;}
}
/// Defines an area to position child elements by coordinates relative to the Canvas area.
public class Canvas : Panel
{
/// Initializes a new instance of the Canvas class.
public Canvas();
}
/// Specifies the case of characters typed manually into a TextBox control.
public enum CharacterCasing
{
/// Characters typed into a TextBox are not converted.
Normal,
/// Characters typed into a TextBox are converted to lowercase.
Lower,
/// Characters typed into a TextBox are converted to uppercase.
Upper,
}
/// Represents the Chart Interface.
public interface Chart
{
/// Adds an hotkey to the chart that will call the handler when pressed
bool AddHotkey(Action hotkeyHandler, Key key, ModifierKeys modifiers);
/// Adds an hotkey to the chart that will call the handler when pressed
bool AddHotkey(Action hotkeyHandler, string hotkey);
/// Adds an hotkey to the chart that will call the handler when pressed
bool AddHotkey(Action hotkeyHandler, Key key, ModifierKeys modifiers);
/// Adds an hotkey to the chart that will call the handler when pressed
bool AddHotkey(Action hotkeyHandler, string hotkey);
/// Draws a risk reward.
ChartRiskReward DrawRiskReward(string name, int barIndex1, int barIndex2, double entryPrice, OrderType orderType, TradeType tradeType, ChartRiskRewardType type);
/// Draws a risk reward.
ChartRiskReward DrawRiskReward(string name, DateTime time1, DateTime time2, double entryPrice, OrderType orderType, TradeType tradeType, ChartRiskRewardType type);
/// Resets the color of the bar to the default.
void ResetBarColor(long barIndex);
/// Resets the colors of all the bars.
void ResetBarColors();
/// Resets the color of the tick volume line to the default at the specified bar index.
void ResetTickVolumeColor(long barIndex);
/// Resets the color of all the tick volume bars.
void ResetTickVolumeColors();
/// Scrolls the chart by the X-axis for the specified number of bars.
void ScrollXBy(int bars);
/// Scrolls the chart by the X-axis to the bar with the specified index.
void ScrollXTo(int barIndex);
/// Scrolls the chart by the X-axis to the specified date time.
void ScrollXTo(DateTime time);
/// Sets the color of the bar at the specified bar index. It will change the bar fill color and the outline color.
void SetBarColor(long barIndex, Color color);
/// Sets the fill color of the bar at the specified bar index.
void SetBarFillColor(long barIndex, Color color);
/// Sets the outline color of the bar at the specified bar index.
void SetBarOutlineColor(long barIndex, Color color);
/// Sets the color of tick volume line at the specified bar index.
void SetTickVolumeColor(long barIndex, Color color);
/// Takes a chartshot from the chart that indicator / cBot runs on.
byte[] TakeChartshot();
/// Changes the time frame on the chart.
bool TryChangeTimeFrame(TimeFrame timeFrame);
/// Changes the time frame and the symbol on the chart.
bool TryChangeTimeFrameAndSymbol(TimeFrame timeFrame, string symbolName);
/// Gets the chart Bar objects.
Bars Bars {get;}
/// Gets the total number of the bars on the chart.
int BarsTotal {get;}
/// Gets or sets the type of the chart - Bar, Candlesticks, Line or Dots chart.
ChartType ChartType {get; set;}
/// Gets the chart color settings.
ChartColorSettings ColorSettings {get;}
/// Gets the chart display settings.
ChartDisplaySettings DisplaySettings {get;}
/// Gets the index of the first visible bar on the chart.
int FirstVisibleBarIndex {get;}
/// Gets the unique Id of Chart.
Guid Id {get;}
/// Gets the read only list of the indicator areas.
IReadonlyList IndicatorAreas {get;}
/// Gets the ChartIndicators operating on a chart.
ChartIndicators Indicators {get;}
/// True if Chart is active otherwise False
bool IsActive {get;}
/// Gets or sets the value indicating whether the price scale of the chart main area is inverted, so the higher prices are displayed lower. BottomY is still the lowest visible price and TopY the highest. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.
bool IsPriceScaleInverted {get; set;}
/// Gets or sets the value indicating whether the price to bar ratio of the chart main area is locked. While locked, zooming keeps the same price distance per bar, the auto scale of the main area is disabled and the price scale mode is Regular. Locking switches Percent, IndexedTo100 and Logarithmic modes to Regular. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.
bool IsPriceToBarRatioLocked {get; set;}
/// Gets or sets the value indicating whether the auto scale of the chart main area fits only the bars, ignoring the overlay indicator outputs and the chart objects. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.
bool IsScalePriceChartOnly {get; set;}
/// Gets or sets the value indicating whether the scrolling is enabled or disabled for the chart. If disabled, then the chart is not affected by scrolling, dragging, scaling, or pressing any keyboard keys, but is still affected by resizing, zooming, and API calls for changing X or Y-axis positions on the chart.
bool IsScrollingEnabled {get; set;}
/// True if Chart is visible otherwise False.
bool IsVisible {get;}
/// Gets the index of the last visible bar on the chart.
int LastVisibleBarIndex {get;}
/// Gets or sets the maximum width of a single bar (the candle body) in pixels. When the chart is zoomed in, the bar body is never drawn wider than this value and the extra horizontal space is added to the gap between the bars. This is useful for footprint-style rendering where additional text must fit next to each bar.
int MaxBarWidth {get; set;}
/// Gets the maximum number of the visible bars on the chart.
int MaxVisibleBars {get;}
/// Gets or sets the side of the chart where the price axis of the main area and of all the indicator areas is displayed. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.
ChartPriceAxisPosition PriceAxisPosition {get; set;}
/// Gets the base price used by the Percent and IndexedTo100 price scale modes, which is the close price of the first visible bar. Returns NaN in the Regular and Logarithmic modes, and in the silent backtesting, the CLI and the cloud.
double PriceScaleBasePrice {get;}
/// Gets or sets the price scale mode of the chart main area. Percent and IndexedTo100 enable the auto scale of the main area. While the price to bar ratio is locked only Regular can be set, and setting any other mode is ignored. Logarithmic works for every price, zero and negative prices are drawn on a logarithmic scale mirrored below zero. The Y-axis values used by the API stay in price units in every mode. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.
ChartPriceScaleMode PriceScaleMode {get; set;}
/// Gets or sets the price to bar ratio of the chart main area: the price distance displayed per one bar width. Used while the price to bar ratio is locked. Values that are not greater than zero, NaN or infinite are ignored. Setting this value does not lock the ratio.
double PriceToBarRatio {get; set;}
/// Gets the ChartRobots operating on a chart.
ChartRobots Robots {get;}
/// Gets the chart symbol.
Symbol Symbol {get;}
/// Gets the symbol name.
string SymbolName {get;}
/// Gets the time frame of the chart from 1 minute to 1 month.
TimeFrame TimeFrame {get;}
/// Gets or sets the zoom percent values. Valid values are from 5 to 500 with a step of 5, as can be seen on UI in the charts Zoom control.
int ZoomLevel {get; set;}
/// Occurs when chart is activated
event Action Activated;
/// Occurs when the chart type changes.
event Action ChartTypeChanged;
/// Occurs when the chart color settings change.
event Action ColorsChanged;
/// Occurs when chart is deactivated
event Action Deactivated;
/// Occurs when one or several charts display settings change.
event Action DisplaySettingsChanged;
/// Occurs when the indicator area is added.
event Action IndicatorAreaAdded;
/// Occurs when the indicator area is removed.
event Action IndicatorAreaRemoved;
/// Occurs when a keyboard key pressed while the mouse cursor is over the chart
event Action KeyDown;
/// Occurs when chart visibility changes.
event Action VisibilityChanged;
/// Occurs when the chart zoom options change.
event Action ZoomChanged;
[Obsolete("Use ZoomLevel instead")]
int Zoom {get; set;}
[Obsolete("Use Bars instead")]
MarketSeries MarketSeries {get;}
}
/// Provides data for chart activated/deactivated events
public class ChartActivationChangedEventArgs
{
/// The chart that event belongs to
public Chart Chart {get;}
}
/// Represents the Andrew's Pitchfork chart object. A tool that helps to identify possible support and resistance levels with the three parallel lines.
public interface ChartAndrewsPitchfork
{
/// Calculates Y-axis value corresponding the specified bar index.
double CalculateY(int barIndex);
/// Calculates Y-axis value corresponding the specified time value.
double CalculateY(DateTime time);
/// Gets or sets the chart object lines color.
Color Color {get; set;}
/// Gets or sets the chart object lines style.
LineStyle LineStyle {get; set;}
/// Gets or sets the chart object lines thickness.
int Thickness {get; set;}
/// Gets or sets the time value for the Andrew's Pitchfork point 1.
DateTime Time1 {get; set;}
/// Gets or sets the time value for the Andrew's Pitchfork point 2.
DateTime Time2 {get; set;}
/// Gets or sets the time value for the Andrew's Pitchfork point 3.
DateTime Time3 {get; set;}
/// Gets or sets the Y-axis value for the Andrew's Pitchfork point 1.
double Y1 {get; set;}
/// Gets or sets the Y-axis value for the Andrew's Pitchfork point 2.
double Y2 {get; set;}
/// Gets or sets the Y-axis value for the Andrew's Pitchfork point 3.
double Y3 {get; set;}
}
/// The Chart Area Interface.
public interface ChartArea
{
/// Adds a chart control from the Control Base to the main chart area or to the indicator area.
void AddControl(ControlBase control);
/// Adds a chart control to chart / indicator area on absolute bar index and price (x,y) coordinates.
void AddControl(ControlBase control, int barIndex, double y);
/// Adds a chart control to chart / indicator area on absolute time and price (x,y) coordinates.
void AddControl(ControlBase control, DateTime time, double y);
/// Adds a chart control to chart / indicator area on absolute time (x) coordinate.
void AddControl(ControlBase control, DateTime time);
/// Adds a chart control to chart / indicator area on absolute bar index (x) coordinate.
void AddControl(ControlBase control, int barIndex);
/// Adds a chart control to chart / indicator area on absolute price (y) coordinate.
void AddControl(ControlBase control, double y);
/// Converts Bar Index to X coordinate.
double BarIndexToX(double barIndex);
/// Draws an Andrew's pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color);
/// Draws an Andrew's pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness);
/// Draws an Andrew's pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness, LineStyle lineStyle);
/// Draws an Andrew's pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color);
/// Draws an Andrews pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness);
/// Draws an Andrew's pitchfork.
ChartAndrewsPitchfork DrawAndrewsPitchfork(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness, LineStyle lineStyle);
/// Draws an arrow.
ChartArrow DrawArrow(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws an arrow.
ChartArrow DrawArrow(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws an arrow.
ChartArrow DrawArrow(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws an arrow.
ChartArrow DrawArrow(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws an arrow.
ChartArrow DrawArrow(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws an arrow.
ChartArrow DrawArrow(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws an Elliott Correction Wave (A-B-C).
ChartElliottCorrection DrawElliottCorrection(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, Color color);
/// Draws an Elliott Correction Wave (A-B-C).
ChartElliottCorrection DrawElliottCorrection(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, Color color, int thickness);
/// Draws an Elliott Correction Wave (A-B-C).
ChartElliottCorrection DrawElliottCorrection(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, Color color, int thickness, LineStyle lineStyle);
/// Draws an Elliott Double Combo Wave (W-X-Y).
ChartElliottDoubleCombo DrawElliottDoubleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX, ChartPoint waveY, Color color);
/// Draws an Elliott Double Combo Wave (W-X-Y).
ChartElliottDoubleCombo DrawElliottDoubleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX, ChartPoint waveY, Color color, int thickness);
/// Draws an Elliott Double Combo Wave (W-X-Y).
ChartElliottDoubleCombo DrawElliottDoubleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX, ChartPoint waveY, Color color, int thickness, LineStyle lineStyle);
/// Draws an Elliott Impulse Wave (1-2-3-4-5).
ChartElliottImpulse DrawElliottImpulse(string name, ChartPoint origin, ChartPoint wave1, ChartPoint wave2, ChartPoint wave3, ChartPoint wave4, ChartPoint wave5, Color color);
/// Draws an Elliott Impulse Wave (1-2-3-4-5).
ChartElliottImpulse DrawElliottImpulse(string name, ChartPoint origin, ChartPoint wave1, ChartPoint wave2, ChartPoint wave3, ChartPoint wave4, ChartPoint wave5, Color color, int thickness);
/// Draws an Elliott Impulse Wave (1-2-3-4-5).
ChartElliottImpulse DrawElliottImpulse(string name, ChartPoint origin, ChartPoint wave1, ChartPoint wave2, ChartPoint wave3, ChartPoint wave4, ChartPoint wave5, Color color, int thickness, LineStyle lineStyle);
/// Draws an Elliott Triangle Wave (A-B-C-D-E).
ChartElliottTriangle DrawElliottTriangle(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, ChartPoint waveD, ChartPoint waveE, Color color);
/// Draws an Elliott Triangle Wave (A-B-C-D-E).
ChartElliottTriangle DrawElliottTriangle(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, ChartPoint waveD, ChartPoint waveE, Color color, int thickness);
/// Draws an Elliott Triangle Wave (A-B-C-D-E).
ChartElliottTriangle DrawElliottTriangle(string name, ChartPoint origin, ChartPoint waveA, ChartPoint waveB, ChartPoint waveC, ChartPoint waveD, ChartPoint waveE, Color color, int thickness, LineStyle lineStyle);
/// Draws an Elliott Triple Combo Wave (W-X-Y-X-Z).
ChartElliottTripleCombo DrawElliottTripleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX1, ChartPoint waveY, ChartPoint waveX2, ChartPoint waveZ, Color color);
/// Draws an Elliott Triple Combo Wave (W-X-Y-X-Z).
ChartElliottTripleCombo DrawElliottTripleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX1, ChartPoint waveY, ChartPoint waveX2, ChartPoint waveZ, Color color, int thickness);
/// Draws an Elliott Triple Combo Wave (W-X-Y-X-Z).
ChartElliottTripleCombo DrawElliottTripleCombo(string name, ChartPoint origin, ChartPoint waveW, ChartPoint waveX1, ChartPoint waveY, ChartPoint waveX2, ChartPoint waveZ, Color color, int thickness, LineStyle lineStyle);
/// Draws an ellipse.
ChartEllipse DrawEllipse(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws an ellipse.
ChartEllipse DrawEllipse(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws an ellipse.
ChartEllipse DrawEllipse(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws an ellipse.
ChartEllipse DrawEllipse(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws an ellipse.
ChartEllipse DrawEllipse(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws an ellipse.
ChartEllipse DrawEllipse(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws an equidistant channel.
ChartEquidistantChannel DrawEquidistantChannel(string name, DateTime time1, double y1, DateTime time2, double y2, double channelHeight, Color color);
/// Draws an equidistant channel.
ChartEquidistantChannel DrawEquidistantChannel(string name, DateTime time1, double y1, DateTime time2, double y2, double channelHeight, Color color, int thickness);
/// Draws an equidistant channel.
ChartEquidistantChannel DrawEquidistantChannel(string name, DateTime time1, double y1, DateTime time2, double y2, double channelHeight, Color color, int thickness, LineStyle lineStyle);
/// Draws an equidistant channel.
ChartEquidistantChannel DrawEquidistantChannel(string name, int barIndex1, double y1, int barIndex2, double y2, double channelHeight, Color color);
/// Draws an equidistant channel.
ChartEquidistantChannel DrawEquidistantChannel(string name, int barIndex1, double y1, int barIndex2, double y2, double channelHeight, Color color, int thickness);
/// Draws an equidistant channel.
ChartEquidistantChannel DrawEquidistantChannel(string name, int barIndex1, double y1, int barIndex2, double y2, double channelHeight, Color color, int thickness, LineStyle lineStyle);
/// Draws a Fibonacci arc.
ChartFibonacciArc DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws a Fibonacci arc.
ChartFibonacciArc DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws a Fibonacci arc.
ChartFibonacciArc DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Fibonacci arc.
ChartFibonacciArc DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws a Fibonacci arc.
ChartFibonacciArc DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws a Fibonacci arc.
ChartFibonacciArc DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Fibonacci expansion.
ChartFibonacciExpansion DrawFibonacciExpansion(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color);
/// Draws a Fibonacci expansion.
ChartFibonacciExpansion DrawFibonacciExpansion(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness);
/// Draws a Fibonacci expansion.
ChartFibonacciExpansion DrawFibonacciExpansion(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness, LineStyle lineStyle);
/// Draws a Fibonacci expansion.
ChartFibonacciExpansion DrawFibonacciExpansion(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color);
/// Draws a Fibonacci expansion.
ChartFibonacciExpansion DrawFibonacciExpansion(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness);
/// Draws a Fibonacci expansion.
ChartFibonacciExpansion DrawFibonacciExpansion(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness, LineStyle lineStyle);
/// Draws a Fibonacci fan.
ChartFibonacciFan DrawFibonacciFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws a Fibonacci fan.
ChartFibonacciFan DrawFibonacciFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws a Fibonacci fan.
ChartFibonacciFan DrawFibonacciFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Fibonacci fan.
ChartFibonacciFan DrawFibonacciFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws a Fibonacci fan.
ChartFibonacciFan DrawFibonacciFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws a Fibonacci fan.
ChartFibonacciFan DrawFibonacciFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Fibonacci retracement.
ChartFibonacciRetracement DrawFibonacciRetracement(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws a Fibonacci retracement.
ChartFibonacciRetracement DrawFibonacciRetracement(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws a Fibonacci retracement.
ChartFibonacciRetracement DrawFibonacciRetracement(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Fibonacci retracement.
ChartFibonacciRetracement DrawFibonacciRetracement(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws a Fibonacci retracement.
ChartFibonacciRetracement DrawFibonacciRetracement(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws a Fibonacci retracement.
ChartFibonacciRetracement DrawFibonacciRetracement(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Fibonacci timezones.
ChartFibonacciTimezones DrawFibonacciTimezones(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws a Fibonacci timezones.
ChartFibonacciTimezones DrawFibonacciTimezones(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws a Fibonacci timezones.
ChartFibonacciTimezones DrawFibonacciTimezones(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Fibonacci timezones.
ChartFibonacciTimezones DrawFibonacciTimezones(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws a Fibonacci timezones.
ChartFibonacciTimezones DrawFibonacciTimezones(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws a Fibonacci timezones.
ChartFibonacciTimezones DrawFibonacciTimezones(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Gann box.
ChartGannBox DrawGannBox(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws a Gann box.
ChartGannBox DrawGannBox(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws a Gann box.
ChartGannBox DrawGannBox(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Gann box.
ChartGannBox DrawGannBox(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws a Gann box.
ChartGannBox DrawGannBox(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws a Gann box.
ChartGannBox DrawGannBox(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Gann fan.
ChartGannFan DrawGannFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws a Gann fan.
ChartGannFan DrawGannFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws a Gann fan.
ChartGannFan DrawGannFan(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Gann fan.
ChartGannFan DrawGannFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws a Gann fan.
ChartGannFan DrawGannFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws a Gann fan.
ChartGannFan DrawGannFan(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Gann square.
ChartGannSquare DrawGannSquare(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws a Gann square.
ChartGannSquare DrawGannSquare(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws a Gann square.
ChartGannSquare DrawGannSquare(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Gann square.
ChartGannSquare DrawGannSquare(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws a Gann square.
ChartGannSquare DrawGannSquare(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws a Gann square.
ChartGannSquare DrawGannSquare(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Gann square fixed.
ChartGannSquareFixed DrawGannSquareFixed(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws a Gann square fixed.
ChartGannSquareFixed DrawGannSquareFixed(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws a Gann square fixed.
ChartGannSquareFixed DrawGannSquareFixed(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a Gann square fixed.
ChartGannSquareFixed DrawGannSquareFixed(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws a Gann square fixed.
ChartGannSquareFixed DrawGannSquareFixed(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws a Gann square fixed.
ChartGannSquareFixed DrawGannSquareFixed(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a horizontal line.
ChartHorizontalLine DrawHorizontalLine(string name, double y, Color color);
/// Draws a horizontal line.
ChartHorizontalLine DrawHorizontalLine(string name, double y, Color color, int thickness);
/// Draws a horizontal line.
ChartHorizontalLine DrawHorizontalLine(string name, double y, Color color, int thickness, LineStyle lineStyle);
/// Draws an icon.
ChartIcon DrawIcon(string name, ChartIconType iconType, DateTime time, double y, Color color);
/// Draws an icon.
ChartIcon DrawIcon(string name, ChartIconType iconType, int barIndex, double y, Color color);
/// Draws a rectangle.
ChartRectangle DrawRectangle(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws a rectangle.
ChartRectangle DrawRectangle(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws a rectangle.
ChartRectangle DrawRectangle(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a rectangle.
ChartRectangle DrawRectangle(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws a rectangle.
ChartRectangle DrawRectangle(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws a rectangle.
ChartRectangle DrawRectangle(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws the static text.
ChartStaticText DrawStaticText(string name, string text, VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment, Color color);
/// Draws the text.
ChartText DrawText(string name, string text, DateTime time, double y, Color color);
/// Draws the text.
ChartText DrawText(string name, string text, int barIndex, double y, Color color);
/// Draws a trend line.
ChartTrendLine DrawTrendLine(string name, DateTime time1, double y1, DateTime time2, double y2, Color color);
/// Draws a trend line.
ChartTrendLine DrawTrendLine(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness);
/// Draws a trend line.
ChartTrendLine DrawTrendLine(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a trend line.
ChartTrendLine DrawTrendLine(string name, int barIndex1, double y1, int barIndex2, double y2, Color color);
/// Draws a trend line.
ChartTrendLine DrawTrendLine(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness);
/// Draws a trend line.
ChartTrendLine DrawTrendLine(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle);
/// Draws a triangle.
ChartTriangle DrawTriangle(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color);
/// Draws a triangle.
ChartTriangle DrawTriangle(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness);
/// Draws a triangle.
ChartTriangle DrawTriangle(string name, DateTime time1, double y1, DateTime time2, double y2, DateTime time3, double y3, Color color, int thickness, LineStyle lineStyle);
/// Draws a triangle.
ChartTriangle DrawTriangle(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color);
/// Draws a triangle.
ChartTriangle DrawTriangle(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness);
/// Draws a triangle.
ChartTriangle DrawTriangle(string name, int barIndex1, double y1, int barIndex2, double y2, int barIndex3, double y3, Color color, int thickness, LineStyle lineStyle);
/// Draws a vertical line.
ChartVerticalLine DrawVerticalLine(string name, DateTime time, Color color);
/// Draws a vertical line.
ChartVerticalLine DrawVerticalLine(string name, DateTime time, Color color, int thickness);
/// Draws a vertical line.
ChartVerticalLine DrawVerticalLine(string name, DateTime time, Color color, int thickness, LineStyle lineStyle);
/// Draws a vertical line.
ChartVerticalLine DrawVerticalLine(string name, int barIndex, Color color);
/// Draws a vertical line.
ChartVerticalLine DrawVerticalLine(string name, int barIndex, Color color, int thickness);
/// Draws a vertical line.
ChartVerticalLine DrawVerticalLine(string name, int barIndex, Color color, int thickness, LineStyle lineStyle);
/// Finds all the chart objects of the specified type.
T[] FindAllObjects();
/// Finds all the chart objects of the specified type.
ChartObject[] FindAllObjects(ChartObjectType objectType);
/// Finds the chart object of the specified name.
ChartObject FindObject(string objectName);
/// Moves a chart control to chart / indicator area on absolute bar index and price (x,y) coordinates.
void MoveControl(ControlBase control, int barIndex, double y);
/// Moves a chart control to chart / indicator area on absolute time and price (x,y) coordinates.
void MoveControl(ControlBase control, DateTime time, double y);
/// Moves a chart control to chart / indicator area on absolute time (x) coordinate.
void MoveControl(ControlBase control, DateTime time);
/// Moves a chart control to chart / indicator area on absolute bar index (x) coordinate.
void MoveControl(ControlBase control, int barIndex);
/// Moves a chart control to chart / indicator area on absolute price (y) coordinate.
void MoveControl(ControlBase control, double y);
/// Removes all interactive and non-interactive objects available for the cBot or Indicator.
void RemoveAllObjects();
/// Remove a chart control from the chart area.
void RemoveControl(ControlBase control);
/// Removes the chart object of the specified name.
void RemoveObject(string objectName);
/// Resets the price scale of the chart area to its default state: enables the auto scale and fits the Y-axis range to the visible bars and outputs. Does not change the price scale mode, the inversion or the price axis position. Ignored on the main chart area while the price to bar ratio is locked. Does nothing in the silent backtesting, the CLI and the cloud.
void ResetPriceScale();
/// Sets the Y-axis lowest and highest values range. Allows scrolling the chart by the Y-axis. If only one of the values is set, then the chart will be expanded regarding the lowest or highest value respectively. A range whose lowest value is not lower than its highest value is ignored, and so is any range on the main chart area while the price scale mode is Percent or IndexedTo100.
void SetYRange(double bottomY, double topY);
/// Converts area Time coordinate to Mouse X coordinate value.
double TimeToX(DateTime time);
/// Converts X coordinate to bar index.
double XToBarIndex(double x);
/// Converts Mouse X coordinate to area Time coordinate value.
DateTime XToTime(double x);
/// Converts Mouse Y coordinate to area Y axis coordinate value.
double YToYValue(double y);
/// Converts Area Y axis coordinate value to mouse Y coordinate.
double YValueToY(double yValue);
/// Gets the lowest visible Y-axis value.
double BottomY {get;}
/// Gets chart area draggables.
ChartDraggables Draggables {get;}
/// Gets the hight of the chart area.
double Height {get;}
/// Checks whether the instance is still on the chart area.
bool IsAlive {get;}
/// Gets or sets the value indicating whether the auto scale is enabled for the chart area. When enabled, the Y-axis range is fitted automatically to the visible bars and outputs while the chart scrolls. Setting the Y-axis range with SetYRange, or dragging the price axis, disables the auto scale. On the main chart area the auto scale is always enabled while the price scale mode is Percent or IndexedTo100, and is always disabled while the price to bar ratio is locked; setting it to a conflicting value in these states is ignored. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.
bool IsAutoScaleEnabled {get; set;}
/// Gets the chart objects collection.
IReadonlyList Objects {get;}
/// Gets the list of currently selected objects if any.
IReadonlyList SelectedObjects {get;}
/// Gets the highest visible Y-axis value.
double TopY {get;}
/// Gets the width of the chart area.
double Width {get;}
/// Occurs when dragging a chart area.
event Action Drag;
/// Occurs when mouse button is released while dragging a chart area or a chart area loses mouse capture.
event Action DragEnd;
/// Occurs when MouseDown event is happening on a chart area and a mouse is captured for dragging.
event Action DragStart;
/// Occurs when the left mouse button is pressed down.
event Action MouseDown;
/// Occurs when the cursor hover over the chart area.
event Action MouseEnter;
/// Occurs when the cursor leaves the chart area
event Action MouseLeave;
/// Occurs when the cursor moves over the chart area.
event Action MouseMove;
/// Occurs when the left mouse button is released.
event Action MouseUp;
/// Occurs when the mouse wheel button is rotated.
event Action MouseWheel;
/// Occurs when the cursor hovers over or leaves the object.
event Action ObjectHoverChanged;
/// Occurs when one or several chart objects are added to the chart area.
event Action ObjectsAdded;
/// Occurs when one or several chart objects are moved.
event Action ObjectsMoveEnded;
/// Occurs when one or several chart objects move started.
event Action ObjectsMoveStarted;
/// Occurs when one or several chart objects are moving.
event Action ObjectsMoving;
/// Occurs when one or several chart object are removed from the chart area.
event Action ObjectsRemoved;
/// Occurs when chart objects are selected or deselected.
event Action ObjectsSelectionChanged;
/// Occurs when one or several chart objects are updated.
event Action ObjectsUpdated;
/// Occurs when the price scale state of the chart area changes: the auto scale is enabled or disabled, or the price scale is reset. On the main chart area it also occurs when any chart level price scale setting changes: the price scale mode, the inversion, the price to bar ratio lock or value, the scale price chart only option or the price axis position. Not raised in the silent backtesting, the CLI and the cloud.
event Action PriceScaleChanged;
/// Occurs when the X-axis position value or the Y-axis position value changes while scrolling.
event Action ScrollChanged;
/// Occurs when the chart area size has changed.
event Action SizeChanged;
[Obsolete("Use ObjectsAdded instead")]
event Action ObjectAdded;
[Obsolete("Use ObjectsUpdated instead")]
event Action ObjectUpdated;
[Obsolete("Use ObjectsRemoved instead")]
event Action ObjectRemoved;
[Obsolete("Use ObjectsSelectionChanged instead")]
event Action ObjectSelectionChanged;
}
/// Represents the arrow chart object.
public interface ChartArrow
{
/// Calculates Y-axis value corresponding the specified bar index.
double CalculateY(int barIndex);
/// Calculates Y-axis value corresponding the specified time value.
double CalculateY(DateTime time);
/// Gets or sets the color of the Trend Line.
Color Color {get; set;}
/// Defines if the Arrow extends to infinity.
bool ExtendToInfinity {get; set;}
/// Gets or sets the Arrow style.
LineStyle LineStyle {get; set;}
/// Defines the arrow angle.
bool ShowAngle {get; set;}
/// Gets or sets the thickness of the Arrow.
int Thickness {get; set;}
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the value 1 on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the value 2 on the Y-axis.
double Y2 {get; set;}
}
/// Provides data for the chart color event.
public class ChartColorEventArgs
{
/// Gets the chart.
public Chart Chart {get;}
}
/// Represents the charts Color Settings.
public interface ChartColorSettings
{
/// Gets or sets the color of area chart fill.
Color AreaFillColor {get; set;}
/// Gets or sets the color of the ask price line.
Color AskPriceLineColor {get; set;}
/// Gets or sets the color of the chart background.
Color BackgroundColor {get; set;}
/// Gets or sets the color of the bear candle fill.
Color BearFillColor {get; set;}
/// Gets or sets the color of the bear candle or bar outline.
Color BearOutlineColor {get; set;}
/// Gets or sets the color of the bid price line.
Color BidPriceLineColor {get; set;}
/// Gets or sets the color of the bull candle fill.
Color BullFillColor {get; set;}
/// Gets or sets the color of the bull candle or bar outline.
Color BullOutlineColor {get; set;}
/// Gets or sets the color of Buy positions and orders.
Color BuyColor {get; set;}
/// Gets or sets the color of the chart foreground.
Color ForegroundColor {get; set;}
/// Gets or sets the color of the grid lines.
Color GridLinesColor {get; set;}
/// Gets or sets the color of the losing deal.
Color LosingDealColor {get; set;}
/// Gets or sets the color of the period separator.
Color PeriodSeparatorColor {get; set;}
/// Gets or sets the color of Sell order positions and orders.
Color SellColor {get; set;}
/// Gets or sets the color of the tick volume.
Color TickVolumeColor {get; set;}
/// Gets or sets the color of the winning deal.
Color WinningDealColor {get; set;}
}
/// Represents a chart frames container.
public interface ChartContainer
{
/// Closes current chart container window.
bool Close();
/// Returns number of frames existing in chart container.
int Count {get;}
/// Returns detached window properties of chart container.
DetachedWindow DetachedWindow {get;}
/// Returns container Id.
string Id {get;}
/// Returns a frame by it is index inside chart container.
Frame Item {get;}
/// Get / set chart mode of chart container.
ChartMode Mode {get; set;}
/// Gets or sets the selected frame in the chart container.
Frame SelectedFrame {get; set;}
}
/// Represents the list of all the chart containers.
public interface ChartContainers
{
/// Returns a chart container by it is ID.
ChartContainer Get(string id);
/// Returns number of all chart containers.
int Count {get;}
/// Returns main chart container.
ChartContainer MainChartContainer {get;}
/// Occurs when new containers are added.
event Action ContainersAdded;
/// Occurs when containers are removed.
event Action ContainersRemoved;
}
/// Provides data for the containers added event.
public class ChartContainersAddedEventArgs
{
/// Returns the added containers.
public ChartContainer[] AddedChartContainers {get;}
}
/// Provides data for the containers removed event.
public class ChartContainersRemovedEventArgs
{
/// Returns the removed containers.
public ChartContainer[] RemovedChartContainers {get;}
}
/// Represents the chart display settings.
public interface ChartDisplaySettings
{
/// Defines if the Add cBot button is displayed on the chart.
bool AddRobotButton {get; set;}
/// Defines if the Ask Price Line is displayed on the chart.
bool AskPriceLine {get; set;}
/// Defines if the Bars is displayed on the chart.
bool Bars {get; set;}
/// Defines if the Bid Price Line is displayed on the chart.
bool BidPriceLine {get; set;}
/// Defines if the Chart Scale is displayed on the chart.
bool ChartScale {get; set;}
/// Defines if the Deal Map is displayed on the chart.
bool DealMap {get; set;}
/// Defines if the Grid is displayed on the chart background.
bool Grid {get; set;}
/// Defines if the Indicator Titles are displayed on the chart.
bool IndicatorTitles {get; set;}
/// Defines if the Market Sentiment is visible on the chart.
bool MarketSentiment {get; set;}
/// Defines if the Orders are displayed on the chart.
bool Orders {get; set;}
/// Defines if the Period Separators are displayed on the chart.
bool PeriodSeparators {get; set;}
/// Defines if the Positions are displayed on the chart.
bool Positions {get; set;}
/// Defines if the Price Alerts are visible on the chart.
bool PriceAlerts {get; set;}
/// Defines if the price axis overlays buttons are visible on the chart.
bool PriceAxisOverlayButtons {get; set;}
/// Defines if the QuickTrade buttons are visible on the chart.
bool QuickTradeButtons {get; set;}
/// Defines if the Target is visible on the chart.
bool Targets {get; set;}
/// Defines if the Tick Volume is displayed on the chart.
bool TickVolume {get; set;}
}
/// Provides data for the chart display settings event.
public class ChartDisplaySettingsEventArgs
{
/// Gets the chart.
public Chart Chart {get;}
}
/// Provides data for the chart dragging event.
public class ChartDragEventArgs : ChartMouseEventArgs
{
}
/// Represents a draggable box that can host a control and shown over a chart.
public interface ChartDraggable
{
/// Get / set the content control inside the draggable.
ControlBase Child {get; set;}
/// Get unique ID of the Draggable.
string Id {get;}
/// Get / set visibility of draggable.
bool IsVisible {get; set;}
/// Get / set move grip visibility (default: true).
bool ShowGrip {get; set;}
/// Get / set X coordinate (default: 0).
double X {get; set;}
/// Get / set Y coordinate (default: 0).
double Y {get; set;}
/// Occurs when the draggable's location is changed.
event Action LocationChanged;
}
/// Provides data for LocationChanged event of ChartDraggable.
public class ChartDraggableLocationChangedEventArgs
{
/// Gets the draggable.
public ChartDraggable Draggable {get;}
}
/// Represents collection of a chart area draggables.
public interface ChartDraggables
{
/// Adds a draggable to chart area.
ChartDraggable Add();
/// Removes a draggable from chart area.
void Remove(ChartDraggable draggable);
/// Gets count of draggables.
int Count {get;}
}
/// Represents the Drawing chart object.
public interface ChartDrawing
{
}
/// Represents the Elliott Correction Wave (A-B-C) chart object - a three-wave corrective pattern over four pivots (origin and A, B, C).
public interface ChartElliottCorrection
{
/// Gets or sets the origin (wave 0) anchor point.
ChartPoint Origin {get; set;}
/// Gets or sets the wave A anchor point.
ChartPoint WaveA {get; set;}
/// Gets or sets the wave B anchor point.
ChartPoint WaveB {get; set;}
/// Gets or sets the wave C anchor point.
ChartPoint WaveC {get; set;}
}
/// Represents the Elliott Double Combo Wave (W-X-Y) chart object - a complex correction over four pivots (origin and W, X, Y).
public interface ChartElliottDoubleCombo
{
/// Gets or sets the origin (wave 0) anchor point.
ChartPoint Origin {get; set;}
/// Gets or sets the wave W anchor point.
ChartPoint WaveW {get; set;}
/// Gets or sets the wave X anchor point.
ChartPoint WaveX {get; set;}
/// Gets or sets the wave Y anchor point.
ChartPoint WaveY {get; set;}
}
/// Represents the Elliott Impulse Wave (1-2-3-4-5) chart object - a five-wave motive pattern over six pivots (origin and 1 to 5).
public interface ChartElliottImpulse
{
/// Gets or sets the origin (wave 0) anchor point.
ChartPoint Origin {get; set;}
/// Gets or sets the wave 1 anchor point.
ChartPoint Wave1 {get; set;}
/// Gets or sets the wave 2 anchor point.
ChartPoint Wave2 {get; set;}
/// Gets or sets the wave 3 anchor point.
ChartPoint Wave3 {get; set;}
/// Gets or sets the wave 4 anchor point.
ChartPoint Wave4 {get; set;}
/// Gets or sets the wave 5 anchor point.
ChartPoint Wave5 {get; set;}
}
/// Represents the Elliott Triangle Wave (A-B-C-D-E) chart object - a five-leg triangle over six pivots (origin and A to E).
public interface ChartElliottTriangle
{
/// Gets or sets the origin (wave 0) anchor point.
ChartPoint Origin {get; set;}
/// Gets or sets the wave A anchor point.
ChartPoint WaveA {get; set;}
/// Gets or sets the wave B anchor point.
ChartPoint WaveB {get; set;}
/// Gets or sets the wave C anchor point.
ChartPoint WaveC {get; set;}
/// Gets or sets the wave D anchor point.
ChartPoint WaveD {get; set;}
/// Gets or sets the wave E anchor point.
ChartPoint WaveE {get; set;}
}
/// Represents the Elliott Triple Combo Wave (W-X-Y-X-Z) chart object - an extended complex correction over six pivots (origin and W, X, Y, X, Z). The two X legs are named X1 and X2.
public interface ChartElliottTripleCombo
{
/// Gets or sets the origin (wave 0) anchor point.
ChartPoint Origin {get; set;}
/// Gets or sets the wave W anchor point.
ChartPoint WaveW {get; set;}
/// Gets or sets the first wave X (X1) anchor point.
ChartPoint WaveX1 {get; set;}
/// Gets or sets the second wave X (X2) anchor point.
ChartPoint WaveX2 {get; set;}
/// Gets or sets the wave Y anchor point.
ChartPoint WaveY {get; set;}
/// Gets or sets the wave Z anchor point.
ChartPoint WaveZ {get; set;}
}
/// Represents the shared options of the Elliott Wave chart objects. An Elliott Wave is an ordered list of labelled pivots joined by a polyline; the wave degree drives the label notation.
public interface ChartElliottWaveBase
{
/// Gets or sets the chart object lines color.
Color Color {get; set;}
/// Gets or sets the wave degree that drives the label notation and default color.
ChartElliottWaveDegree Degree {get; set;}
/// Gets or sets the chart object lines style.
LineStyle LineStyle {get; set;}
/// Gets or sets a value indicating whether the wave labels are displayed. Default is true.
bool ShowLabels {get; set;}
/// Gets or sets the chart object lines thickness.
int Thickness {get; set;}
}
/// The Elliott Wave degree. Determines the wave-label notation (numerals, roman or letters and the enclosure style) and the default color of an Elliott Wave chart object.
public enum ChartElliottWaveDegree
{
/// The Grand Supercycle degree (largest).
GrandSupercycle,
/// The Supercycle degree.
Supercycle,
/// The Cycle degree.
Cycle,
/// The Primary degree.
Primary,
/// The Intermediate degree.
Intermediate,
/// The Minor degree (default).
Minor,
/// The Minute degree.
Minute,
/// The Minuette degree.
Minuette,
/// The Subminuette degree (smallest).
Subminuette,
}
/// Represent the Ellipse chart object.
public interface ChartEllipse
{
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the value 1 on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the value 2 on the Y-axis.
double Y2 {get; set;}
}
/// Represents the Equidistant Channel chart object. The tool that allows drawing two precisely parallel lines in any direction on the chart.
public interface ChartEquidistantChannel
{
/// Calculates Y-axis value corresponding the specified bar index.
double CalculateY(int barIndex);
/// Calculates Y-axis value corresponding the specified time value.
double CalculateY(DateTime time);
/// Gets or sets the height of the Equidistant Channel.
double ChannelHeight {get; set;}
/// Gets or sets the Equidistant Channel line color.
Color Color {get; set;}
/// Defines if the Equidistant channel extends to infinity.
bool ExtendToInfinity {get; set;}
/// Gets or sets the Equidistant channel line style.
LineStyle LineStyle {get; set;}
/// Gets or sets the Equidistant Channel angle.
bool ShowAngle {get; set;}
/// Gets or sets the Equidistant Channel line thickness.
int Thickness {get; set;}
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the value 1 on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the value 2 on the Y-axis.
double Y2 {get; set;}
}
/// Represents the Fibonacci Arc chart object.
public interface ChartFibonacciArc
{
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the value 1 on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the value 2 on the Y-axis.
double Y2 {get; set;}
}
/// Represents the Fibonacci tools options.
public interface ChartFibonacciBase
{
/// Gets or sets the lines color.
Color Color {get; set;}
/// Defines if the Fibonacci levels display the prices
bool DisplayPrices {get; set;}
/// Gets the Fibonacci levels.
IReadonlyList FibonacciLevels {get;}
/// Gets or sets the lines style.
LineStyle LineStyle {get; set;}
/// Gets or sets the lines thickness.
int Thickness {get; set;}
}
/// Represents the Fibonacci Expansion chart object.
public interface ChartFibonacciExpansion
{
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the value 3 on the Time line.
DateTime Time3 {get; set;}
/// Gets or sets the value 1 on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the value 2 on the Y-axis.
double Y2 {get; set;}
/// Gets or sets the value 3 on the Y-axis.
double Y3 {get; set;}
}
/// Represents the Fibonacci Fan chart object.
public interface ChartFibonacciFan
{
/// Calculates Y-axis value corresponding the specified bar index.
double CalculateY(int barIndex, FibonacciLevel level);
/// Calculates Y-axis value corresponding the specified time value.
double CalculateY(DateTime time, FibonacciLevel level);
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the value 1 on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the value 2 on the Y-axis.
double Y2 {get; set;}
}
/// Represents the Fibonacci Retracement chart object.
public interface ChartFibonacciRetracement
{
/// Calculates Y-axis value corresponding the specified bar index.
double CalculateY(int barIndex);
/// Calculates Y-axis value corresponding the specified time value.
double CalculateY(DateTime time);
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the value 1 on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the value 2 on the Y-axis.
double Y2 {get; set;}
}
/// Represents the Fibonacci Timezones chart object.
public interface ChartFibonacciTimezones
{
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the value 1 on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the value 2 on the Y-axis.
double Y2 {get; set;}
}
/// Represents a chart frame.
public interface ChartFrame
{
/// Changes the time frame on the chart.
bool TryChangeTimeFrame(TimeFrame timeFrame);
/// Changes the time frame and the symbol on the chart.
bool TryChangeTimeFrameAndSymbol(TimeFrame timeFrame, string symbolName);
/// Returns frame chart.
Chart Chart {get;}
/// Get / set linked group of frame.
LinkedChartGroup LinkedChartGroup {get; set;}
/// Get / set frame chart symbol.
Symbol Symbol {get; set;}
/// Get / set frame chart timeframe.
TimeFrame TimeFrame {get; set;}
/// Occurs when frame LinkedChartGroup is changed.
event Action LinkedChartGroupChanged;
}
/// Provides data for the chart frame LinkedChartGroup changed event.
public class ChartFrameLinkedChartGroupChangedEventArgs
{
/// Returns the chart frame.
public ChartFrame ChartFrame {get;}
}
/// Represents the Gann tools options.
public interface ChartGannBase
{
/// Gets or sets the lines color.
Color Color {get; set;}
/// Defines if the Gann levels display the prices
bool DisplayPrices {get; set;}
/// Gets the Gann levels.
IReadonlyList GannLevels {get;}
/// Gets or sets the lines style.
LineStyle LineStyle {get; set;}
/// Gets or sets the lines thickness.
int Thickness {get; set;}
/// Gets or sets the first point time value on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the second point time value on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the first point value on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the second point value on the Y-axis.
double Y2 {get; set;}
}
/// Represents the Gann Box chart object.
public interface ChartGannBox
{
}
/// Represents the Gann Fan chart object.
public interface ChartGannFan
{
/// Calculates Y-axis value corresponding the specified bar index.
double CalculateY(int barIndex, GannLevel level);
/// Calculates Y-axis value corresponding the specified time value.
double CalculateY(DateTime time, GannLevel level);
}
/// Represents the Gann Square chart object.
public interface ChartGannSquare
{
/// Calculates Y-axis value corresponding the specified bar index.
double CalculateY(int barIndex, GannLevel level);
/// Calculates Y-axis value corresponding the specified time value.
double CalculateY(DateTime time, GannLevel level);
}
/// Represents the Gann Square Fixed chart object with screen-space rendering.
public interface ChartGannSquareFixed
{
/// Calculates Y-axis value corresponding the specified bar index.
double CalculateY(int barIndex, GannLevel level);
/// Calculates Y-axis value corresponding the specified time value.
double CalculateY(DateTime time, GannLevel level);
}
/// Represents the Horizontal Line chart object. Used to mark a certain value on the Y-axis throughout the whole chart.
public interface ChartHorizontalLine
{
/// Gets or sets the line color.
Color Color {get; set;}
/// Gets or sets the line style.
LineStyle LineStyle {get; set;}
/// Gets or sets the line thickness.
int Thickness {get; set;}
/// Gets or sets the Y-axis value of the line location.
double Y {get; set;}
}
/// Represents the Icon chart object.
public interface ChartIcon
{
/// Gets or sets the color of the icon.
Color Color {get; set;}
/// Gets or sets the type of the icon.
ChartIconType IconType {get; set;}
/// Gets or sets the Time value of the icon location.
DateTime Time {get; set;}
/// Gets or sets the Y-axis value of the icon location.
double Y {get; set;}
}
/// Represents the type of the Icon.
public enum ChartIconType
{
/// The Up Arrow icon.
UpArrow,
/// The Down Arrow icon.
DownArrow,
/// The Circle icon.
Circle,
/// The Square icon.
Square,
/// The Diamond icon.
Diamond,
/// The Star icon.
Star,
/// The Up Triangle icon.
UpTriangle,
/// The Down Triangle icon.
DownTriangle,
}
/// The interface representing an indicator attached to a chart. Provides properties that allow for accessing various information about an indicator.
public interface ChartIndicator
{
/// Gets the IReadonlyList of indicator bar outputs.
IReadonlyList BarOutputs {get;}
/// Gets the ID of a specific indicator instance.
string InstanceId {get;}
/// Gets the IReadonlyList of indicator output lines.
IReadonlyList LineOutputs {get;}
/// Gets the name of an indicator.
string Name {get;}
/// Gets or sets the index of the panel on which an indicator is displayed.
int PanelIndex {get; set;}
/// Gets the collection of indicator parameters.
AlgoInstanceParameters Parameters {get;}
/// Gets the IndicatorType of an indicator.
IndicatorType Type {get;}
[Obsolete("Use LineOutputs instead")]
IReadonlyList Lines {get;}
}
/// The class representing AddedEventArgs for a ChildIndicator .
public class ChartIndicatorAddedEventArgs : ChartIndicatorEventArgs
{
}
/// The base class representing event args for a ChartIndicator .
public abstract class ChartIndicatorEventArgs
{
/// Gets the ChartIndicator that raised an event.
public ChartIndicator Indicator {get;}
}
/// The class representing ModifiedEventArgs for a ChartIndicator .
public class ChartIndicatorModifiedEventArgs : ChartIndicatorEventArgs
{
}
/// The class representing RemovedEventArgs for a ChartIndicator .
public class ChartIndicatorRemovedEventArgs : ChartIndicatorEventArgs
{
}
/// The interface representing a chart indicator instances collection. Provides properties and events that allow for accessing various information about indicators attached to a chart.
public interface ChartIndicators
{
/// Adds a new indicator to a chart.
ChartIndicator Add(string name, object[] parameterValues);
/// Adds a new indicator to a chart.
ChartIndicator Add(IndicatorType type, object[] parameterValues);
/// Removes an indicator from a chart.
bool Remove(ChartIndicator indicator);
/// Gets the number of all indicators attached to a chart.
int Count {get;}
/// Gets the list of chart custom indicators.
IReadonlyList Custom {get;}
/// Gets an indicator attached to a chart by its instance ID.
ChartIndicator Item {get;}
/// Gets the list of chart standard indicators.
IReadonlyList Standard {get;}
/// Occurs when a new indicator is added to a chart.
event Action IndicatorAdded;
/// Occurs when an indicator attached to a chart is modified.
event Action IndicatorModified;
/// Occurs when an indicator is removed from a chart.
event Action IndicatorRemoved;
}
/// Provides data for chart keyboard related events and callbacks
public class ChartKeyboardEventArgs
{
/// True if Alt key was pressed otherwise False
public bool AltKey {get;}
/// The chart that the event/callback occurred
public Chart Chart {get;}
/// True if Ctrl key was pressed otherwise False
public bool CtrlKey {get;}
/// Keyboard key
public Key Key {get;}
/// Modifiers key that was used with the Key
public ModifierKeys Modifiers {get;}
/// True if Shift key was pressed otherwise False
public bool ShiftKey {get;}
}
/// Represents the list of all the chart frames.
public interface ChartManager
{
/// Adds a new chart frame to main chart container.
ChartFrame AddChartFrame(string symbolName, TimeFrame timeFrame);
/// Adds a new chart frame to target chart container.
ChartFrame AddChartFrame(string symbolName, TimeFrame timeFrame, ChartContainer targetChartContainer);
/// Adds a new custom frame to main chart container.
CustomFrame AddCustomFrame(string title);
/// Adds a new custom frame to target chart container.
CustomFrame AddCustomFrame(string title, ChartContainer targetChartContainer);
/// Gets a chart frame by it is Id.
ChartFrame GetChartFrame(string frameId);
/// Gets a custom frame by it is Id.
CustomFrame GetCustomFrame(string frameId);
/// Removes a frame by it is Id.
bool RemoveFrame(string frameId);
/// Returns current active chart container if any otherwise null.
ChartContainer ActiveChartContainer {get;}
/// Returns current active frame if any otherwise null.
Frame ActiveFrame {get;}
/// Returns chart containers.
ChartContainers ChartContainers {get;}
/// Returns number of all frames.
int Count {get;}
/// Occurs when active frame is changed.
event Action ActiveFrameChanged;
/// Occurs when new frames are added.
event Action FramesAdded;
/// Occurs when frames are removed.
event Action FramesRemoved;
}
/// Represents the predefined chart container modes.
public enum ChartMode
{
/// Single chart mode.
Single,
/// Multiple chart mode.
Multi,
/// Free chart mode.
Free,
/// Floating chart mode.
Floating,
}
/// Provides data for the mouse related routed events.
public class ChartMouseEventArgs
{
/// Defines whether the Alt key is pressed during the mouse event.
public bool AltKey {get;}
/// Gets the exact bar index of the mouse event.
public double BarIndex {get;}
/// Gets the chart.
public Chart Chart {get;}
/// Gets the chart area.
public ChartArea ChartArea {get;}
/// Defines whether the Ctrl key is pressed during the mouse event.
public bool CtrlKey {get;}
/// Gets the X-axis value of the mouse event.
public double MouseX {get;}
/// Gets the Y-axis value of the mouse event.
public double MouseY {get;}
/// Defines whether the Shift key is pressed during the mouse event.
public bool ShiftKey {get;}
/// Gets the time value on the X-axis where the mouse event occurs.
public DateTime TimeValue {get;}
/// Gets the Y-axis value of the mouse event.
public double YValue {get;}
}
/// Provides data for the mouse wheel scroll event.
public class ChartMouseWheelEventArgs : ChartMouseEventArgs
{
/// Gets the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel.
public int Delta {get;}
}
/// Represents the chart object.
public interface ChartObject
{
/// Gets or sets the comment for the chart object.
string Comment {get; set;}
/// Defines if the chart object still exists on the chart.
bool IsAlive {get;}
/// Gets or sets if object is hidden and not visible to user or not.
bool IsHidden {get; set;}
/// Defines whether the instance is interactive. The non-interactive chart objects cannot be selected, have no hover effect and cannot be searched. Available only for the current cBot or Indicator and will be removed when the cBot/Indicator stops.
bool IsInteractive {get; set;}
/// Gets or sets if the object is locked or not, user can't move locked objects unless unlocked.
bool IsLocked {get; set;}
/// Gets the chart object name - the unique identifier for the object in the current chart area.
string Name {get;}
/// Gets the chart object type.
ChartObjectType ObjectType {get;}
/// Gets or sets the location of a chart object on the Z-axis in respect to the other chart objects.
int ZIndex {get; set;}
}
/// Provides data for the chart object change event.
public abstract class ChartObjectEventArgs
{
/// Gets the chart area.
public ChartArea Area {get;}
/// Gets the chart.
public Chart Chart {get;}
/// Gets the chart object.
public ChartObject ChartObject {get;}
}
/// Provides data for the mouse hover over a chart object event.
public class ChartObjectHoverChangedEventArgs : ChartObjectEventArgs
{
/// Defines if the mouse is hovered over the chart object.
public bool IsObjectHovered {get;}
}
/// The chart object types.
public enum ChartObjectType
{
/// The horizontal line. The line parallel to the X-axis that can be set on any Y-axis value.
HorizontalLine,
/// The vertical line. The line parallel to the Y-axis that can be set on any X-axis value. used to mark certain time event or chart bar on the chart.TBD
VerticalLine,
/// The trend line. The line with the start and end points that can be drawn in any direction on the chart.
TrendLine,
/// The text that can be placed directly in the chart, bound to X-Y axises.
Text,
/// The static positioned text that can be placed on fixed locations in the chart
StaticText,
/// The icon. The collection of icons that can be placed directly in the chart, bound to X-Y axises.
Icon,
/// The Fibonacci Retracement that can be placed directly in the chart, bound to X-Y axises. - a charting technique that uses the Fibonacci ratios to indicate the areas of support or resistance.
FibonacciRetracement,
/// The Fibonacci Expansion that can be placed directly in the chart, bound to X-Y axises. - a charting technique used to plot possible levels of support and resistance by tracking not only the primary trend but also the retracement.
FibonacciExpansion,
/// The Fibonacci Fan that can be placed directly in the chart, bound to X-Y axises. a charting technique used to estimate support and resistance levels by drawing the new trend lines based on the Fibonacci Retracement levels.
FibonacciFan,
/// The Andrews Pitchfork that can be placed directly in the chart, bound to X-Y axises.
AndrewsPitchfork,
/// The Gann Fan that can be placed directly in the chart, bound to X-Y axises. A charting technique used to estimate support and resistance levels by drawing trend lines at different Gann angles (1x1, 2x1, 1x2, etc.).
GannFan,
/// The Gann Box that can be placed directly in the chart, bound to X-Y axises. A charting technique that combines Gann angles with horizontal and vertical lines to create a box structure for analyzing support and resistance levels.
GannBox,
/// The Gann Square that can be placed directly in the chart, bound to X-Y axises. A charting technique that combines Gann box grid, fan rays from the start point, and arcs at level intersections for comprehensive market geometry analysis.
GannSquare,
/// The Gann Square Fixed that can be placed directly in the chart with fixed screen-space size. A charting technique with a single anchor point and control point that renders a 5x5 grid, Gann fan rays, and circular arcs independent of zoom level.
GannSquareFixed,
/// The rectangle of any preferable size and rotation that can be drawn directly in the chart, bound to X-Y axises.
Rectangle,
/// The ellipse of any preferable size and rotation that can be drawn directly in the chart, bound to X-Y axises.
Ellipse,
/// The triangle of any preferable size and rotation that can be drawn directly in the chart, bound to X-Y axises.
Triangle,
/// The equidistant channel that can be placed directly in the chart, bound to X-Y axises.
EquidistantChannel,
/// The user drawings in the chart with Pencil
Drawing,
/// The arrow line.
ArrowLine,
/// The Fibonacci Timezones
FibonacciTimezones,
/// The Risk Reward
RiskReward,
/// The Fibonacci Arc that can be placed directly in the chart, bound to X-Y axises. A charting technique using concentric arcs drawn at the Fibonacci levels off two anchor points to estimate support and resistance zones in both price and time.
FibonacciArc,
/// The Elliott Impulse Wave (1-2-3-4-5). A five-wave motive pattern drawn as a labelled polyline over six pivots.
ElliottImpulse,
/// The Elliott Correction Wave (A-B-C). A three-wave corrective pattern drawn as a labelled polyline over four pivots.
ElliottCorrection,
/// The Elliott Triangle Wave (A-B-C-D-E). A five-leg triangle drawn as a labelled polyline over six pivots.
ElliottTriangle,
/// The Elliott Double Combo Wave (W-X-Y). A complex correction drawn as a labelled polyline over four pivots.
ElliottDoubleCombo,
/// The Elliott Triple Combo Wave (W-X-Y-X-Z). An extended complex correction drawn as a labelled polyline over six pivots.
ElliottTripleCombo,
}
/// Provides data for the adding chart objects event.
public class ChartObjectsAddedEventArgs : ChartObjectsEventArgs
{
}
/// Provides data for the chart objects change event.
public abstract class ChartObjectsEventArgs
{
/// Gets the chart area.
public ChartArea Area {get;}
/// Gets the chart.
public Chart Chart {get;}
/// Gets chart objects.
public IReadonlyList ChartObjects {get;}
}
/// Provides data for the chart objects move ended event.
public class ChartObjectsMoveEndedEventArgs : ChartObjectsEventArgs
{
}
/// Provides data for the chart objects move started event.
public class ChartObjectsMoveStartedEventArgs : ChartObjectsEventArgs
{
}
/// Provides data for the chart objects moving event.
public class ChartObjectsMovingEventArgs : ChartObjectsEventArgs
{
}
/// Provides data for the removing chart objects event.
public class ChartObjectsRemovedEventArgs : ChartObjectsEventArgs
{
}
/// Provides data for the chart objects selecting or deselecting event.
public class ChartObjectsSelectionChangedEventArgs
{
/// A chart area where event occured
public ChartArea Area {get;}
/// A chart where event occured
public Chart Chart {get;}
/// A list of objects that were added to selection
public IReadonlyList ObjectsAddedToSelection {get;}
/// A list of objects that were removed from selection
public IReadonlyList ObjectsRemovedFromSelection {get;}
}
/// Provides data for the chart objects update event.
public class ChartObjectsUpdatedEventArgs : ChartObjectsEventArgs
{
}
/// Represents a single chart anchor point - a time value on the X-axis and a Y-axis value.
public sealed struct ChartPoint : ValueType
{
/// Represents a single chart anchor point - a time value on the X-axis and a Y-axis value.
public ChartPoint(DateTime Time, double Y);
/// The time value on the X-axis.
public DateTime Time {get; set;}
/// The Y-axis value.
public double Y {get; set;}
}
/// Represents the side of the chart where the price axis is displayed.
public enum ChartPriceAxisPosition
{
/// The price axis is displayed on the right side of the chart.
Right,
/// The price axis is displayed on the left side of the chart.
Left,
}
/// Provides data for the chart area price scale change event.
public class ChartPriceScaleEventArgs
{
/// Gets the chart.
public Chart Chart {get;}
/// Gets the chart area whose price scale changed. It is the chart itself for the main area.
public ChartArea ChartArea {get;}
}
/// Represents the price scale mode of the chart main area.
public enum ChartPriceScaleMode
{
/// The regular linear price scale. The Y axis shows prices.
Regular,
/// The percentage price scale. The Y axis shows the percentage change of the price from the base price, which is the close price of the first visible bar. Auto scale is always enabled in this mode.
Percent,
/// The indexed to 100 price scale. The Y axis shows the price as an index where the base price, the close price of the first visible bar, equals 100. Auto scale is always enabled in this mode.
IndexedTo100,
/// The logarithmic price scale. Equal vertical distances represent equal percentage changes of the price. Zero and negative prices are drawn on a logarithmic scale mirrored below zero.
Logarithmic,
}
/// Represents the Rectangle chart object. A rectangle of any preferable size and rotation that can be drawn directly in the chart, bound to X-Y axises.
public interface ChartRectangle
{
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the value 1 on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the value 2 on the Y-axis.
double Y2 {get; set;}
}
/// Represents the risk reward chart object.
public interface ChartRiskReward
{
/// Gets or sets the entry price.
double EntryPrice {get; set;}
/// Gets or sets if risk reward ratio is fixed or not.
bool IsFixedRatio {get; set;}
/// Gets or sets if order type is market range.
bool IsMarketRange {get; set;}
/// Gets or sets order limit range pips amount.
double LimitRangePips {get; set;}
/// Gets or sets order market range pips amount.
double MarketRangePips {get; set;}
/// Gets or sets the order type.
OrderType OrderType {get; set;}
/// Gets or sets the reward color.
Color RewardColor {get; set;}
/// Gets or sets the reward style.
LineStyle RewardLineStyle {get; set;}
/// Gets or sets the reward thickness.
int RewardThickness {get; set;}
/// Gets or sets the risk color.
Color RiskColor {get; set;}
/// Gets or sets the risk line style.
LineStyle RiskLineStyle {get; set;}
/// Gets or sets risk reward ratio.
double RiskRewardRatio {get; set;}
/// Gets or sets the risk line thickness.
int RiskThickness {get; set;}
/// Gets or sets the stop loss price.
double StopLossPrice {get; set;}
/// Gets or sets the take profit price.
double TakeProfitPrice {get; set;}
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the trade type.
TradeType TradeType {get; set;}
/// Gets or sets type.
ChartRiskRewardType Type {get; set;}
/// Gets or sets the volume (in units).
double VolumeInUnits {get; set;}
}
/// Represents different amount types for chart risk reward.
public enum ChartRiskRewardAmountType
{
/// Account currency amount.
Money,
/// Account balance percentage.
BalancePercentage,
/// Account equity percentage.
EquityPercentage,
}
/// Represents fixed reward type of chart risk reward.
public class ChartRiskRewardFixedRewardType
{
/// Creates an instance of ChartRiskRewardFixedRewardType.
public ChartRiskRewardFixedRewardType(ChartRiskRewardAmountType amountType, double amount);
public ChartRiskRewardFixedRewardType(ChartRiskRewardFixedRewardType original);
/// Gets or sets amount.
public double Amount {get;}
/// Gets or sets amount mode.
public ChartRiskRewardAmountType AmountType {get;}
}
/// Represents fixed risk type of chart risk reward.
public class ChartRiskRewardFixedRiskType
{
/// Creates an instance of ChartRiskRewardFixedRiskType.
public ChartRiskRewardFixedRiskType(ChartRiskRewardAmountType amountType, double amount);
public ChartRiskRewardFixedRiskType(ChartRiskRewardFixedRiskType original);
/// Gets or sets amount.
public double Amount {get;}
/// Gets or sets amount mode.
public ChartRiskRewardAmountType AmountType {get;}
}
/// Represents fixed size type of chart risk reward.
public class ChartRiskRewardFixedSizeType
{
/// Creates an instance of ChartRiskRewardFixedSizeType.
public ChartRiskRewardFixedSizeType(double volumeInUnits);
public ChartRiskRewardFixedSizeType(ChartRiskRewardFixedSizeType original);
/// Gets or sets volume (in units).
public double VolumeInUnits {get;}
}
/// Represents different types of chart risk reward.
public interface ChartRiskRewardType
{
}
/// The interface representing a Robot instance attached to a chart. Provides properties that allow for accessing various information about a Robot.
public interface ChartRobot
{
/// Starts the Robot instance.
void Start();
/// Stops the Robot instance.
void Stop();
/// Gets the ID of a specific Robot instance.
string InstanceId {get;}
/// Gets the name of a Robot instance.
string Name {get;}
/// Gets the collection of Robot parameters.
AlgoInstanceParameters Parameters {get;}
/// Gets the current state of a Robot instance.
RobotState State {get;}
/// Gets the RobotType of a Robot instance.
RobotType Type {get;}
}
/// The class representing AddedEventArgs for a ChartRobot .
public class ChartRobotAddedEventArgs : ChartRobotEventArgs
{
}
/// The base class representing event args for a ChartRobot .
public abstract class ChartRobotEventArgs
{
/// Gets the ChartRobot that raised an event.
public ChartRobot Robot {get;}
}
/// The class representing ModifiedEventArgs for a ChartRobot .
public class ChartRobotModifiedEventArgs : ChartRobotEventArgs
{
}
/// The class representing RemovedEventArgs for a ChartRobot .
public class ChartRobotRemovedEventArgs : ChartRobotEventArgs
{
}
/// The class representing StartedEventArgs for a ChartRobot .
public class ChartRobotStartedEventArgs : ChartRobotEventArgs
{
}
/// The class representing StoppedEventArgs for a ChartRobot .
public class ChartRobotStoppedEventArgs : ChartRobotEventArgs
{
}
/// The interface representing a chart Robot instances collection. Provides properties and events that allow for accessing various information about Robots attached to a chart.
public interface ChartRobots
{
/// Adds a new Robot instance to a chart.
ChartRobot Add(string name, object[] parameterValues);
/// Adds a new Robot instance to a chart.
ChartRobot Add(RobotType type, object[] parameterValues);
/// Removes a Robot instance from a chart.
bool Remove(ChartRobot robot);
/// Gets the number of all Robots attached to a chart.
int Count {get;}
/// Gets a Robot attached instance to a chart by its instance ID.
ChartRobot Item {get;}
/// Occurs when a Robot is added to a chart.
event Action RobotAdded;
/// Occurs when a chart Robot instance is modified.
event Action RobotModified;
/// Occurs when a Robot is removed from a chart.
event Action RobotRemoved;
/// Occurs when a chart Robot instance is started.
event Action RobotStarted;
/// Occurs when a chart Robot instance is stopped.
event Action RobotStopped;
}
/// Chart Robots Permission
public interface ChartRobotsPermission
{
}
/// Provides data for the chart scrolling event.
public class ChartScrollEventArgs
{
/// Gets a value that indicates the amount of bars that the chart was scrolled for
public int BarsDelta {get;}
/// Gets the lowest value of the bars delta.
public double BottomYDelta {get;}
/// Gets the chart.
public Chart Chart {get;}
/// Gets the chart area.
public ChartArea ChartArea {get;}
/// Gets the highest value of the bars delta.
public double TopYDelta {get;}
}
/// Represents the Shape chart object. Allows drawing a Rectangle, a Triangle, and an Ellipse on the chart.
public interface ChartShape
{
/// Gets or sets the line color.
Color Color {get; set;}
/// Defines if the shape is filled.
bool IsFilled {get; set;}
/// Gets or sets the line style.
LineStyle LineStyle {get; set;}
/// Gets or sets the line thickness.
int Thickness {get; set;}
}
/// Provides data for the chart size change event.
public class ChartSizeEventArgs
{
/// Gets the chart area.
public ChartArea Area {get;}
/// Gets the chart.
public Chart Chart {get;}
}
/// Represents the chart static text.
public interface ChartStaticText
{
/// Gets or sets the chart static text color.
Color Color {get; set;}
/// Gets or sets the font style of the text.
string FontFamily {get; set;}
/// Gets or sets the font size of text
double FontSize {get; set;}
/// Gets or sets the chart static text horizontal alignment.
HorizontalAlignment HorizontalAlignment {get; set;}
/// Gets or sets if the text is Bold or not
bool IsBold {get; set;}
/// Gets or sets if the text is Italic or not
bool IsItalic {get; set;}
/// Gets or sets if the text is Underlined or not
bool IsUnderlined {get; set;}
/// Gets or sets the chart static text content.
string Text {get; set;}
/// Gets or sets the chart static text vertical alignment.
VerticalAlignment VerticalAlignment {get; set;}
}
/// Represents chart template.
public interface ChartTemplate
{
/// Applies current chart template to a chart.
void Apply(Chart chart);
/// Gets the chart template color settings.
ChartTemplateColorSettings ColorSettings {get;}
/// Gets the chart template display settings.
ChartTemplateDisplaySettings DisplaySettings {get;}
/// Gets the indicators of chart template.
ChartTemplateIndicators Indicators {get;}
/// Gets the chart template name.
string Name {get;}
/// Gets the robots of chart template.
ChartTemplateRobots Robots {get;}
}
/// Occurs when a new chart template is added.
public class ChartTemplateAddedEventArgs
{
/// Gets the chart template.
public ChartTemplate ChartTemplate {get;}
}
/// The interface representing a chart template indicator / robot instance parameter.
public interface ChartTemplateAlgoInstanceParameter
{
/// Gets the name of a parameter.
string Name {get;}
/// Gets the value of a parameter.
object Value {get; set;}
}
/// Represents the collection of all the parameters of a chart template indicator or Robot.
public interface ChartTemplateAlgoInstanceParameters
{
/// Gets the number of parameters.
int Count {get;}
/// Gets a parameter by it is name.
ChartTemplateAlgoInstanceParameter Item {get;}
}
/// Represents the chart template Color Settings.
public interface ChartTemplateColorSettings
{
/// Gets or sets the color of area chart fill.
Color AreaFillColor {get; set;}
/// Gets or sets the color of the ask price line.
Color AskPriceLineColor {get; set;}
/// Gets or sets the color of the chart background.
Color BackgroundColor {get; set;}
/// Gets or sets the color of the bear candle fill.
Color BearFillColor {get; set;}
/// Gets or sets the color of the bear candle or bar outline.
Color BearOutlineColor {get; set;}
/// Gets or sets the color of the bid price line.
Color BidPriceLineColor {get; set;}
/// Gets or sets the color of the bull candle fill.
Color BullFillColor {get; set;}
/// Gets or sets the color of the bull candle or bar outline.
Color BullOutlineColor {get; set;}
/// Gets or sets the color of Buy positions and orders.
Color BuyColor {get; set;}
/// Gets or sets the color of the chart foreground.
Color ForegroundColor {get; set;}
/// Gets or sets the color of the grid lines.
Color GridLinesColor {get; set;}
/// Gets or sets the color of the losing deal.
Color LosingDealColor {get; set;}
/// Gets or sets the color of the period separator.
Color PeriodSeparatorColor {get; set;}
/// Gets or sets the color of Sell order positions and orders.
Color SellColor {get; set;}
/// Gets or sets the color of the tick volume.
Color TickVolumeColor {get; set;}
/// Gets or sets the color of the winning deal.
Color WinningDealColor {get; set;}
}
/// Represents the chart template display Settings.
public interface ChartTemplateDisplaySettings
{
/// Defines if the Add cBot button is displayed on the chart.
bool AddRobotButton {get; set;}
/// Defines if the Ask Price Line is displayed on the chart.
bool AskPriceLine {get; set;}
/// Defines if the Bars is displayed on the chart.
bool Bars {get; set;}
/// Defines if the Bid Price Line is displayed on the chart.
bool BidPriceLine {get; set;}
/// Defines if the Chart Scale is displayed on the chart.
bool ChartScale {get; set;}
/// Gets or sets the type of the chart for chart template.
ChartType ChartType {get; set;}
/// Defines if the Deal Map is displayed on the chart.
bool DealMap {get; set;}
/// Defines if the Grid is displayed on the chart background.
bool Grid {get; set;}
/// Defines if the Indicator Titles are displayed on the chart.
bool IndicatorTitles {get; set;}
/// Defines if the price scale is inverted for chart template.
bool IsPriceScaleInverted {get; set;}
/// Defines if the price to bar ratio is locked for chart template. Locking sets the price scale mode to Regular.
bool IsPriceToBarRatioLocked {get; set;}
/// Defines if the auto scale fits only the bars for chart template.
bool IsScalePriceChartOnly {get; set;}
/// Defines if the Market Sentiment is visible on the chart.
bool MarketSentiment {get; set;}
/// Defines if the Orders are displayed on the chart.
bool Orders {get; set;}
/// Defines if the Period Separators are displayed on the chart.
bool PeriodSeparators {get; set;}
/// Defines if the Positions are displayed on the chart.
bool Positions {get; set;}
/// Defines if the Price Alerts are visible on the chart.
bool PriceAlerts {get; set;}
/// Defines if the price axis overlays buttons are visible on the chart.
bool PriceAxisOverlayButtons {get; set;}
/// Gets or sets the price axis position for chart template.
ChartPriceAxisPosition PriceAxisPosition {get; set;}
/// Gets or sets the price scale mode for chart template. While the template price to bar ratio is locked only Regular can be set, and setting any other mode is ignored.
ChartPriceScaleMode PriceScaleMode {get; set;}
/// Gets or sets the price to bar ratio for chart template. Values that are not greater than zero, NaN or infinite are ignored.
double PriceToBarRatio {get; set;}
/// Defines if the QuickTrade buttons are visible on the chart.
bool QuickTradeButtons {get; set;}
/// Defines if the Target is visible on the chart.
bool Targets {get; set;}
/// Defines if the Tick Volume is displayed on the chart.
bool TickVolume {get; set;}
/// Gets or sets the chart zoom percent value for chart template. Valid values are from 5 to 500 with a step of 5, as can be seen on UI in the charts Zoom control.
int ZoomLevel {get; set;}
}
/// The interface representing an indicator of to a chart template.
public interface ChartTemplateIndicator
{
/// Gets the ID of a specific indicator.
string Id {get;}
/// Gets the collection of indicator parameters.
ChartTemplateAlgoInstanceParameters Parameters {get;}
/// Gets the IndicatorType of an indicator.
IndicatorType Type {get;}
}
/// The interface representing a chart template indicator instances collection.
public interface ChartTemplateIndicators
{
/// Adds a new indicator to a chart template.
ChartTemplateIndicator Add(string name, object[] parameterValues);
/// Adds a new indicator to a chart template.
ChartTemplateIndicator Add(IndicatorType type, object[] parameterValues);
/// Returns a chart template indicator by type if exists otherwise null.
ChartTemplateIndicator Get(string id);
/// Removes an indicator from a chart template.
bool Remove(ChartTemplateIndicator chartTemplateIndicator);
/// Gets the number of all indicators attached to a chart template.
int Count {get;}
}
/// Occurs when a chart template is removed.
public class ChartTemplateRemovedEventArgs
{
/// Gets the chart template.
public ChartTemplate ChartTemplate {get;}
}
/// The interface representing a Robot of a chart template.
public interface ChartTemplateRobot
{
/// Gets the ID of a specific indicator.
string Id {get;}
/// Gets the collection of Robot parameters.
ChartTemplateAlgoInstanceParameters Parameters {get;}
/// Gets the RobotType of a Robot instance.
RobotType Type {get;}
}
/// The interface representing a chart template robots instances collection.
public interface ChartTemplateRobots
{
/// Adds a new Robot instance to a chart template.
ChartTemplateRobot Add(string name, object[] parameterValues);
/// Adds a new Robot instance to a chart template.
ChartTemplateRobot Add(RobotType type, object[] parameterValues);
/// Returns a chart template robot by type if exists otherwise null.
ChartTemplateRobot Get(string id);
/// Removes a Robot instance from a chart template.
bool Remove(ChartTemplateRobot chartTemplateRobot);
/// Gets the number of all Robots attached to a chart.
int Count {get;}
}
/// Represents collection of chart templates and provide access to chart template API.
public interface ChartTemplates
{
/// Checks if a chart template with passed name exists or not.
bool Contains(string chartTemplateName);
/// Creates a new chart template based on a chart.
ChartTemplate Create(string chartTemplateName, Chart chart);
/// Creates a new chart template.
ChartTemplate Create(string chartTemplateName);
/// Duplicates or creates a copy of an existing chart template.
ChartTemplate Duplicate(string chartTemplateName, ChartTemplate chartTemplate);
/// Returns a chart template by name if exists otherwise null.
ChartTemplate Get(string chartTemplateName);
/// Removes an existing chart template.
bool Remove(ChartTemplate chartTemplate);
/// Gets or sets default chart template.
ChartTemplate DefaultTemplate {get; set;}
/// Occurs when a new chart template is added.
event Action Added;
/// Occurs when a chart template is removed.
event Action Removed;
}
/// Represents the Text chart object. Allows place the text anywhere on the chart, bound to the chart.
public interface ChartText
{
/// Gets or sets the rotation angle of the text in degrees, measured clockwise around the text anchor point. The text can be fully rotated; any value is accepted and normalized to the 0 to 360 range. The default value is 0, which renders horizontal text.
double Angle {get; set;}
/// Gets or sets the text color.
Color Color {get; set;}
/// Gets or sets the font style of the text.
string FontFamily {get; set;}
/// Gets or sets the font size of text
double FontSize {get; set;}
/// Gets or sets the horizontal alignment of the text regarding the anchor point.
HorizontalAlignment HorizontalAlignment {get; set;}
/// Gets or sets if the text is Bold or not
bool IsBold {get; set;}
/// Gets or sets if the text is Italic or not
bool IsItalic {get; set;}
/// Gets or sets if the text is Underlined or not
bool IsUnderlined {get; set;}
/// Gets or sets the text content.
string Text {get; set;}
/// Gets or sets the Time line value.
DateTime Time {get; set;}
/// Gets or sets the vertical alignment of the text regarding the anchor point.
VerticalAlignment VerticalAlignment {get; set;}
/// Gets or sets the Y-axis value.
double Y {get; set;}
}
/// Represents the Trend Line chart object. A straight line that can be drawn from point 1 to the point 2 in any direction to mark the trends on the chart.
public interface ChartTrendLine
{
/// Calculates Y-axis value corresponding the specified bar index.
double CalculateY(int barIndex);
/// Calculates Y-axis value corresponding the specified time value.
double CalculateY(DateTime time);
/// Gets or sets the color of the Trend Line.
Color Color {get; set;}
/// Defines if the Trend Line extends to infinity.
bool ExtendToInfinity {get; set;}
/// Gets or sets the Trend Line style.
LineStyle LineStyle {get; set;}
/// Defines the trend line angle.
bool ShowAngle {get; set;}
/// Gets or sets the thickness of the Trend Line.
int Thickness {get; set;}
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the value 1 on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the value 2 on the Y-axis.
double Y2 {get; set;}
}
/// Represents the Triangle chart object.
public interface ChartTriangle
{
/// Gets or sets the value 1 on the Time line.
DateTime Time1 {get; set;}
/// Gets or sets the value 2 on the Time line.
DateTime Time2 {get; set;}
/// Gets or sets the value 3 on the Time line.
DateTime Time3 {get; set;}
/// Gets or sets the value 1 on the Y-axis.
double Y1 {get; set;}
/// Gets or sets the value 2 on the Y-axis.
double Y2 {get; set;}
/// Gets or sets the value 3 on the Y-axis.
double Y3 {get; set;}
}
/// Represents the predefined chart types.
public enum ChartType
{
/// The Bar chart.
Bars,
/// The Candlestick chart.
Candlesticks,
/// The Line chart.
Line,
/// The Dots chart.
Dots,
/// The Area chart.
Area,
/// The HLC chart.
Hlc,
}
/// Provides data for the chart type change event.
public class ChartTypeEventArgs
{
/// Gets the chart.
public Chart Chart {get;}
}
/// Represents the Vertical Line chart object. The line parallel to the Y-axis that can be set on a certain time value on the X-axis.
public interface ChartVerticalLine
{
/// Gets or sets the line color.
Color Color {get; set;}
/// Gets or sets the line style.
LineStyle LineStyle {get; set;}
/// Gets or sets the line thickness.
int Thickness {get; set;}
/// Gets or sets the value on the Time line.
DateTime Time {get; set;}
}
/// Provides data for chart visibility changed event
public class ChartVisibilityChangedEventArgs
{
/// The chart that event belonges to.
public Chart Chart {get;}
}
/// Provides data for the chart type change event.
public class ChartZoomEventArgs
{
/// Gets the chart.
public Chart Chart {get;}
}
/// Represents the Checkbox.
public class CheckBox : Control
{
/// Initializes a new instance of the checkbox class.
public CheckBox();
/// Gets or sets the content.
public ControlBase Content {get; set;}
/// Gets or sets a value indicating whether the checkbox is checked.
public bool? IsChecked {get; set;}
/// Checks if the checkbox may be of three states - checked, unchecked and indeterminate.
public bool IsThreeState {get; set;}
/// Gets or sets the checkbox text.
public string Text {get; set;}
/// Occurs when checked.
public event Action Checked;
/// Occurs when clicked.
public event Action Click;
/// Occurs when indeterminate.
public event Action Indeterminate;
/// Occurs when unchecked.
public event Action Unchecked;
}
/// Provides data for the checkbox event.
public class CheckBoxEventArgs
{
/// Gets the checkbox data.
public CheckBox CheckBox {get;}
}
/// Provides access to system Clipboard.
public interface Clipboard
{
/// Returns a string containing text data on the Clipboard.
string GetText();
/// Stores text data on the Clipboard.
void SetText(string text);
}
/// System Clipboard Permission
public interface ClipboardPermission
{
}
/// Represents the cloud between the indicator lines.
public class CloudAttribute : Attribute
{
/// The cloud between the indicator lines.
public CloudAttribute(string firstLineName, string secondLineName);
/// Cloud color when the first line is above the second one. If not specified, the color of the first line is used.
public string FirstColor {get; set;}
/// The name of the first indicator line.
public string FirstLineName {get;}
/// The cloud opacity. Value can be set from 0 (transparent) to 1 (opaque). Values higher than 1 will be set to 1, values below 0 will be set to 0. Opacity is multiplied by the alpha channel of the active color (first or second color). Default opacity value is 0.2.
public double Opacity {get; set;}
/// Cloud color when the second line is above the first one. If not specified, color of the second line is used.
public string SecondColor {get; set;}
/// The name of the second indicator line.
public string SecondLineName {get;}
}
/// Represents an ARGB (alpha, red, green, blue) color.
public sealed class Color
{
/// Creates a color from alpha, red, green and blue components.
public static Color FromArgb(int alpha, int red, int green, int blue);
/// Creates a color from existing color, but with new specified alpha value.
public static Color FromArgb(int alpha, Color baseColor);
/// Creates a color from a 32-bit ARGB value.
public static Color FromArgb(int argb);
/// Creates a color from red, green and blue values. The alpha value is implicitly 255 (fully opaque).
public static Color FromArgb(int red, int green, int blue);
/// Attempts to convert a hex string to a Color.
public static Color FromHex(string hex);
/// Creates a color from the specified name of a predefined color.
public static Color FromName(string name);
/// Get the 32-bit ARGB color value.
public int ToArgb();
/// Get the hex string representation of the color.
public string ToHexString();
/// Gets the alpha component value of the color.
public byte A {get;}
/// Gets a system-defined color that has an ARGB value of #FFF0F8FF.
public static Color AliceBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FFFAEBD7.
public static Color AntiqueWhite {get;}
/// Gets a system-defined color that has an ARGB value of #FF00FFFF.
public static Color Aqua {get;}
/// Gets a system-defined color that has an ARGB value of #FF7FFFD4.
public static Color Aquamarine {get;}
/// Gets a system-defined color that has an ARGB value of #FFF0FFFF.
public static Color Azure {get;}
/// Gets the blue component value of the color.
public byte B {get;}
/// Gets a system-defined color that has an ARGB value of #FFF5F5DC.
public static Color Beige {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFE4C4.
public static Color Bisque {get;}
/// Gets a system-defined color that has an ARGB value of #FF000000.
public static Color Black {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFEBCD.
public static Color BlanchedAlmond {get;}
/// Gets a system-defined color that has an ARGB value of #FF0000FF.
public static Color Blue {get;}
/// Gets a system-defined color that has an ARGB value of #FF8A2BE2.
public static Color BlueViolet {get;}
/// Gets a system-defined color that has an ARGB value of #FFA52A2A.
public static Color Brown {get;}
/// Gets a system-defined color that has an ARGB value of #FFDEB887.
public static Color BurlyWood {get;}
/// Gets a system-defined color that has an ARGB value of #FF5F9EA0.
public static Color CadetBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FF7FFF00.
public static Color Chartreuse {get;}
/// Gets a system-defined color that has an ARGB value of #FFD2691E.
public static Color Chocolate {get;}
/// Gets a system-defined color that has an ARGB value of #FFFF7F50.
public static Color Coral {get;}
/// Gets a system-defined color that has an ARGB value of #FF6495ED.
public static Color CornflowerBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFF8DC.
public static Color Cornsilk {get;}
/// Gets a system-defined color that has an ARGB value of #FFDC143C.
public static Color Crimson {get;}
/// Gets a system-defined color that has an ARGB value of #FF00FFFF.
public static Color Cyan {get;}
/// Gets a system-defined color that has an ARGB value of #FF00008B.
public static Color DarkBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FF008B8B.
public static Color DarkCyan {get;}
/// Gets a system-defined color that has an ARGB value of #FFB8860B.
public static Color DarkGoldenrod {get;}
/// Gets a system-defined color that has an ARGB value of #FFA9A9A9.
public static Color DarkGray {get;}
/// Gets a system-defined color that has an ARGB value of #FF006400.
public static Color DarkGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FFBDB76B.
public static Color DarkKhaki {get;}
/// Gets a system-defined color that has an ARGB value of #FF8B008B.
public static Color DarkMagenta {get;}
/// Gets a system-defined color that has an ARGB value of #FF556B2F.
public static Color DarkOliveGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FFFF8C00.
public static Color DarkOrange {get;}
/// Gets a system-defined color that has an ARGB value of #FF9932CC.
public static Color DarkOrchid {get;}
/// Gets a system-defined color that has an ARGB value of #FF8B0000.
public static Color DarkRed {get;}
/// Gets a system-defined color that has an ARGB value of #FFE9967A.
public static Color DarkSalmon {get;}
/// Gets a system-defined color that has an ARGB value of #FF8FBC8F.
public static Color DarkSeaGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FF483D8B.
public static Color DarkSlateBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FF2F4F4F.
public static Color DarkSlateGray {get;}
/// Gets a system-defined color that has an ARGB value of #FF00CED1.
public static Color DarkTurquoise {get;}
/// Gets a system-defined color that has an ARGB value of #FF9400D3.
public static Color DarkViolet {get;}
/// Gets a system-defined color that has an ARGB value of #FFFF1493.
public static Color DeepPink {get;}
/// Gets a system-defined color that has an ARGB value of #FF00BFFF.
public static Color DeepSkyBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FF696969.
public static Color DimGray {get;}
/// Gets a system-defined color that has an ARGB value of #FF1E90FF.
public static Color DodgerBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FFB22222.
public static Color Firebrick {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFFAF0.
public static Color FloralWhite {get;}
/// Gets a system-defined color that has an ARGB value of #FF228B22.
public static Color ForestGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FFFF00FF.
public static Color Fuchsia {get;}
/// Gets the green component value of the color.
public byte G {get;}
/// Gets a system-defined color that has an ARGB value of #FFDCDCDC.
public static Color Gainsboro {get;}
/// Gets a system-defined color that has an ARGB value of #FFF8F8FF.
public static Color GhostWhite {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFD700.
public static Color Gold {get;}
/// Gets a system-defined color that has an ARGB value of #FFDAA520.
public static Color Goldenrod {get;}
/// Gets a system-defined color that has an ARGB value of #FF808080.
public static Color Gray {get;}
/// Gets a system-defined color that has an ARGB value of #FF008000.
public static Color Green {get;}
/// Gets a system-defined color that has an ARGB value of #FFADFF2F.
public static Color GreenYellow {get;}
/// Gets a system-defined color that has an ARGB value of #FFF0FFF0.
public static Color Honeydew {get;}
/// Gets a system-defined color that has an ARGB value of #FFFF69B4.
public static Color HotPink {get;}
/// Gets a system-defined color that has an ARGB value of #FFCD5C5C.
public static Color IndianRed {get;}
/// Gets a system-defined color that has an ARGB value of #FF4B0082.
public static Color Indigo {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFFFF0.
public static Color Ivory {get;}
/// Gets a system-defined color that has an ARGB value of #FFF0E68C.
public static Color Khaki {get;}
/// Gets a system-defined color that has an ARGB value of #FFE6E6FA.
public static Color Lavender {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFF0F5.
public static Color LavenderBlush {get;}
/// Gets a system-defined color that has an ARGB value of #FF7CFC00.
public static Color LawnGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFFACD.
public static Color LemonChiffon {get;}
/// Gets a system-defined color that has an ARGB value of #FFADD8E6.
public static Color LightBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FFF08080.
public static Color LightCoral {get;}
/// Gets a system-defined color that has an ARGB value of #FFE0FFFF.
public static Color LightCyan {get;}
/// Gets a system-defined color that has an ARGB value of #FFFAFAD2.
public static Color LightGoldenrodYellow {get;}
/// Gets a system-defined color that has an ARGB value of #FFD3D3D3.
public static Color LightGray {get;}
/// Gets a system-defined color that has an ARGB value of #FF90EE90.
public static Color LightGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFB6C1.
public static Color LightPink {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFA07A.
public static Color LightSalmon {get;}
/// Gets a system-defined color that has an ARGB value of #FF20B2AA.
public static Color LightSeaGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FF87CEFA.
public static Color LightSkyBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FF778899.
public static Color LightSlateGray {get;}
/// Gets a system-defined color that has an ARGB value of #FFB0C4DE.
public static Color LightSteelBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFFFE0.
public static Color LightYellow {get;}
/// Gets a system-defined color that has an ARGB value of #FF00FF00.
public static Color Lime {get;}
/// Gets a system-defined color that has an ARGB value of #FF32CD32.
public static Color LimeGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FFFAF0E6.
public static Color Linen {get;}
/// Gets a system-defined color that has an ARGB value of #FFFF00FF.
public static Color Magenta {get;}
/// Gets a system-defined color that has an ARGB value of #FF800000.
public static Color Maroon {get;}
/// Gets a system-defined color that has an ARGB value of #FF66CDAA.
public static Color MediumAquamarine {get;}
/// Gets a system-defined color that has an ARGB value of #FF0000CD.
public static Color MediumBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FFBA55D3.
public static Color MediumOrchid {get;}
/// Gets a system-defined color that has an ARGB value of #FF9370DB.
public static Color MediumPurple {get;}
/// Gets a system-defined color that has an ARGB value of #FF3CB371.
public static Color MediumSeaGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FF7B68EE.
public static Color MediumSlateBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FF00FA9A.
public static Color MediumSpringGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FF48D1CC.
public static Color MediumTurquoise {get;}
/// Gets a system-defined color that has an ARGB value of #FFC71585
public static Color MediumVioletRed {get;}
/// Gets a system-defined color that has an ARGB value of #FF191970.
public static Color MidnightBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FFF5FFFA.
public static Color MintCream {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFE4E1.
public static Color MistyRose {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFE4B5.
public static Color Moccasin {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFDEAD.
public static Color NavajoWhite {get;}
/// Gets a system-defined color that has an ARGB value of #FF000080.
public static Color Navy {get;}
/// Gets a system-defined color that has an ARGB value of #FFFDF5E6.
public static Color OldLace {get;}
/// Gets a system-defined color that has an ARGB value of #FF808000.
public static Color Olive {get;}
/// Gets a system-defined color that has an ARGB value of #FF6B8E23.
public static Color OliveDrab {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFA500.
public static Color Orange {get;}
/// Gets a system-defined color that has an ARGB value of #FFFF4500.
public static Color OrangeRed {get;}
/// Gets a system-defined color that has an ARGB value of #FFDA70D6.
public static Color Orchid {get;}
/// Gets a system-defined color that has an ARGB value of #FFEEE8AA.
public static Color PaleGoldenrod {get;}
/// Gets a system-defined color that has an ARGB value of #FF98FB98.
public static Color PaleGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FFAFEEEE.
public static Color PaleTurquoise {get;}
/// Gets a system-defined color that has an ARGB value of #FFDB7093.
public static Color PaleVioletRed {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFEFD5.
public static Color PapayaWhip {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFDAB9.
public static Color PeachPuff {get;}
/// Gets a system-defined color that has an ARGB value of #FFCD853F.
public static Color Peru {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFC0CB.
public static Color Pink {get;}
/// Gets a system-defined color that has an ARGB value of #FFDDA0DD.
public static Color Plum {get;}
/// Gets a system-defined color that has an ARGB value of #FFB0E0E6.
public static Color PowderBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FF800080.
public static Color Purple {get;}
/// Gets the red component value of the color.
public byte R {get;}
/// Gets a system-defined color that has an ARGB value of #FFFF0000.
public static Color Red {get;}
/// Gets a system-defined color that has an ARGB value of #FFBC8F8F.
public static Color RosyBrown {get;}
/// Gets a system-defined color that has an ARGB value of #FF4169E1.
public static Color RoyalBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FF8B4513.
public static Color SaddleBrown {get;}
/// Gets a system-defined color that has an ARGB value of #FFFA8072.
public static Color Salmon {get;}
/// Gets a system-defined color that has an ARGB value of #FFF4A460.
public static Color SandyBrown {get;}
/// Gets a system-defined color that has an ARGB value of #FF2E8B57.
public static Color SeaGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFF5EE.
public static Color SeaShell {get;}
/// Gets a system-defined color that has an ARGB value of #FFA0522D.
public static Color Sienna {get;}
/// Gets a system-defined color that has an ARGB value of #FFC0C0C0.
public static Color Silver {get;}
/// Gets a system-defined color that has an ARGB value of #FF87CEEB.
public static Color SkyBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FF6A5ACD.
public static Color SlateBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FF708090.
public static Color SlateGray {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFFAFA.
public static Color Snow {get;}
/// Gets a system-defined color that has an ARGB value of #FF00FF7F.
public static Color SpringGreen {get;}
/// Gets a system-defined color that has an ARGB value of #FF4682B4.
public static Color SteelBlue {get;}
/// Gets a system-defined color that has an ARGB value of #FFD2B48C.
public static Color Tan {get;}
/// Gets a system-defined color that has an ARGB value of #FF008080.
public static Color Teal {get;}
/// Gets a system-defined color that has an ARGB value of #FFD8BFD8.
public static Color Thistle {get;}
/// Gets a system-defined color that has an ARGB value of #FFFF6347.
public static Color Tomato {get;}
/// Gets a system-defined color that has an ARGB value of #00FFFFFF.
public static Color Transparent {get;}
/// Gets a system-defined color that has an ARGB value of #FF40E0D0.
public static Color Turquoise {get;}
/// Gets a system-defined color that has an ARGB value of #FFEE82EE.
public static Color Violet {get;}
/// Gets a system-defined color that has an ARGB value of #FFF5DEB3.
public static Color Wheat {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFFFFF.
public static Color White {get;}
/// Gets a system-defined color that has an ARGB value of #FFF5F5F5.
public static Color WhiteSmoke {get;}
/// Gets a system-defined color that has an ARGB value of #FFFFFF00.
public static Color Yellow {get;}
/// Gets a system-defined color that has an ARGB value of #FF9ACD32.
public static Color YellowGreen {get;}
/// Represents empty color.
public static Color Empty;
}
/// Represents the ColorPicker control.
public class ColorPicker : ControlBase
{
/// Initializes a new instance of the ColorPicker class.
public ColorPicker();
/// Gets or sets if color picker is stretched or not.
public bool IsStretched {get; set;}
/// Gets or sets selected color.
public Color SelectedColor {get; set;}
/// Occurs when selected color is changed.
public event Action SelectedColorChanged;
}
/// Provides data for the ColorPicker SelectedColorChanged event.
public class ColorPickerSelectedColorChangedEventArgs
{
/// Gets the color picker control.
public ColorPicker ColorPicker {get;}
/// Gets the new selected color.
public Color NewSelectedColor {get;}
/// Gets the previous selected color.
public Color PreviousSelectedColor {get;}
}
/// Represents the color theme.
public enum ColorTheme
{
/// The dark color theme.
Dark,
/// The light color theme.
Light,
}
/// Provides data for the color theme change event.
public class ColorThemeChangeEventArgs
{
/// Gets the color theme.
public ColorTheme ColorTheme {get;}
}
/// A control that shows drop down list of items and allows user to select a single item from the list
public class ComboBox : Control
{
/// Creates a new empty ComboBox with default ComboBox Style
public ComboBox();
/// Adds a new item to the ComboBox
public void AddItem(string item);
/// Removes an existing item from the ComboBox
public void RemoveItem(string item);
/// Set / Get the ComboBox selected item index
public int SelectedIndex {get; set;}
/// Set / Get the ComboBox selected item
public string SelectedItem {get; set;}
/// This event will trigger if the ComboBox selected item changed
public event Action SelectedItemChanged;
}
/// Provides data for ComboBox SelectedItemChanged event handlers
public class ComboBoxSelectedItemChangedEventArgs
{
/// The ComboBox that it is selected item changed
public ComboBox ComboBox {get;}
/// The new selected item of ComboBox
public string SelectedItem {get;}
}
/// Represents a plugin command.
public interface Command
{
/// Gets command unique Id.
Guid Id {get;}
/// Gets / sets if command is enabled or not.
bool IsEnabled {get; set;}
/// Gets / sets command tooltips.
string ToolTip {get; set;}
/// Gets command type.
CommandType Type {get;}
}
/// Represents a plugin command callback arguments.
public class CommandArgs
{
/// Gets the command associated with these arguments.
public Command Command {get;}
/// Gets the context in which the command is executed.
public object Context {get;}
}
/// Represents the result of a command execution.
public class CommandResult
{
/// Initialises a new instance of the CommandResult class.
public CommandResult(ControlBase child);
/// Gets the child control associated with the command result.
public ControlBase Child {get;}
}
/// Represents the predefined types of plugin commands.
public enum CommandType
{
/// A command for chart group container toolbar.
ChartContainerToolbar,
}
/// Represents the collection of plugin commands.
public interface Commands
{
/// Adds a new command with a callback.
Command Add(CommandType type, Action callback);
/// Adds a new command with a callback.
Command Add(CommandType type, Action callback, SvgIcon icon);
/// Adds a new command with a callback.
Command Add(CommandType type, Func callback);
/// Adds a new command with a callback and icon.
Command Add(CommandType type, Func callback, SvgIcon icon);
/// Returns a command by Id.
Command GetById(Guid id);
/// Returns all commands based on type.
Command[] GetByType(CommandType type);
/// Removes a command by Id.
bool Remove(Guid id);
/// Returns number of all commands.
int Count {get;}
}
/// Provides access to the properties describing an asynchronous algo compilation operation.
public class CompilationOperation
{
/// True if compilation operation is being executed, false if it completed.
public bool IsExecuting {get;}
/// The result of compilation operation.
public CompilationResult Result {get;}
}
/// Compilation options container.
public class CompilationOptions
{
/// Creates compilation options.
public CompilationOptions();
/// Gets / Inits inclusion of source code in output algo file (Default is False).
public bool IncludeSourceCode {get; set;}
/// Gets / Inits output algo file path, if not provided default platform algo path will be used.
public string OutputAlgoFilePath {get; set;}
}
/// The result of an algo compilation.
public class CompilationResult
{
/// Gets compilation errors if Succeeded was False, otherwise null.
public IReadonlyList Errors {get;}
/// Gets the result of compilation, True if succeeded otherwise False.
public bool Succeeded {get;}
}
/// Provides access to compiler for algos.
public interface Compiler
{
/// Compiles an algo.
CompilationResult Compile(string csprojFilePath);
/// Compiles an algo.
CompilationResult Compile(string csprojFilePath, CompilationOptions options);
/// Compiles an algo asynchronously and calls the passed callback when compilation finishes.
CompilationOperation CompileAsync(string csprojFilePath, Action callback);
/// Compiles an algo asynchronously and calls the passed callback when compilation finishes.
CompilationOperation CompileAsync(string csprojFilePath, Action callback, CompilationOptions options);
}
/// Represents the Chart Control class.
public abstract class Control : ControlBase
{
/// Gets or sets the color of the chart control background.
public Color BackgroundColor {get; set;}
/// Gets or sets the font family.
public string FontFamily {get; set;}
/// Gets or sets the font size.
public double FontSize {get; set;}
/// Gets or sets the font style.
public FontStyle FontStyle {get; set;}
/// Gets or sets the font weight.
public FontWeight FontWeight {get; set;}
/// Gets or sets the color of the chart control foreground. Check the Color class for the ARGB (alpha, red, green, blue) color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".
public Color ForegroundColor {get; set;}
/// Gets or sets the horizontal content alignment.
public HorizontalAlignment HorizontalContentAlignment {get; set;}
/// Gets or sets the chart control padding. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".
public Thickness Padding {get; set;}
/// Gets or sets the vertical content alignment.
public VerticalAlignment VerticalContentAlignment {get; set;}
}
/// Represents the base of chart controls.
public abstract class ControlBase
{
/// Sets the property to the default value and removes its privelege over the style.
public void ResetProperty(ControlProperty property);
/// Gets or sets the position of the chart control to the bottom of the chart area. Works only when the control is inside the Canvas panel.
public double Bottom {get; set;}
/// Specifies the dock position of the chart control instance. Works only inside the DockPanel.
public Dock Dock {get; set;}
/// Gets or sets the hight of the chart control.
public double Height {get; set;}
/// Gets or sets the horizontal alignment of the chart control instance.
public HorizontalAlignment HorizontalAlignment {get; set;}
/// Gets or sets the value indicating whether this instance of the chart control is enabled.
public bool IsEnabled {get; set;}
/// Gets or sets a value that declares if the chart control instance is visible for the mouse hit testing. If set to false, then the control will not handle any mouse events.
public bool IsHitTestVisible {get; set;}
/// Gets or sets the value indicating whether this instance of the chart control instance is visible.
public bool IsVisible {get; set;}
/// Gets or sets the position of the chart control to the left side of the chart area. Works only when the control is inside the Canvas panel.
public double Left {get; set;}
/// Gets or sets the level of thickness of the margin of the chart control instance. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".
public Thickness Margin {get; set;}
/// Gets or sets the maximum height of the chart control.
public double MaxHeight {get; set;}
/// Gets or sets the maximum width of the chart control.
public double MaxWidth {get; set;}
/// Gets or sets the minimum height of the chart control.
public double MinHeight {get; set;}
/// Gets or sets the minimum width of the chart control.
public double MinWidth {get; set;}
/// Gets or sets the level of opacity of the chart control instance. Can be set from 0 (transparent) to 1 (opaque). Values higher than 1 will be set to 1, values below 0 will be set to 0.
public double Opacity {get; set;}
/// Gets or sets the position of the chart control to the rignt side of the chart area. Works only when the control is inside the Canvas panel.
public double Right {get; set;}
/// Gets or sets the style of a chart control.
public Style Style {get; set;}
/// Gets or sets the position of the chart control to the top of the chart area. Works only when the control is inside the Canvas panel.
public double Top {get; set;}
/// Gets the unique identifier of a chart control.
public Guid UniqueId {get;}
/// Gets or sets the vertical alignment of the chart control instance.
public VerticalAlignment VerticalAlignment {get; set;}
/// Gets or sets the width of the chart control.
public double Width {get; set;}
}
/// Represents the Control property enumeration used in Style to get or set a style for a specific property.
public enum ControlProperty
{
/// The background color. Property value can be set using color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".
BackgroundColor,
/// The foreground color. Property value can be set using color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".
ForegroundColor,
/// The opacity of the control. Can be set from 0 (transparent) to 1 (opaque). Values higher than 1 will be set to 1, values below 0 will be set to 0.
Opacity,
/// The minimum width of the control.
MinWidth,
/// The maximum width of the control.
MaxWidth,
/// The minimum hight of the control.
MinHeight,
/// The maximum hight of the control.
MaxHeight,
/// The width of the control.
Width,
/// The height of the control.
Height,
/// The padding of the control. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".
Padding,
/// The thickness of the border of the control. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".
BorderThickness,
/// The radius of the corner of the control. Property value can be set using CornerRadius, number, or a string: new CornerRadius(5), new CornerRadius(1, 2, 3, 4).
CornerRadius,
/// The horizontal content alignment.
HorizontalContentAlignment,
/// The vertical content alignment.
VerticalContentAlignment,
/// The alignment of the content.
TextAlignment,
/// The margin of the content. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".
Margin,
/// The content font weight. Property value can be set using the FontWeight enumerations: FontWeight.Bold, FontWeight.SemiBold, FontWeight.Light, FontWeight.Thin, etc.
FontWeight,
/// The content font style. Property value can be set using the FontStyle enumeration: FontWeight.Italic or FontWeight.Oblique.
FontStyle,
/// The font family.
FontFamily,
/// The font size.
FontSize,
/// The border color. Property value can be set using color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".
BorderColor,
/// The caret color. Property value can be set using color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".
CaretColor,
}
/// Represents the chart control state.
public enum ControlState
{
/// The hover.
Hover,
/// The pressed.
Pressed,
/// The disabled.
Disabled,
/// The checked.
Checked,
/// The dark theme.
DarkTheme,
/// The light theme.
LightTheme,
}
/// Represents the radii of a rectangle's corners.
public sealed struct CornerRadius : ValueType
{
/// Initializes a new instance of the CornerRadius structure.
public CornerRadius(double topLeft, double topRight, double bottomRight, double bottomLeft);
/// Initializes a new instance of the CornerRadius structure.
public CornerRadius(double uniformRadius);
/// Gets or sets the radius of the bottom-left corner.
public double BottomLeft {get; set;}
/// Gets or sets the radius of the bottom-right corner.
public double BottomRight {get; set;}
/// Gets or sets the radius of the top-left corner.
public double TopLeft {get; set;}
/// Gets or sets the radius of the top-right corner.
public double TopRight {get; set;}
}
/// Represents a custom OHLC bar.
public sealed struct CustomBar : ValueType
{
/// Creates a new custom bar.
public CustomBar(DateTime time, double open, double high, double low, double close, long volume);
/// Gets close price of bar.
public double Close {get;}
/// Gets high price of bar.
public double High {get;}
/// Gets low price of bar.
public double Low {get;}
/// Gets open price of bar.
public double Open {get;}
/// Gets open time of bar.
public DateTime Time {get;}
/// Gets volume of bar.
public long Volume {get;}
}
/// Represents a mutable collection of OHLC bars that will be used for a custom time frame / symbol.
public interface CustomBars
{
/// Appends a new bar to the end of bars collection.
void AppendBar(CustomBar bar);
/// Appends a collection of bars to the end of bars collection.
void AppendBars(IEnumerable bars);
/// Prepends a new bar to the start of bars collection.
void PrependBar(CustomBar bar);
/// Prepends a collection of bars to the start of bars collection.
void PrependBars(IEnumerable bars);
/// Updates the last bar.
void UpdateLastBar(double open, double high, double low, double close, long volume);
/// Gets readonly bars.
Bars Bars {get;}
/// Gets IsLoaded status, If true it means custom bars is being used and can't be removed.
bool IsLoaded {get;}
/// Gets symbol of custom bars.
Symbol Symbol {get;}
/// Gets timeframe of custom bars.
TimeFrame TimeFrame {get;}
/// Occurs when user scrolls back on a custom bars chart.
event Action NeedsMore;
}
/// Provides data for CustomBars NeedsMore event.
public class CustomBarsNeedsMoreEventArgs
{
/// Gets custom bars that needs more bars.
public CustomBars CustomBars {get;}
}
/// Represents the custom control to create reusable controls with customized look and behavior.
public abstract class CustomControl : ControlBase
{
/// Adds a child control.
protected void AddChild(ControlBase childControl);
}
/// Represents a custom frame.
public interface CustomFrame
{
/// Get / set child control of frame.
ControlBase Child {get; set;}
}
/// Represents a custom symbol.
public interface CustomSymbol
{
/// Adds bars for a time frame that will be used for this custom symbol.
CustomBars AddBars(TimeFrame timeFrame);
/// Returns bars of a time frame if exists otherwise null.
CustomBars GetBars(TimeFrame timeFrame);
/// Removes all existing unloaded custom bars that aren't being used.
void RemoveAllUnloadedBars();
/// Removes bars of a time frame which has no user.
bool RemoveBars(TimeFrame timeFrame);
/// Updates current symbol quotes.
void UpdateQuote(double? bid, double? ask);
/// Gets symbol administrative charge. Administrative fee will be charged instead of SWAP if account is marked as SWAP free. Only applicable for SWAP free trading accounts.
double AdministrativeCharge {get; set;}
/// Gets / sets the Day of the week (in UTC) when Administrative Fee charge amount will be tripled. Only applicable for SWAP free trading accounts.
DayOfWeek? AdministrativeCharge3DaysRollover {get; set;}
/// Gets the current ask price for this symbol.
double Ask {get;}
/// Gets / sets BarsNeeded handler, it's triggered when bars are needed for a time frame of current custom symbol.
Action BarsNeeded {get; set;}
/// Gets / sets the symbol base asset.
Asset BaseAsset {get; set;}
/// Gets the current bid price for this symbol.
double Bid {get;}
/// Gets / sets the amount of base commission for the symbol.
double Commission {get; set;}
/// Gets / sets the symbol base commission calculation type.
SymbolCommissionType CommissionType {get; set;}
/// Gets / sets symbol description.
string Description {get; set;}
/// Gets / sets the symbol dynamic leverage.
ICollection DynamicLeverage {get;}
/// Gets / sets custom future contract settings.
CustomSymbolFuturesSettings FuturesSettings {get; set;}
/// Gets / sets symbol grace period. This is the number of days free of Administrative fee from the time of opening a position. Only applicable for SWAP free trading accounts.
int GracePeriod {get; set;}
/// Gets the custom symbol ID.
long Id {get;}
/// Gets / sets the lot size.
long LotSize {get; set;}
/// Gets / sets the symbol market hours.
CustomSymbolMarketHours MarketHours {get;}
/// Gets / sets the minimum amount of commission for the symbol. This is the amount of commission that will be paid by trader for any trade. Check MinCommissionType for interpretation of MinCommission value.
double MinCommission {get; set;}
/// Gets / sets the symbol minimum commission asset. If MinCommissionType is set to Asset then you can use this property to get that asset. The MinCommission value will be converted from MinCommissionAsset to account deposit asset at the moment of trade.
Asset MinCommissionAsset {get; set;}
/// Gets / sets the symbol minimum commission type. Use this property to interpret MinCommission value.
SymbolMinCommissionType MinCommissionType {get; set;}
/// Gets / sets the symbol minimum distances type.
SymbolMinDistanceType MinDistanceType {get; set;}
/// Gets / sets symbol minimum stop loss distance. Use MinDistanceType for interpretation.
double MinStopLossDistance {get; set;}
/// Gets / sets symbol minimum take profit distance. Use MinDistanceType for interpretation.
double MinTakeProfitDistance {get; set;}
/// Gets custom symbol unique name.
string Name {get;}
/// Gets / sets the symbol pip digits.
int PipDigits {get; set;}
/// Gets / sets the symbol profit and loss conversion fee rate.
double PnLConversionFeeRate {get; set;}
/// Gets / sets the symbol quote asset.
Asset QuoteAsset {get; set;}
/// Gets custom symbol sentiment.
CustomSymbolSentiment Sentiment {get;}
/// Gets / sets the Day of the week when Symbol SWAP charge amount will be tripled.
DayOfWeek? Swap3DaysRollover {get; set;}
/// Gets / sets the symbol SWAP calculation type.
SymbolSwapCalculationType SwapCalculationType {get; set;}
/// Gets / sets the SWAP charge for long positions of the symbol.
double SwapLong {get; set;}
/// Gets / sets symbol swap period. This is the number of days free of Administrative fee from the time of opening a position.
int SwapPeriod {get; set;}
/// Gets / sets the SWAP charge for short positions of the symbol.
double SwapShort {get; set;}
/// Gets / sets the SWAP time in minutes.
int SwapTimeInMinutes {get; set;}
/// Gets regular Symbol.
Symbol Symbol {get;}
/// Gets / sets the symbol tick digits.
int TickDigits {get; set;}
/// Gets / sets the maximum units value.
double VolumeInUnitsMax {get; set;}
/// Gets / sets the minimum units value.
double VolumeInUnitsMin {get; set;}
/// Gets / sets the step volume in units.
double VolumeInUnitsStep {get; set;}
/// Gets / sets whether swap is charged on weekends or not.
bool WeekendSwaps {get; set;}
/// Occurs when a custom bars is unloaded and not being used anymore.
event Action BarsUnloaded;
/// Occurs when user opens a new chart of current custom symbol.
event Action NewChart;
}
/// Provides data for custom symbol BarsNeeded handler.
public class CustomSymbolBarsNeededArgs
{
/// Gets custom bars.
public CustomBars CustomBars {get;}
/// Gets custom symbol.
public CustomSymbol CustomSymbol {get;}
}
/// Provides data for custom symbol BarsUnloaded event.
public class CustomSymbolBarsUnloadedEventArgs
{
/// Gets custom bars that was unloaded.
public CustomBars CustomBars {get;}
/// Gets custom symbol.
public CustomSymbol CustomSymbol {get;}
}
/// Represents a custom symbol futures settings.
public class CustomSymbolFuturesSettings
{
/// Creates a new custom symbol futures settings.
public CustomSymbolFuturesSettings(DateTime lastTradeTime, DateTime expirationTime, double? maintenanceMargin);
/// Gets the expiration time of future contract.
public DateTime ExpirationTime {get;}
/// Gets the last trade time of future contract.
public DateTime LastTradeTime {get;}
/// The amount of quote asset that will be taken as a margin per one traded lot.
public double? MaintenanceMargin {get;}
}
/// Custom symbol tier of dynamic leverage.
public class CustomSymbolLeverageTier
{
/// Creates a new custom symbol leverage tier.
public CustomSymbolLeverageTier(double volume, double leverage);
/// Leverage of dynamic leverage tier.
public double Leverage {get;}
/// Volume of dynamic leverage tier.
public double Volume {get;}
}
/// Access to custom symbol's trading sessions schedule.
public interface CustomSymbolMarketHours
{
/// Collection of all symbol's trading holidays
ICollection Holidays {get;}
/// Collection of all symbol's trading sessions
ICollection Sessions {get;}
}
/// Provides data for custom symbol NewChart event.
public class CustomSymbolNewChartEventArgs
{
/// Chart that is newly opened or switched to custom symbol.
public Chart Chart {get;}
/// Gets custom bars for the newly opened custom symbol chart.
public CustomBars CustomBars {get;}
/// Gets custom symbol.
public CustomSymbol CustomSymbol {get;}
}
/// Represents a custom symbol sentiment.
public interface CustomSymbolSentiment
{
/// Gets / sets buy percentage.
double BuyPercentage {get; set;}
/// Gets / sets sell percentage.
double SellPercentage {get; set;}
}
/// Represents a custom symbol trading holiday.
public class CustomSymbolTradingHoliday
{
/// Creates a new custom symbol trading holiday.
public CustomSymbolTradingHoliday(string name, DateTime startTime, DateTime endTime, bool isRecurring);
/// Gets the end date and time of the trading holiday.
public DateTime EndTime {get;}
/// Gets a value indicating whether the trading holiday is recurring.
public bool IsRecurring {get;}
/// Gets the name of the trading holiday.
public string Name {get;}
/// Gets the start date and time of the trading holiday.
public DateTime StartTime {get;}
}
/// Custom symbol trading session schedule.
public class CustomSymbolTradingSession
{
/// Creates a new custom symbol trading session.
public CustomSymbolTradingSession(DayOfWeek startDay, DayOfWeek endDay, TimeSpan startTime, TimeSpan endTime);
/// Day of week when trading session ends
public DayOfWeek EndDay {get;}
/// Time when trading session ends
public TimeSpan EndTime {get;}
/// Day of week when trading session starts
public DayOfWeek StartDay {get;}
/// Time when trading session starts
public TimeSpan StartTime {get;}
}
/// Represents collection of custom symbols.
public interface CustomSymbols
{
/// Adds a new custom symbol.
CustomSymbol Add(string name, Asset baseAsset, Asset quoteAsset);
/// Adds a new custom symbol based on existing symbol.
CustomSymbol Add(string name, Symbol baseSymbol);
/// Returns a custom symbol by it's name.
CustomSymbol Get(string name);
/// Removes a custom symbol.
bool Remove(CustomSymbol customSymbol);
}
/// Represents a custom time frame.
public interface CustomTimeFrame
{
/// Adds bars for a symbol that will be used for this custom time frame when needed.
CustomBars AddBars(Symbol symbol);
/// Returns bars of a symbol if exists otherwise null.
CustomBars GetBars(Symbol symbol);
/// Removes all existing unloaded custom bars that aren't being used.
void RemoveAllUnloadedBars();
/// Removes bars of a symbol which is not being used.
bool RemoveBars(Symbol symbol);
/// Gets / sets BarsNeeded handler, it's triggered when bars are needed for a symbol of current time frame.
Action BarsNeeded {get; set;}
/// Gets / sets custom time frame description.
string Description {get; set;}
/// Gets Custom time frame unique name.
string Name {get;}
/// Gets regular time frame.
TimeFrame TimeFrame {get;}
/// Occurs when a custom bars is unloaded and not being used anymore.
event Action BarsUnloaded;
/// Occurs when user opens a new chart of current custom time frame.
event Action NewChart;
}
/// Provides data for custom time frame BarsNeeded handler.
public class CustomTimeFrameBarsNeededArgs
{
/// Gets custom bars.
public CustomBars CustomBars {get;}
/// Gets custom time frame.
public CustomTimeFrame CustomTimeFrame {get;}
}
/// Provides data for custom time frame BarsUnloaded event.
public class CustomTimeFrameBarsUnloadedEventArgs
{
/// Gets custom bars that was unloaded.
public CustomBars CustomBars {get;}
/// Gets custom time frame.
public CustomTimeFrame CustomTimeFrame {get;}
}
/// Provides data for custom time frame NewChart event.
public class CustomTimeFrameNewChartEventArgs
{
/// Chart that is newly opened or switched to custom time frame.
public Chart Chart {get;}
/// Gets custom bars for the newly opened custom time frame chart.
public CustomBars CustomBars {get;}
/// Gets custom time frame.
public CustomTimeFrame CustomTimeFrame {get;}
}
/// Represents collection of custom time frames.
public interface CustomTimeFrames
{
/// Adds a new custom time frame.
CustomTimeFrame Add(string name);
/// Returns a custom time frame by it's name.
CustomTimeFrame Get(string name);
/// Removes a custom time frame.
bool Remove(CustomTimeFrame customTimeFrame);
}
/// Represents a read only list of values, typically used to represent market price series. The values are accessed with an array-like [] operator.
public interface DataSeries
{
/// Access a value in the data series certain bars ago
double Last(int index);
/// Gets the total number of elements contained in the DataSeries.
int Count {get;}
/// Gets the value in the data series at the specified position.
double Item {get;}
/// Gets the last value of this DataSeries.
double LastValue {get;}
}
/// Represents the date time picker control.
public class DateTimePicker : ControlBase
{
/// Initializes a new instance of the DateTimePicker class.
public DateTimePicker();
/// Gets or sets maximum value.
public DateTime MaxValue {get; set;}
/// Gets or sets minimum value.
public DateTime MinValue {get; set;}
/// Gets or sets whether show time picker input or not.
public bool ShowTimeInput {get; set;}
/// Gets or sets value.
public DateTime Value {get; set;}
/// Occurs when value is changed.
public event Action ValueChanged;
}
/// Provides data for the DateTimePicker ValueChanged event.
public class DateTimePickerValueChangedEventArgs
{
/// Gets the date time picker control.
public DateTimePicker DateTimePicker {get;}
/// Gets the new selected value.
public DateTime NewValue {get;}
/// Gets the old selected value.
public DateTime OldValue {get;}
}
/// Represents a deal.
public interface Deal
{
/// Gets the channel.
string Channel {get;}
/// If deal was an opening deal then this property will return the deals that closed current deal.
IReadonlyList ClosedBy {get;}
/// If deal was a closing deal then this property will return the deals that were closed by current deal.
IReadonlyList Closing {get;}
/// Gets the comment.
string Comment {get;}
/// Returns deal execution price if deal is filled otherwise null.
double? ExecutionPrice {get;}
/// Returns deal execution time.
DateTime ExecutionTime {get;}
/// Unique deal Id.
long Id {get;}
/// Gets the label.
string Label {get;}
/// Order Id.
int OrderId {get;}
/// Position Id.
int PositionId {get;}
/// Returns deal position impact if deal is filled otherwise null.
DealPositionImpact? PositionImpact {get;}
/// Returns status of deal.
DealStatus Status {get;}
/// Gets the symbol name.
string SymbolName {get;}
/// Gets the TradeType.
TradeType TradeType {get;}
/// Deal filled volume amount in units.
double VolumeInUnits {get;}
}
/// Represents the impact of a deal on position.
public enum DealPositionImpact
{
/// Opening deal.
Opening,
/// Closing deal.
Closing,
}
/// Represents the different status of a deal.
public enum DealStatus
{
/// Filled.
Filled,
/// Partially filled.
PartiallyFilled,
/// Rejected.
Rejected,
/// Error.
Error,
/// Missed.
Missed,
/// Internally rejected.
InternallyRejected,
}
/// Represent the list of default styles for the built-in controls.
public static class DefaultStyles
{
/// Gets the Button default style.
public static Style ButtonStyle {get;}
/// Gets the Checkbox default style.
public static Style CheckBoxStyle {get;}
/// Gets the ComboBox default style.
public static Style ComboBoxStyle {get;}
/// Gets the MultiSelect default style.
public static Style MultiSelectStyle {get;}
/// Gets the Radio Button default stile.
public static Style RadioButtonStyle {get;}
/// Gets the Scroll Viewer default style.
public static Style ScrollViewerStyle {get;}
/// Gets the Tab Control default style.
public static Style TabControlStyle {get;}
/// Gets the Tab Item default style.
public static Style TabItemStyle {get;}
/// Gets the Text Block default style.
public static Style TextBlockStyle {get;}
/// Gets the Text Box default style.
public static Style TextBoxStyle {get;}
/// Gets the Toggle Button default style.
public static Style ToggleButtonStyle {get;}
}
/// Used to represent the properties of a detached window.
public interface DetachedWindow
{
/// Get / Set height of the Window
double Height {get; set;}
/// Get / Set window left margin (X)
double Left {get; set;}
/// Get / Set the window maximum height
double MaxHeight {get; set;}
/// Get / Set the window maximum width
double MaxWidth {get; set;}
/// Get / Set the window minimum height
double MinHeight {get; set;}
/// Get / Set the window minimum width
double MinWidth {get; set;}
/// Get / Set the window resize mode
ResizeMode ResizeMode {get; set;}
/// Get / Set window top margin (Y)
double Top {get; set;}
/// Get / Set width of the window
double Width {get; set;}
/// Get / Set the window startup location
WindowStartupLocation WindowStartupLocation {get; set;}
}
/// Specifies where a chart control will be docked inside the DockPanel.
public enum Dock
{
/// Dock to the left side of the DockPanel.
Left,
/// Dock to the top of the DockPanel.
Top,
/// Dock to the right side of the DockPanel.
Right,
/// Dock to the bottom of the DockPanel.
Bottom,
}
/// Defines the area where you can arrange child elemens either horizontally or vertically, relative to each other.
public class DockPanel : Panel
{
/// Initializes a new instance of the DockPanel class.
public DockPanel();
/// Indicates whether the last child element within a DockPanel stretches to fill the remaining available space.
public bool LastChildFill {get; set;}
}
/// Provides data for the drawing color changed event.
public class DrawingColorChangedEventArgs
{
/// Gets the drawing color.
public Color DrawingColor {get;}
}
/// Represents the DropZone control that can be used as a file(s) input.
public class DropZone : ControlBase
{
/// Initializes a new instance of the DropZone class.
public DropZone();
/// Gets or sets the drop zone child object.
public ControlBase Child {get; set;}
/// Gets or sets the file extensions filter.
public string[] FilterExtensions {get; set;}
/// Gets or sets whether user can drop directories or not.
public bool IsDirectoryDropAllowed {get; set;}
/// Occurs when files are dropped.
public event Action Dropped;
}
/// Provides data for the Dropzone Dropped event.
public class DroppedEventArgs
{
/// Gets the Dropzone control.
public DropZone DropZone {get;}
/// Gets the dropped file paths.
public IReadonlyList FilePaths {get;}
}
/// Represents the ellipse shape.
public class Ellipse : Shape
{
/// Initializes a new instance of the Ellipse class.
public Ellipse();
}
/// Represents different character encoding types.
public enum EncodingType
{
/// ASCII character set encoding.
Ascii,
/// Unicode character set encoding in big endian byte order.
BigEndianUnicode,
/// Latin1 character set (ISO-8859-1) encoding.
Latin1,
/// Unicode character set encoding in little endian byte order.
Unicode,
/// UTF-8 format character set encoding.
Utf8,
/// UTF-32 format character set encoding.
Utf32,
}
/// Represents the different environments where an algo can run.
public enum EnvironmentType
{
/// Represents the Desktop environment.
Desktop,
/// Represents the Cloud environment where algos can run.
Cloud,
/// Represents the Command Line Interface (CLI) environment.
CLI,
}
/// Encapsulates an error code.
public interface Error
{
/// The encapsulated error code.
ErrorCode Code {get;}
/// The result of the trade that produced the error
TradeResult TradeResult {get;}
}
/// Enumeration of standard error codes.
public enum ErrorCode
{
/// A generic technical error with a trade request.
TechnicalError,
/// The volume value is not valid
BadVolume,
/// There are not enough money in the account to trade with.
NoMoney,
/// The market is closed.
MarketClosed,
/// The server is disconnected.
Disconnected,
/// Position does not exist.
EntityNotFound,
/// Operation timed out.
Timeout,
/// Unknown symbol.
UnknownSymbol,
/// The invalid Stop Loss or Take Profit.
InvalidStopLossTakeProfit,
/// The invalid request.
InvalidRequest,
/// Occurs when accessing trading API without trading permission.
NoTradingPermission,
}
/// The result of JavaScript execution on a WebView control.
public class ExecuteScriptResult
{
/// Initializes a new instance of ExecuteScriptResult
public ExecuteScriptResult(bool isSuccessful, string json);
/// True if JavaScript execution was successful otherwise false
public bool IsSuccessful {get;}
/// Returned JSON result of execution.
public string Json {get;}
}
/// Provides access to favorite TimeFrames API for plugins.
public interface FavoriteTimeFrames
{
/// Adds a time frame to favorite TimeFrames.
void Add(TimeFrame timeFrame);
/// Returns True if passed TimeFrame is in favorite TimeFrames otherwise False.
bool Contains(TimeFrame timeFrame);
/// Removes a time frame from favorite TimeFrames.
bool Remove(TimeFrame timeFrame);
/// Occurs when new TimeFrames are added to favorite TimeFrames.
event Action Added;
/// Occurs when TimeFrames are removed from favorite TimeFrames.
event Action Removed;
}
/// Provides data for the Favorite TimeFrames Added event.
public class FavoriteTimeFramesAddedEventArgs
{
/// Gets the added time frames.
public TimeFrame[] TimeFrames {get;}
}
/// Provides data for the Favorite TimeFrames Removed event.
public class FavoriteTimeFramesRemovedEventArgs
{
/// Gets the removed time frames.
public TimeFrame[] TimeFrames {get;}
}
/// Represents the Fibonacci Level.
public interface FibonacciLevel
{
/// Defines if the level is visible.
bool IsVisible {get; set;}
/// Gets or sets the level percent.
double Percent {get; set;}
/// Gets or sets the level price.
double? Price {get; set;}
/// Gets or sets the level time.
DateTime? Time {get; set;}
[Obsolete("Use Percent instead")]
double PercentLevel {get; set;}
}
/// Represents a file.
public interface File
{
/// Appends lines to file.
void AppendAllLines(string[] contents);
/// Appends lines to file that has a specified encoding.
void AppendAllLines(string[] contents, EncodingType encodingType);
/// Append text to file.
void AppendAllText(string contents);
/// Appends text to file that has a specified encoding.
void AppendAllText(string contents, EncodingType encodingType);
/// Returns True if File exists otherwise False.
bool Exists();
/// Reads the contents of the file into a byte array.
byte[] ReadAllBytes();
/// Reads all the text in the file.
string ReadAllText();
/// Reads all the text in the file that has a specified encoding.
string ReadAllText(EncodingType encodingType);
/// Reads a sequence of bytes from the file.
byte[] ReadBytes(int offset, int count);
/// Reads the lines of file.
string[] ReadLines();
/// Reads the lines of file that has a specified encoding.
string[] ReadLines(EncodingType encodingType);
/// Overwrites file content with passed bytes.
void WriteAllBytes(byte[] bytes);
/// Overwrites file content with passed text content.
void WriteAllText(string contents);
/// Overwrites file content with passed text content that has a specified encoding.
void WriteAllText(string contents, EncodingType encodingType);
/// Writes a chunk of data to file specific position.
void WriteBytes(byte[] bytes, int offset, int count);
/// Gets the creation time of the file.
DateTime CreationTime {get;}
/// Gets the extension part of the file name, including the leading dot '.' even if it is the entire file name, or an empty string if no extension is present.
string Extension {get;}
/// Gets the time the current file was last accessed.
DateTime LastAccessTime {get;}
/// Gets the time when the current file was last written to.
DateTime LastWriteTime {get;}
/// Gets file name without path.
string Name {get;}
/// Gets file size in bytes.
long Size {get;}
}
/// Represents the collection of plugin file associations.
public interface FileAssociations
{
/// Adds a file extension to the list of associations along with a specified icon file path.
void Add(string fileExtension, string iconFilePath);
/// Adds a file extension to the list of associations along with a specified icon file path.
void Add(string fileExtension, SvgIcon svgIcon);
/// Adds a file extension to the list of associations without specifying an icon.
void Add(string fileExtension);
/// Checks if the specified file extension is already associated.
bool Contains(string fileExtension);
/// Removes a file extension from the list of associations.
void Remove(string fileExtension);
/// Event triggered when a file associated with a registered extension is opened.
event Action FileOpened;
}
/// Provides data for plugin file associations file opened event.
public class FileAssociationsFileOpenedEventArgs
{
/// Gets opened file path.
public string FilePath {get;}
}
/// An enumeration of the different file dialog results.
public enum FileDialogResult
{
/// File dialog is not supported in running environment.
None,
/// User closed the dialog.
Cancel,
/// User pressed Ok in dialog.
OK,
/// There was an error in file dialog operation.
Error,
}
/// Specifies how the intersecting areas of PathFigure objects contained in a Geometry are combined to form the area of the Geometry.
public enum FillRule
{
/// Rule that determines whether a point is in the fill region by drawing a ray from that point to infinity in any direction and counting the number of path segments within the given shape that the ray crosses. If this number is odd, the point is inside; if even, the point is outside.
EvenOdd,
/// Rule that determines whether a point is in the fill region of the path by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left. After counting the crossings, if the result is zero then the point is outside the path. Otherwise, it is inside.
Nonzero,
}
/// Specifies style information applied to text.
public enum FontStyle
{
/// Normal text.
Normal,
/// Oblique text.
Oblique,
/// Italic text.
Italic,
}
/// Specifies the weight or thickness of the font.
public enum FontWeight
{
/// The thin font.
Thin,
/// The extra light font.
ExtraLight,
/// The ultra light font.
UltraLight,
/// The light font.
Light,
/// The normal font.
Normal,
/// The regular font.
Regular,
/// The medium font.
Medium,
/// The demibold font.
DemiBold,
/// The semibold font.
SemiBold,
/// The bold font.
Bold,
/// The extra bold font.
ExtraBold,
/// The ultra bold font.
UltraBold,
/// The black font.
Black,
/// The Heavy font.
Heavy,
/// The Extra black font.
ExtraBlack,
/// The ultra black font.
UltraBlack,
}
/// Base interface for chart frames.
public interface Frame
{
/// Brings the chart frame to the front.
void Activate();
/// Attaches frame to main chart container.
bool Attach();
/// Attaches frame to passed chart container.
bool Attach(ChartContainer targetContainer);
/// Detaches frame from it is chart container.
bool Detach();
/// Returns frame container.
ChartContainer ChartContainer {get;}
/// Returns current height of frame.
double Height {get;}
/// Returns frame Id.
string Id {get;}
/// Get / set frame index in container.
int Index {get; set;}
/// Returns true if frame is attached otherwise false.
bool IsAttached {get;}
/// Returns current width of frame.
double Width {get;}
/// Occurs when frame is attached.
event Action Attached;
/// Occurs when frame container is changed.
event Action ContainerChanged;
/// Occurs when frame is detached.
event Action Detached;
/// Occurs when frame size changes.
event Action SizeChanged;
}
/// Provides data for the frame attached event.
public class FrameAttachedEventArgs
{
/// Returns the frame.
public Frame Frame {get;}
}
/// Provides data for the frame container changed event.
public class FrameContainerChangedEventArgs
{
/// Returns the frame.
public Frame Frame {get;}
}
/// Provides data for the frame detached event.
public class FrameDetachedEventArgs
{
/// Returns the frame.
public Frame Frame {get;}
}
/// Provides data for the frame size changed event.
public class FrameSizeChangedEventArgs
{
/// Returns the frame.
public Frame Frame {get;}
}
/// Provides data for the frames added event.
public class FramesAddedEventArgs
{
/// Returns the added frames.
public Frame[] AddedFrames {get;}
}
/// Provides data for the frames removed event.
public class FramesRemovedEventArgs
{
/// Returns the removed frames.
public Frame[] RemovedFrames {get;}
}
/// This class contains valuable functions that apply to DataSeries.
public static class Functions
{
/// Returns true, if crossingSeries has crossed above crossedSeries, over the specified Period.
public static bool HasCrossedAbove(DataSeries crossingSeries, DataSeries crossedSeries, int period);
/// Checks if crossingSeries has crossed above value, sometime within the specified period.
public static bool HasCrossedAbove(DataSeries crossingSeries, double value, int period);
/// Returns true, if crossingSeries has crossed below crossedSeries, over the specified Period.
public static bool HasCrossedBelow(DataSeries crossingSeries, DataSeries crossedSeries, int period);
/// Checks if crossingSeries has crossed below the value, sometime within the specified period.
public static bool HasCrossedBelow(DataSeries crossingSeries, double value, int period);
/// Checks if the last value in a data series is less than the previous
public static bool IsFalling(DataSeries series);
/// Checks if the last value in a data series is greater than the previous.
public static bool IsRising(DataSeries series);
/// Finds the maximum value in a data series for a given period.
public static double Maximum(DataSeries series, int period);
/// Finds the minimum of a data series for a given period.
public static double Minimum(DataSeries series, int period);
/// Calculates the sum of a data series, over the specified period.
public static double Sum(DataSeries series, int period);
}
/// Represents a future contract symbol settings.
public interface FuturesSettings
{
/// Gets the expiration time of future contract.
DateTime ExpirationTime {get;}
/// Gets the last trade time of future contract.
DateTime LastTradeTime {get;}
/// The amount of quote asset that will be taken as a margin per one traded lot.
double? MaintenanceMargin {get;}
}
/// Represents a Gann Level.
public interface GannLevel
{
/// Defines if the level is visible.
bool IsVisible {get; set;}
/// Gets or sets the level ratio (e.g., 1.0 for 1x1, 2.0 for 2x1, 0.5 for 1x2).
double Ratio {get; set;}
}
/// Represents the custom fitness calculation interface.
public interface GetFitnessArgs
{
/// Gets the average profit for all trades in account deposit currency.
double AverageTrade {get;}
/// Gets the commissions of all trades in account deposit currency.
double Commissions {get;}
/// Gets the equity of the account (balance plus unrealized profit and loss).
double Equity {get;}
/// Gets all the historical trades.
History History {get;}
/// Gets total number of losing trades.
double LosingTrades {get;}
/// Gets the maximum amount of balance drawdown in account deposit currency.
double MaxBalanceDrawdown {get;}
/// Gets the maximum amount of balance drawdown in percentage (ex: 40%). It can return a positive value between 0-100.
double MaxBalanceDrawdownPercentages {get;}
/// Gets the maximum amount of equity drawdown in account deposit currency.
double MaxEquityDrawdown {get;}
/// Gets the maximum amount of equity drawdown in percentage (ex: 40%). It can return a positive value between 0-100.
double MaxEquityDrawdownPercentages {get;}
/// Gets the net profit of all trades in account deposit currency.
double NetProfit {get;}
/// Gets all pending orders.
PendingOrders PendingOrders {get;}
/// Gets all open positions.
Positions Positions {get;}
/// Gets the Profit Factor - the ratio of Total Net Profit divided by the Total Net Loss.
double ProfitFactor {get;}
/// Gets the swaps of all trades in account deposit currency.
double Swaps {get;}
/// Gets the total number of trades taken.
double TotalTrades {get;}
/// Gets the total number of winning trades.
double WinningTrades {get;}
[Obsolete("Deprecated.")]
double SharpeRatio {get;}
[Obsolete("Deprecated.")]
double SortinoRatio {get;}
}
/// Represents the Grid class.
public class Grid : Panel
{
/// Initializes a new grid on the chart.
public Grid();
/// Initializes a new grid on the chart.
public Grid(int rowsCount, int columnsCount);
/// Adds a child element.
public void AddChild(ControlBase child, int row, int column);
/// Adds the child.
public void AddChild(ControlBase child, int row, int column, int rowSpan, int columnSpan);
/// Adds a column.
public GridColumn AddColumn();
/// Adds columns.
public void AddColumns(int count);
/// Adds a row.
public GridRow AddRow();
/// Adds a rows.
public void AddRows(int count);
/// Returns a child position info if exists otherwise null.
public GridChildPositionInfo? GetChildPosition(ControlBase child);
/// Removes a column.
public void RemoveColumnAt(int index);
/// Removes the row.
public void RemoveRowAt(int index);
/// Gets the read only list of the grid columns.
public IReadonlyList Columns {get;}
/// Gets the read only list of the grid rows.
public IReadonlyList Rows {get;}
/// Defines if the grid lines are visible.
public bool ShowGridLines {get; set;}
}
/// Represents a Grid panel child position info.
public sealed struct GridChildPositionInfo : ValueType
{
/// Gets column number of child.
public int Column {get;}
/// Gets column span of child.
public int ColumnSpan {get;}
/// Gets row number of child.
public int Row {get;}
/// Gets row span of child.
public int RowSpan {get;}
}
/// Represents the column of the grid.
public interface GridColumn
{
/// Sets the grid column width in pixels.
void SetWidthInPixels(double value);
/// Sets the grid column width in stars.
void SetWidthInStars(double stars);
/// Sets the grid column width to automatic.
void SetWidthToAuto();
/// Gets the grid column index.
int Index {get;}
/// Defines the grid column maximum width.
double MaxWidth {get; set;}
/// Defines the grid column minimum width.
double MinWidth {get; set;}
/// Gets the grid column width.
GridLength Width {get;}
}
/// Represents the length of the grid.
public class GridLength
{
/// Gets or sets the type of the unit.
public GridUnitType UnitType {get;}
/// Gets or sets the value.
public double Value {get;}
}
/// Represents the row of the grid.
public interface GridRow
{
/// Sets the height of the grid row in pixels.
void SetHeightInPixels(double value);
/// Sets the height of the grid row in stars.
void SetHeightInStars(double stars);
/// Sets the height of the grid row to automatic.
void SetHeightToAuto();
/// Gets the height of the grid row.
GridLength Height {get;}
/// Gets the grid row index.
int Index {get;}
/// Gets or sets the maximum height of the grid row.
double MaxHeight {get; set;}
/// Gets or sets the minimum height of the grid row.
double MinHeight {get; set;}
}
/// Represents the type of the grid unit.
public enum GridUnitType
{
/// The automatic definition of units for the grid.
Auto,
/// Calculate grid size in pixels.
Pixel,
/// Calculate grid size in stars.
Star,
}
/// Represents a historical order.
public interface HistoricalOrder
{
/// Order channel.
string Channel {get;}
/// Order comment.
string Comment {get;}
/// Order expiration time.
DateTime? ExpirationTime {get;}
/// Order filled quantity (lots).
double? FilledQuantity {get;}
/// Order filled time.
DateTime? FilledTime {get;}
/// Order filled volume in units.
double? FilledVolumeInUnits {get;}
/// Returns true if order has trailing stop loss.
bool HasTrailingStop {get;}
/// Unique order Id.
long Id {get;}
/// Order label.
string Label {get;}
/// Order type.
HistoricalOrderType OrderType {get;}
/// Unique position Id.
int? PositionId {get;}
/// Order quantity (lots).
double Quantity {get;}
/// Order status.
HistoricalOrderStatus Status {get;}
/// Order stop loss in Price.
double? StopLoss {get;}
/// Order stop loss in Pips.
double? StopLossPips {get;}
/// Trigger method for order's StopLoss
StopTriggerMethod? StopLossTriggerMethod {get;}
/// StopOrder trigger method.
StopTriggerMethod? StopOrderTriggerMethod {get;}
/// Order submitted time.
DateTime SubmittedTime {get;}
/// Order symbol.
Symbol Symbol {get;}
/// Order symbol name.
string SymbolName {get;}
/// Order take profit in Price.
double? TakeProfit {get;}
/// Order take profit in Pips.
double? TakeProfitPips {get;}
/// Order target price
double TargetPrice {get;}
/// Order Trade type (buy or sell)
TradeType TradeType {get;}
/// Order volume in units.
double VolumeInUnits {get;}
}
/// Represents the status of HistoricalOrder.
public enum HistoricalOrderStatus
{
/// Order filled
Filled,
/// Order expired
Expired,
/// Order created
Created,
/// Order accepted
Accepted,
/// Order error
Error,
/// Order cancelled
Cancelled,
}
/// Represents the type of HistoricalOrder.
public enum HistoricalOrderType
{
/// Limit order
Limit,
/// Market order
Market,
/// Market Range order
MarketRange,
/// Market on open order
MarketOnOpen,
/// Stop order
Stop,
/// Stop out order
StopOut,
/// Stop limit order
StopLimit,
/// Stop Loss / Take Profit order
StopLossTakeProfit,
}
/// Provides access to methods of the Historical Orders collection
public interface HistoricalOrders
{
/// Finds historical orders by label.
HistoricalOrder[] FindAll(string label);
/// Finds historical orders by label and symbol name.
HistoricalOrder[] FindAll(string label, string symbolName);
/// Finds historical orders by label, symbol name, and trade type.
HistoricalOrder[] FindAll(string label, string symbolName, TradeType tradeType);
/// Finds a historical order by Id.
HistoricalOrder FindById(int id);
/// Finds last historical order by label.
HistoricalOrder FindLast(string label);
/// Finds last historical order by label and symbol name.
HistoricalOrder FindLast(string label, string symbolName);
/// Finds last historical order by label, symbol name, and trade type.
HistoricalOrder FindLast(string label, string symbolName, TradeType tradeType);
/// Returns count of historical orders.
int Count {get;}
/// Access historical orders by their index.
HistoricalOrder Item {get;}
}
/// Represents the historical trade interface.
public interface HistoricalTrade
{
/// Account balance after the Deal was filled
double Balance {get;}
/// Gets the channel via which the trade was executed in a string format.
string Channel {get;}
/// Gets the closing deal.
Deal ClosingDeal {get;}
/// Gets the unique closing deal identifier.
int ClosingDealId {get;}
/// The execution price of the Closing Deal.
double ClosingPrice {get;}
/// Time of the Closing Deal.
DateTime ClosingTime {get;}
/// The comment.
string Comment {get;}
/// Commission owed.
double Commissions {get;}
/// The VWAP (Volume Weighted Average Price) of the Opening Deals that are closed.
double EntryPrice {get;}
/// Time of the Opening Deal, or the time of the first Opening deal that was closed.
DateTime EntryTime {get;}
/// Profit and loss before swaps and commission
double GrossProfit {get;}
/// The label.
string Label {get;}
/// Profit and loss including swaps and commissions
double NetProfit {get;}
/// Represents the winning or loosing pips
double Pips {get;}
/// Gets the position unique identifier.
int PositionId {get;}
/// The Quantity (in lots) that was closed by the Closing Deal
double Quantity {get;}
/// Swap is the overnight interest rate if any, accrued on the position.
double Swap {get;}
/// Gets the trade symbol.
Symbol Symbol {get;}
/// Gets the symbol name.
string SymbolName {get;}
/// The TradeType of the Opening Deal.
TradeType TradeType {get;}
/// The Volume that was closed by the Closing Deal.
double VolumeInUnits {get;}
[Obsolete("Use SymbolName instead")]
string SymbolCode {get;}
[Obsolete("Use VolumeInUnits instead")]
long Volume {get;}
}
/// Provides access to methods of the historical trades collection
public interface History
{
/// Find all historical trades by the label
HistoricalTrade[] FindAll(string label);
/// Find all historical trades by label, symbol name
HistoricalTrade[] FindAll(string label, string symbolName);
/// Find all historical trades by label, symbol name and trade type
HistoricalTrade[] FindAll(string label, string symbolName, TradeType tradeType);
/// Find HistoricalTrade by closing deal Id.
HistoricalTrade FindByClosingDealId(int closingDealId);
/// Find all historical trades related to a position.
HistoricalTrade[] FindByPositionId(int positionId);
/// Find last historical trade by its label
HistoricalTrade FindLast(string label);
/// Find last historical trade by its label, symbol name
HistoricalTrade FindLast(string label, string symbolName);
/// Find last historical trade by its label, symbol name and trade type
HistoricalTrade FindLast(string label, string symbolName, TradeType tradeType);
/// Total number of historical trades
int Count {get;}
/// Find a historical trade by index
HistoricalTrade Item {get;}
[Obsolete("Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847")]
HistoricalTrade FindLast(string label, Symbol symbol);
[Obsolete("Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847")]
HistoricalTrade FindLast(string label, Symbol symbol, TradeType tradeType);
[Obsolete("Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847")]
HistoricalTrade[] FindAll(string label, Symbol symbol);
[Obsolete("Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847")]
HistoricalTrade[] FindAll(string label, Symbol symbol, TradeType tradeType);
}
/// Describes horizontal position related to an anchor point or a parent element
public enum HorizontalAlignment
{
/// Center horizontal alignment.
Center,
/// Left horizontal alignment.
Left,
/// Right horizontal alignment.
Right,
/// Stretch horizontal alignment.
Stretch,
}
/// Provides data for Plugin Hotkeys handler.
public class HotkeyArgs
{
/// Keyboard key
public Key Key {get;}
/// Modifiers key that was used with the Key
public ModifierKeys Modifiers {get;}
}
/// Provides access to Hotkeys API for plugins.
public interface Hotkeys
{
/// Clears all added hotkeys.
void Clear();
/// Removes an hotkey.
bool Remove(Key key);
/// Removes an hotkey.
bool Remove(Key key, ModifierKeys modifiers);
/// Adds a new hotkey.
bool TryAdd(Key key, Action handler);
/// Adds a new hotkey.
bool TryAdd(Key key, ModifierKeys modifiers, Action handler);
}
/// The Https interface contains the methods necessary for sending HTTP requests.
public interface Http
{
/// Performs a GET request to the specified URI.
HttpResponse Get(Uri uri);
/// Performs a GET request to the specified URI.
HttpResponse Get(string uri);
/// Performs a GET request to the specified URI asynchronously.
void GetAsync(Uri uri, Action callback);
/// Performs a GET request to the specified URI asynchronously.
void GetAsync(string uri, Action callback);
/// Performs a request to the specified URI. The request method depends on the value of the request.Method property.
HttpResponse Send(HttpRequest request);
/// Performs a request to the specified URI. The request method depends on the value of the request.Method property.
void SendAsync(HttpRequest request, Action callback);
}
/// Represents errors that may occur during HTTP request
public sealed class HttpException : Exception
{
}
/// An enumeration of different HTTP Methods.
public enum HttpMethod
{
/// Represents an HTTP GET protocol method.
Get,
/// Represents an HTTP POST protocol method.
Post,
/// Represents an HTTP DELETE protocol method.
Delete,
/// Represents an HTTP PUT protocol method.
Put,
/// Represents the HTTP PATCH protocol method.
Patch,
/// Represents an HTTP HEAD protocol method.
Head,
/// Represents an HTTP OPTIONS protocol method.
Options,
/// Represents an HTTP TRACE protocol method.
Trace,
}
/// The class representing an HTTP request.
public sealed class HttpRequest
{
/// The default class constructor.
public HttpRequest(Uri uri);
/// Gets or sets the request body. If a GET, TRACE, HEAD, CONNECT, and OPTIONS request is performed, the value of this property is ignored.
public string Body {get; set;}
/// Gets the request headers.
public HttpRequestHeaders Headers {get;}
/// Gets or sets the request method. The default value is Get.
public HttpMethod Method {get; set;}
/// Gets or sets the request timeout. The default value is 100,000 milliseconds (100 seconds).
public TimeSpan Timeout {get; set;}
/// Gets or sets the request URI.
public Uri Uri {get;}
/// Gets or sets the request version. The default value is 2.0.
public Version Version {get; set;}
/// Gets or sets the request version policy. The default value is RequestVersionOrLower .
public HttpVersionPolicy VersionPolicy {get; set;}
}
/// The class that represents an HTTP request headers collection.
public sealed class HttpRequestHeaders
{
/// Adds a new header.
public void Add(string name, string value);
/// Returns an enumerator that iterates through HttpRequestHeaders .
public IEnumerator> GetEnumerator();
/// Returns an existing header value.
public string GetValue(string name);
/// Removes an existing header.
public bool Remove(string name);
/// Updates an existing header.
public void Update(string name, string value);
}
/// The class representing an HTTP response.
public sealed class HttpResponse
{
/// Gets the body of the response.
public string Body {get;}
/// Gets the exception thrown when sending HTTP request.
public HttpException Exception {get;}
/// Gets the headers contained in the response.
public HttpResponseHeaders Headers {get;}
/// Gets true if the response is successful, false otherwise.
public bool IsSuccessful {get;}
/// Gets the response status code.
public int StatusCode {get;}
}
/// The class that represents an HTTP response headers collection.
public sealed class HttpResponseHeaders
{
/// Returns an enumerator that iterates through HttpResponseHeaders .
public IEnumerator> GetEnumerator();
/// Returns an existing header value.
public string GetValue(string name);
}
/// An enumeration of different HTTP version policies.
public enum HttpVersionPolicy
{
/// Use the requested version or downgrade to a lower one. This is the default behavior.
RequestVersionOrLower,
/// Use the highest available version, downgrading only to the requested version but not below.
RequestVersionOrHigher,
/// Only use the requested version.
RequestVersionExact,
}
/// Represents the image chart control.
public class Image : ControlBase
{
/// Initializes a new instance of the Image class.
public Image();
/// Gets or sets the source of the image.
public object Source {get; set;}
/// Gets or sets a value that describes how an Image should be stretched to fill the destination rectangle.
public Stretch Stretch {get; set;}
/// Gets or sets a value that indicates how the image is scaled.
public StretchDirection StretchDirection {get; set;}
}
/// Base class for Indicators.
public abstract class Indicator : Algo
{
/// Adds current indicator to chart if not added yet.
public ChartIndicator AddToChart();
/// Calculate the value(s) of indicator for the given index.
public abstract void Calculate(int index);
/// Cancel a Pending Order
public TradeResult CancelPendingOrder(PendingOrder pendingOrder);
/// Cancel a Pending Order in asynchronous execution mode
public TradeOperation CancelPendingOrderAsync(PendingOrder pendingOrder, Action callback);
/// Close a position
public TradeResult ClosePosition(Position position);
/// Close a position
public TradeResult ClosePosition(Position position, long volume);
/// Close a position
public TradeResult ClosePosition(Position position, double volume);
/// Close a position in asynchronous execution mode
public TradeOperation ClosePositionAsync(Position position, Action callback);
/// Close a position in asynchronous execution mode
public TradeOperation ClosePositionAsync(Position position, long volume, Action callback);
/// Close a position in asynchronous execution mode
public TradeOperation ClosePositionAsync(Position position, double volume, Action callback);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Execute a Market Order
public TradeResult ExecuteMarketOrder(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketOrderAsync(TradeType tradeType, string symbolName, double volume, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action callback);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Execute a Market Order
public TradeResult ExecuteMarketRangeOrder(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, StopLossBreakEven stopLossBreakEven, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, double? stopLossPips, double? takeProfitPips, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action callback);
/// Execute a market order in asynchronous execution mode
public TradeOperation ExecuteMarketRangeOrderAsync(TradeType tradeType, string symbolName, double volume, double marketRangePips, double basePrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action callback);
/// Custom initialization for the Indicator. This method is invoked when an indicator is launched.
protected internal void Initialize();
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, long volume);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips);
/// Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, long volume, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action callback);
/// Modify a Pending Order in asynchronous execution mode
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify the volume of a position
public TradeResult ModifyPosition(Position position, double volume);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven);
/// Modify the protection of a position
public TradeResult ModifyPosition(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, double volume, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, ProtectionType? protectionType, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action callback);
/// Modify Position in asynchronous execution mode
public TradeOperation ModifyPositionAsync(Position position, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action callback);
/// Called when Indicator is destroyed.
protected internal void OnDestroy();
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod);
/// Place a Limit Order
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action callback);
/// Place limit order in asynchronous execution mode
public TradeOperation PlaceLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action callback);
///