Available translations

LF Trading Bot - Exchange Data Structure

foundations.png
Summary: You may use this Javascript object when you want to specify a Crypto Exchange which is different from the Default Exchange. Then you may, for example, access data from Coinbase Pro from a Trading Session running on Binance.
Structure
  • The root of the object is...
 exchange
  • Then, you must specify the codeName of a Crypto Exchange, for instance...
 biance, bitfinex, coinbasepro... etc.
Examples
 exchange.poloniex.market.ETH.BTC.chart.at01min.support.support5Rate
 exchange.bitfinex.market.BTC.USDT.chart.at05min.candle.open
 exchange.binance.market.ETH.USDT.chart.at24hs.bollingerBand.movingAverage
Formula Example
As you can see in the following example, you may have a mix of chart, market and exchange usage within the same Formula or Condition.
 chart.at01min.support.support5Rate + 
exchange.poloniex.market.ETH.USDT.chart.at05min.candle.close
Foundations->Concept->Dependency Filter->Explanation
What is the Dependency Filter?
The Dependency Filter is a mechanism that analyzes the code of all conditions, formulas and Study Bots in order to get from the code which data dependencies need to be loaded at the bot once ran. The procedure scans every line of code in search for the exchange, market or chart objects and once it finds them, it then breaks it down to understand which product will be needed for the bot. These filters are needed in order to prevent the bot to load all dependency files at all time frames when at the code many of these files are evidently not used.
A Dependency Filter is a list of Indicators and Studies a Strategy depends on, that is later used to filter out all the other indicators and studies the Trading Bot depends on.
The function will scan a node branch, most likely a Trading System, looking into the code property of each node. It will analyze it's content and try to make a list of all indicators and studies mentioned at the code text and at which time frames they are mentioned.
It is important to note that all nodes that are not of the type Procedure Javascript, Javascript Code or Formula are going to be ignored.
Examples
These are instructions that the Dependency Filter will recognize without any problems:
market.BTC.USDT.chart.at01hs.popularSMA.sma200 - market.ETC.USDT.chart.at01hs.popularSMA.sma100 < 10
If you removed spaces between instructions then the Dependency Filter might get confused and you will get an undefined value for the indicator you are trying to use.
Advance Use
Inside a commented area of the code you can write something like this:
market.anyBaseAsset.BTC.chart.atAnyTimeFrame.candle
The valid keyworks are:
anyBaseAsset
anyQuotedAsset
atAnyTimeFrame
Previous
LF Trading Bot - Market Data Structure

LF Trading Bot Available Data Structures — TOC

You just read page 3 in the topic.

1. LF Trading Bot - Chart Data Structure

2. LF Trading Bot - Market Data Structure

3. LF Trading Bot - Exchange Data Structure