Mind
  • 👋Introduction
    • 🧠What is the Mind language?
  • 👟Getting Started With Mindtrade
    • 📈What is MindTrade?
    • 🤯What can I do with Mindtrade?
    • 🏗️Program structure
      • 🧱Program Components
      • 📀What is a Node?
        • ▶️Start Node
        • ⚙️Action Node
        • ❓Conditional Node
        • 🔚Output Node
      • 🔄Execution Flow
    • 👷‍♀️How to Create a Program?
      • 🔧Creating Projects
      • ✂️Editing Programs
        • ✨Chat to Program
      • ⚡Executing programs
    • 🗃️Templates
    • 🤫Secrets
  • ❓Nodes Details
    • 🔄Execution Control Nodes
      • Start node
      • Conditional node
      • Output Node
    • ⚙️Action Nodes
      • ☘️Common
        • Addition
        • Subtraction
        • Multiplication
        • Division
        • Power
        • Absolute Value
        • Random integer
        • Print Output
        • Print String
        • Wait
      • 💰Crypto
        • ⛓️On-chain
          • 🌐EVM
            • EVM Wallet
            • Get EVM Coin Balance
            • Send EVM Coin
            • 💲ERC20
              • Get ERC20 Allowance
              • ERC20 Approve
              • ERC20 Balance Of
              • ERC20 Total Supply
              • ERC20 Transfer
              • ERC20 Transfer From
              • Check balance and send
              • Send ERC20 USD Value
            • 💱Uniswap V2 DEX
              • UniV2 - Swap Tokens for Tokens
              • UniV2 - Buy Tokens for ETH
              • UniV2 - Sell Tokens For ETH
              • UniV2 - Limit Buy
              • UniV2 - Limit Sell
              • UniV2 - Catch Next Trade
              • UniV2 - Copy Trading
              • UniV2 - Get Token Bought in Trade
              • UniV2 - Get Token Sold in Trade
              • UniV2 - DCA With Coin
              • UniV2 - DCA With USDT
              • UniV2 - DCA Portfolio With Rebalancing
              • UniV2 - Get Price
              • UniV2 - Get Price Impact
              • UniV2 - Get Price Variation Percentage
              • UniV2 - Add LP ETH
              • UniV2 - Add LP Token
              • UniV2 - Remove LP ETH
              • UniV2 - Remove LP Token
              • Buy And Send ERC20 USD value
              • 📊Technical analysis
                • UniV2 - Get OHLCV Candles
                • UniV2 - Buy on Indicator Signal
                • UniV2 - Sell on indicator signal
          • ☀️Solana
            • Solana Wallet
            • Get SOL Balance
            • Send SOL
            • 💲SPL
              • Get SPL balance
              • Send SPL Token
            • 💱Jupiter DEX
              • Solana Get Token Price in USD
              • Solana Get Token Price
              • Solana Swap Tokens Jupiter
              • Solana Limit Order Jupiter
              • Solana - DCA With SOL
              • Solana - DCA with USDC
        • 💹CEX
          • CEX Instance
          • CEX Create Limit Buy Order
          • CEX Create Limit Sell Order
          • CEX Create Market Buy Order
          • CEX Create Market Sell Order
          • CEX Create Stop Limit Buy Order
          • CEX Create Stop Limit Sell Order
          • CEX Create Stop Market Buy Order
          • CEX Create Stop Market Sell Order
          • CEX Cancel Order
          • Cex cancel all orders
          • CEX DCA
          • CEX DCA portfolio with rebalancing
          • CEX Fetch Current Ask
          • CEX Fetch Current Ask Volume
          • CEX Fetch Current Bid
          • CEX Fetch Current Bid Volume
          • CEX Fetch Free Balance
          • CEX Fetch Total Balance
          • CEX Fetch Used Balance
          • CEX Get Price Variation Percentage
          • 📊Technical analysis
            • CEX - Get OHLCV Candles
            • CEX - Buy on indicator signal
            • CEX - Sell on indicator signal
        • 📊Technical analysis
          • Technical Analysis
          • Check indicator latest signal
      • 🫂Social
  • 🔠OBJECT TYPES
    • Introduction
    • Types
      • Secret
      • CryptoExchangeOrder
      • ExchangeType
      • CryptoExchangeTimeframe
      • CryptoExhange
      • BlockchainName
      • EVMAddress
      • EVMPrivateKey
      • EVMTransaction
      • EVMWallet
      • UniswapV2Trade
      • OHLCV
      • IndicatorName
      • OperatorType
      • IndicatorData
      • SolanaAddress
      • SolanaPrivateKey
      • SolanaTransaction
      • SolanaWallet
Powered by GitBook
On this page
  • Characteristics
  • How to Use a Conditional Node: A Practical Example

Was this helpful?

  1. Getting Started With Mindtrade
  2. Program structure
  3. What is a Node?

Conditional Node

PreviousAction NodeNextOutput Node

Last updated 11 months ago

Was this helpful?

The Conditional Node is a crucial component in the MindTrade platform, enabling dynamic decision-making within the trading bot's workflow. It evaluates specific conditions or criteria and directs the flow of execution based on the results of this evaluation.

Characteristics

  • Evaluating Conditions: A Conditional Node checks certain conditions and determines the path of execution based on whether these conditions are met or not.

  • Branching Logic: Depending on the outcome of the condition evaluation, the node can direct the execution towards different subsequent nodes, effectively allowing the bot to respond adaptively to various scenarios.

How to Use a Conditional Node: A Practical Example

Let's begin by adding a Conditional Node to the canvas. Initially, its condition will be empty, so you'll see an "Add Operand" button. Let's click on it!

Then, the input selection panel will appear. Here, like with any other node, you can choose the input source. You have the options to take the input from another node's output, enter a handwritten (static) value, or select from a secret.

We selected "Node" because we want to use the output from the "Get Price" node to check if the price of WETH is greater than a specific amount.

Then, select the "greater" operator to check if the output from the "Get Price" node is greater than a specified amount.

In the last box, enter the static value that you want to compare against, specifying the amount that the price should be greater than.

Done! As you can see, the condition set within the Conditional Node now states "if the price of WETH is more than 4000."

What if we want to say "if the price of WETH is more than 4000 AND the ETH balance of a wallet is more than 10"? Let's add a "Get EVM Coin Balance" node first!

Then click on "+ Add condition" to add a new condition.

An "AND/OR" button will appear, allowing you to specify "if this AND/OR that."

Then, as before, select the output of the "Get EVM Coin Balance" node and check if its output is greater than 10.

Done! You are now able to check "if the price of WETH is more than 4000 and the ETH balance of a certain wallet is more than 10"

👟
🏗️
📀
❓