๐Ÿ”—Dependencies

Dependencies are an extremely valuable tool available at Tradetomato. The module builder allows you to create multiple modules linked together using dependency-based logic. A linked module will always have a minimum of one dependency on another module. This is what we refer to as an algorithm at Tradetomato.

A dependency is a rule relating to the state or actions taken by another module. For example, imagine you are creating a strategy using Bitcoin as a general indicator for the rest of the crypto market. There are multiple ways to go about this. You could create a module that trades Bitcoin and then create one or more linked modules trading altcoin pairs with the dependency they may buy when the Bitcoin module is in position.

The image above is a visual representation of an example dependency between Modules 1 & 2.

[IF] Module 1 [IS] [IN POSITION], [THEN] Module 2 [CAN BUY].

Adding Dependencies

Setting up a dependency is very simple. Navigate to your module overview and click 'Add dependency.'

Next, select the module you want the dependency to be on. This means that your current module will be dependent on the action or state of the module you select.

If your module has more than one position, specify if you want to create a dependency on that module's main position or sub-position.

Now, define the action or state by which the dependency will be triggered.

Currently, you can choose from the following options:

  • Position status: Evaluated based on a moduleโ€™s position status (in position or not in position).

  • Buy orders in position: Evaluated based on a module's number of buy orders.

  • % Total exposure in position: Evaluated based on a moduleโ€™s current total exposure.

  • Position buy evaluation: Evaluated based on whether a moduleโ€™s buy conditions are met.

  • Position sell evaluation: Evaluated based on whether a moduleโ€™s sell conditions are met.

With your dependency type selected, configure the settings of your dependency, selecting the โ€˜Operatorโ€™, the โ€˜Valueโ€™ of the operator, and the 'Output Type'. These are the requirements that must be met when your dependency is evaluated. Operator: Describes the requirements that will be evaluated. Value: Specifies the dependency requirements that will be evaluated. Output type: Specifies how often a dependency is evaluated. 'State' will evaluate the dependency based on your current moduleโ€™s timeframe settings. While 'Trigger' will evaluate as soon as itโ€™s triggered by your specified action.

You will also see a visual representation of your dependency and its settings. Finally, click on โ€˜Saveโ€™ to add the dependency.

If youโ€™d like to add more dependencies to your module, you can do so by adding an โ€˜ANDโ€™ or โ€˜ORโ€™ dependency from the module overview.

Dependencies can be added to both the Buy and Sell components of your module. This means that if you add a dependency to the Buy side, your module can only buy if the dependency is fulfilled and your buy conditions are met. Conversely, if you add a dependency to the sell side, your module will only sell if the dependency is fulfilled and sell conditions are met.

In the future, there will be many different types of modules and dependencies, allowing you to use a range of outputs as dependencies between modules

Last updated