This buy/sell strategy is true when the fast indicator crosses below the slow indicator(or static value). But on the previous candle, fast indicator should have been above slow indicator(or static value).
This indicator can be used to check if any 2 lines cross each other. You can use any of the supported ProfitTrailer indicators and the strategy will turn true when the lines cross.
Whatever value is allowed for the fast/slow indicator chosen
# Buy when MACD Line crosses OVER the MACD Signal line
DEFAULT_D_buy_strategy_label = 1h_MACDLCROSS
DEFAULT_D_buy_strategy = CROSSOVER
# Sell when MACD Line crosses UNDER the MACD Signal line
DEFAULT_D_sell_strategy_label = 1h_MACDLCROSS
DEFAULT_D_sell_strategy = CROSSUNDER
# Buy when MACD Line crosses OVER the MACD Signal line
DEFAULT_DCA_D_buy_strategy_label = 1h_MACDLCROSS
DEFAULT_DCA_D_buy_strategy = CROSSOVER
# Sell when MACD Line crosses UNDER the MACD Signal line
DEFAULT_DCA_D_sell_strategy_label = 1h_MACDLCROSS
DEFAULT_DCA_D_sell_strategy = CROSSUNDER
1h_MACDSL_candle_period = 3600
1h_MACDSL_fast_Length = 12
1h_MACDSL_slow_Length = 26
1h_MACDSL_signal = 9
1h_MACDSL_return_value = SIGNALLINE
1h_MACDL_candle_period = 3600
1h_MACDL_fast_Length = 12
1h_MACDL_slow_Length = 26
1h_MACDL_signal = 9
1h_MACDL_return_value = MACDLINE
1h_MACDLCROSS_fast_indicator_label = 1h_MACDL
1h_MACDLCROSS_fast_indicator = MACD
1h_MACDLCROSS_slow_indicator_label = 1h_MACDSL
1h_MACDLCROSS_slow_indicator = MACD
# Buy when SMA % value crosses below 1.5
DEFAULT_D_buy_strategy_label = MYSMACROSS
DEFAULT_D_buy_strategy = CROSSUNDER
DEFAULT_D_buy_value = 1.5
# Sell when SMA % value crosses below -0.5
DEFAULT_DCA_D_sell_strategy_label = MYSMACROSS
DEFAULT_DCA_D_sell_strategy = CROSSUNDER
DEFAULT_DCA_D_sell_value = -0.5
SMA_candle_period = 300
SMA_length = 10
SMA_return_value = PERCENTAGE
MYSMACROSS_fast_indicator_label = SMA
MYSMACROSS_fast_indicator = SMALINE
Make sure to setup your indicators like you normally would in ProfitTrailer. After you can use this indicator to check for a cross under.
When doing a cross of 2 (X)MA lines make sure to use the ACTUAL value when comparing to TradingView