What are Features?
Features are the fundamental building blocks of MangoLabs strategies. They transform raw market data (price, volume) into actionable signals that your strategies can use to make trading decisions.
Features are Shared Across All Users!
Important: Features in MangoLabs are global and shared by everyone. When you create a feature, it becomes available to all users. Similarly, you can use features created by other users. Popular indicators like RSI_14, MACD_12_26_9, and Bollinger Bands are already available - you don't need to create them yourself!
Think of Features as...
...reusable data transformations that convert raw market information into meaningful indicators. Once created by anyone, a feature can be used by everyone across all their strategies without rebuilding the logic.
The Core Concept
In traditional algorithmic trading, you would write code to calculate indicators like RSI, MACD, or Moving Averages for each strategy. In MangoLabs, you create these indicators once as features, and then reuse them across all your strategies.
Example: RSI Feature
Input (Raw Data):
- Price: $45,230
- Previous prices: $45,100, $44,980, $45,300...
Output (Feature):
- RSI Value: 34.7
- Interpretation: Approaching oversold (potential buy)
Why Use Features?
Reusability
Create once, use everywhere. An RSI feature can be used in 10 different strategies without recalculation.
Performance
Features are calculated once and cached. Your strategies access pre-computed values instantly.
Consistency
All strategies using the same feature get identical calculations, ensuring fair comparisons.
Modularity
Test different indicators by swapping features without rebuilding your entire strategy.
Types of Features
MangoLabs supports three main categories of features:
1. Technical Indicators
Pre-built mathematical formulas that analyze price and volume data:
Momentum Indicators
RSI, MACD, Stochastic, ROC
Trend Indicators
SMA, EMA, Bollinger Bands, ADX
Volume Indicators
OBV, Volume SMA, VWAP
Volatility Indicators
ATR, Bollinger Bands Width
2. Price/Volume Transformations
Simple transformations of raw market data:
- Returns: Percentage price change over a period
- Log Returns: Logarithmic returns for statistical analysis
- Price Differences: Absolute change in price
- Volume Ratios: Current volume vs. average volume
3. AI-Generated Features (Coming Soon)
Machine learning models that detect complex patterns in market data. These features use neural networks to identify non-linear relationships that traditional indicators might miss.
Anatomy of a Feature
Every feature in MangoLabs has the following components:
Name
A unique identifier for the feature (e.g., RSI_14, EMA_50)
Type
The indicator or transformation type (e.g., RSI, Moving Average, Bollinger Bands)
Parameters
Configuration values specific to the indicator:
- Period: Number of candles to look back (e.g., 14 for RSI-14)
- Source: Which price to use (close, open, high, low)
- Method: Calculation method (e.g., SMA vs EMA for moving averages)
Output
The calculated value(s) that your strategy can access:
- Single Value: RSI outputs one value (e.g., 34.7)
- Multiple Values: Bollinger Bands output three values (upper, middle, lower)
Feature Lifecycle
Understanding when and how features are calculated:
- Creation: You define the feature with its parameters
- First Use: When a strategy uses the feature, it's calculated for all historical data
- Caching: Results are stored in the database for fast retrieval
- Real-Time Updates: In paper/live trading, features update with each new candle
- Reuse: Other strategies can use the cached values without recalculation
Performance Tip: Features are calculated once per symbol-timeframe combination. If you backtest 3 strategies on BTCUSDT-1h using the same RSI_14 feature, the calculation only happens once!
Real-World Example
Let's see how features work in a complete trading workflow:
Scenario: Multi-Indicator Strategy
Step 1: Create Features
RSI_14- RSI with 14-period lookbackMACD_12_26_9- MACD with standard parametersBB_20_2- Bollinger Bands (20 period, 2 std dev)
Step 2: Build Strategy
Use visual builder to create logic: Buy when RSI < 30 AND price touches lower Bollinger Band AND MACD is positive
Step 3: Backtest
Run backtest → Features calculated once → Results in 30 seconds
Step 4: Iterate
Create Strategy V2 using the same features but different logic → Instant backtest (features already cached!)