Since Cryptoblizz v2.2.1 you can write your own trigger script conditions. This means you can now set off triggers depending on the output of your script. This is ideal if you for example want to make an integration with external signallers or if you want to trigger on specific conditions not supported by our default trigger settings.

Get started

Check out the folder ‘scriptconditions’ in your Cryptoblizz installation directory to get started with custom conditions. We recommend creating a copy of that file. You can created multiple files in this folder. Those files can be selected in your triggers as a condition.

Script response

The script must set a variable ‘$this->condition_is_met’ to either ‘true’ or ‘false’. If you select the script in a trigger and the script sets ‘$this->condition_is_met’ to true, the trigger will execute.

Framework API

A condition is not meant to create orders, etc. It’s mostly custom logic and returns either true or false. The condition can be used in triggers within Cryptoblizz. You can use functions that are globally available in Cryptoblizz. These functions are documented on the algorithm API documentation page.

Did this article answer your question?