IndicatorContext

IndicatorContext is the object passed to Haasbot's indicator scripts when retrieving the indicator result or chart data. The IndicatorContext contains details on the bot-configuration, current and historical price info and references to the API-objects.

Interface

public decimal CurrentTradeAmount { get; private set; }
public string ExchangePlatform { get; private set; }
public string PrimaryCurrencyCode { get; private set; }
public string SecondaryCurrencyCode { get; private set; }
public CoinPosition CurrentPosition { get; private set; }
public PriceTick CurrentPrice { get; private set; }
public IndicatorLog Logger { get; private set; }
public IIndicatorAPI API { get; private set; }
public PriceInstrument PriceHistory { get; private set; }

CurrentTradeAmount

Amount (in primary currency) the bot is configured to trade with.

ExchangePlatform

Name of the exchange platform the bot is trading on. This can be used as input for the IndicatorAPI methods.

PrimaryCurrencyCode

Currency code of the primary currency (for example "BTC").

SecondaryCurrencyCode

Currency code of the secondary currency (for example "USD").

CurrentPosition

Current bot position (Bought or Sold).

CurrentPrice

The current price of the currency pair on the configured platform. Contains info on Bid, Ask, Volume, Open, Close and a timestamp.

Logger

Gives access to logging-features.

API

Gives access to historical price info on all supported currency pair and platforms.

PriceHistory

Contains arrays of doubles with historical price info (Asks, Bids, High, Low, Volume). These arrays can directly be used as input for the TA-Lib functions. The maximum size of the array is defined by the property PriceHistoryLimit‚Äč