This buy/sell strategy is true when the BBWIDTH is < the buy_value
or >= the sell_value
.
Use TradingView to visualize this indicator.
View on Tradingview
BB_std
BB_candle_period
BB_length
# Buy zone begins when BBWIDTH is less than 0.4.
DEFAULT_A_buy_strategy = BBWIDTH
DEFAULT_A_buy_value = 0.4
# Sell zone begins when BBWIDTH is greater than 0.7.
DEFAULT_A_sell_strategy = BBWIDTH
DEFAULT_A_sell_value = 0.7
# Buy zone begins when BBWIDTH is less than 0.4.
DEFAULT_DCA_A_buy_strategy = BBWIDTH
DEFAULT_DCA_A_buy_value = 0.4
# True when BBWIDTH is less than 0.5.
DEFAULT_DCA_A_buy_strategy = BBWIDTH
DEFAULT_DCA_A_buy_value = 0.5
# Sell zone begins when BBWIDTH is greater than 0.7.
DEFAULT_DCA_A_sell_strategy = BBWIDTH
DEFAULT_DCA_A_sell_value = 0.7
BB_std = 2
BB_candle_period = 1800
BB_length = 20
If you use
buy or sell_value_limit
the strategy can only be true between the buy/sell value and the limit (unless it is trailing).