DCA
π Standard Deviation DCA Strategy
Automated position building using statistical price bands
A smart accumulation algorithm that executes buy/sell orders when price deviates significantly from its mean, with flexible order sizing and LIFO profit-taking options.
βοΈ Core Parameters
Amount
5000
Target token volume
Order_size_min
50
Base order size (in tokens)
Price_Low
2
Lower price boundary
Price_High
4
Upper price boundary
Period
1d
Order triggering frequency
Window_Size
21
Candles for mean/std calculation
Buy_Threshold
3
Buy when price < (mean - 3Ο)
Sell_Threshold
2
Sell when price > (mean + 2Ο)
π Order Sizing Modes
1. Classic
Fixed-size orders:
Order_size_mintokens per trade
2. Martingale
Order size increases exponentially from
Price_HightoPrice_Low
3. Logarithmic
Calculated per:
Where:
S= Order_size_minM= Multiplier (e.g., 1.05)n= Trade count
π Example: Buying TON with SD-DCA
Setup:
Mean price: 3.00,Ο=3.00,Ο=0.20
Buy trigger: 3.00β(3Γ3.00β(3Γ0.20) = $2.40
Log mode: M=1.05, S=50 TON
Execution:
Trade #1 at $2.40:
Size = 50 Γ (1 + 1.05Γln(1)) = 50 TON
Trade #5 at $2.20:
Size = 50 Γ (1 + 1.05Γln(5)) = 131 TON
LIFO Selling:
If price rebounds to $2.80 (mean + 2Ο):
Sells most recent buy first
π Key Features
β Statistical edge - Buys at statistically "low" prices β Flexible scaling - Choose risk profile via order sizing β Auto-profit taking - LIFO selling locks gains
π‘ Risk Controls
β Price boundaries prevent extreme executions β Configurable Ο thresholds adjust sensitivity β Real-time PnL tracking
π Performance Tracking
Realized PnL per closed position
Net average entry price
Missed signal diagnostics
π₯ Ideal For:
Accumulating during market dips
Mean-reversion strategies
Last updated
