Custom Containers
Last updated
Last updated
The build in container command are super easy to use but if we want to have a bit more flexibility and creativity in our script we need to break them apart.
The trade bot container is very simple. If the safety result is true. Execute DoExitPosition(), if false and insurance result is true, execute DoSignal() with the insurance result. If we write this down we get this
The SafetyContainer only does 1 things. If any of the inputs is true, return true. We can recreate this with a single command. The Or command.
The IndicatorContainer is a collection of 2 command. The GetUnanimousSignal & GetConsensusSignal. We can use the one we please.
The InsuranceContainer also only does 1 things like the SafetyContainer but a little differently. Instead of any of the value, all of the values need to be true before it returns true. We can use the And command for that.