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
  • Nodes
  • Edges

Was this helpful?

  1. Getting Started With Mindtrade
  2. Program structure

Program Components

PreviousProgram structureNextWhat is a Node?

Last updated 9 months ago

Was this helpful?

Nodes

Nodes are the building blocks that compose the graph/program. Each node encapsulates a functionality and executes it when it is reached during the execution flow. See section for more detailed information.

Edges

Edges are the links between consecutive nodes in the graph. An edge between node A and node B means "execute node A, then proceed to node B". Inside MindTrade program graphs, most of the nodes will have exactly one ingoing edge and one outgoing edge, with the following exceptions:

  • Start Node: start nodes will always have no ingoing edges and one outgoing edge. This is because they represent the starting point of the execution, so no node will ever be executed before the Start Node.

  • Conditional node: conditional nodes are the only type of node that always have two outgoing edges. The reason is that conditional nodes control the execution flow based on the evaluation of a condition: if the condition is true, the execution will follow the first outgoing edge; otherwise, it will follow the second outgoing edge.

  • Output Node: output nodes will always have one ingoing edge and no outgoing edge. This is because they represent the termination of the execution, so no node will ever be executed after the Output Node.

  • Final nodes: when an Output Node is not present, any node can be placed at the end of the graph and it will mark the termination of the execution. Thus, it will have no outgoing edges.

  • Cycles: cycles are allowed in graphs. A cycle is present when a node has an outgoing edge that points to a previous node; this capability is useful to be able to repeat the same actions multiple times (e.g. until a certain condition is met). This entails that any node can have more than one ingoing edge.

👟
🏗️
🧱
what is a node?
This is a complete working program. Once the Random Integer node is executes, the program terminates, even if there is no output node.
This program creates a limit buy order on Uniswap V2. The cycle is needed to keep fetching the price every 30 seconds until it becomes lower than 3000.