Rank Docs
  • Introduction and Mission
    • Introduction
      • Mission
  • Platform Features
    • Strats: Trustless Strategy Vaults
    • Strat Metadata
      • Parameters
      • Strats Concept
      • Functions
      • Position Data
      • Proportional Stake
      • Performance Tracking & Rankings
      • Fees
      • Types
    • AI-Powered Forward Testing Infrastructure
    • Strat Example 1 (IF Single Condition Execution)
    • Strat Example 2 (AND Multi Condition Execution)
    • Strat Example 3 (OR Multi Condition Execution)
    • Benefits
    • Beyond Copy Trading
    • AI Agents
    • API Integration for Existing Strategies
  • RANK Token and Governance
    • RAN Token Details
      • Minting
      • Token Swap
      • Development
    • Governance & DAO Evolution
    • Conclusion: The Future of Decentralized Trading
  • Team
    • Team
  • Social Links
    • X (Twitter)
    • Telegram
Powered by GitBook
On this page
  1. Platform Features

Strat Example 2 (AND Multi Condition Execution)

PreviousStrat Example 1 (IF Single Condition Execution)NextStrat Example 3 (OR Multi Condition Execution)

Last updated 6 days ago

EMA Crossover with MACD Confirmation

This example showcases how Rank enables complex "double if" conditional logic, where multiple technical indicators must align before trade execution.

Strategy Logic

Entry Condition (Double IF Statement):

  • IF EMA1 crosses above EMA2

  • AND IF MACD is rising

  • THEN Execute buy order

Exit Condition:

  • IF EMA1 crosses below EMA2

  • AND IF MACD is falling

  • THEN Execute sell order

Why Double Conditions Matter

Single Indicator Weakness:

  • EMA crossovers alone generate frequent false signals

  • MACD alone may lag during rapid price movements

  • Individual indicators prone to whipsaw in ranging markets

Combined Strength:

  • Dual confirmation filters out weak signals

  • Trend alignment (EMA) plus momentum confirmation (MACD)

  • Significantly reduced false positive rate

  • Higher probability trades with better risk/reward

Execution Flow

  1. Continuous Monitoring: Strategy checks both conditions every block

  2. Signal Validation: Both conditions must be TRUE simultaneously

  3. Order Execution: Market buy/sell triggered only on dual confirmation

  4. Position Management: Hold until opposite double condition met

Real-World Application

Market Scenario: ETH/USDT trending upward

  • EMA1 crosses above EMA2 at $2,400

  • MACD turns positive confirming momentum

  • Strategy buys ETH with deposited USDT

  • Holds position until bearish double condition triggers exit

No-Code Implementation

Through Rank's visual builder:

  • Select EMA indicator, configure periods (e.g., 9 and 21)

  • Add MACD indicator with standard settings (12, 26, 9)

  • Connect with AND logic gate

  • Set execution parameters (position size, slippage tolerance)

  • Deploy without writing a single line of code

This double condition approach exemplifies how sophisticated algorithmic strategies become accessible to non-programmers, democratizing quantitative trading through intuitive interfaces while maintaining professional execution standards.