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.


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; }


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


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


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


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


Current bot position (Bought or Sold).


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


Gives access to logging-features.


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


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‚Äč