Grid Bot [Grid range plugin] Two Moving Avarages [psyll]
Category: volatility, trend
Calculates dynamic grid boundaries for grid-based trading strategies based on the average and standard deviation of two moving averages.
Formula
\text{Base} = \frac{MA_1(src, len_1) + MA_2(src, len_2)}{2} \\ \text{Deviation} = \text{std\_dev}(\text{Base}, len_{slow}) \times \text{mult} \\ \text{Grid High} = \text{Base} + \text{Deviation} + \text{Offset} \\ \text{Grid Low} = \text{Base} - \text{Deviation} - \text{Offset} \text{ (with clamping for min/max width)}
Inputs
- ma_type (default: SMA)
- fastLength (default: 10)
- slowLength (default: 20)
- deviations (default: 2.0)
- offset (default: 1.0)
- tf_no_repaint_security (default: true)
See signal primitives and every published strategy that uses Grid Bot [Grid range plugin] Two Moving Avarages [psyll] on WOBR StrategyVerse.