# Strat Example 2 (AND Multi Condition Execution)

### 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.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd8nrhG_tWs1FBHzDwfMLqatdAbHsekJXECcW7fO5_h7gviJljiS-EcvSLb02mQ9F23tcWPdRrE473MXr75m0OZYAliCl5Rh10cfgUiSsCbvdU8XdEsAE6U_K3k_VOLHP2Ds8kt9Pg8szYHco_d8wU6htZT?key=Jm-GCny7ZKi5W-N-LzqWRA" alt=""><figcaption></figcaption></figure>

#### 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.
