This script is a combination of two. Firstly a trend is identified as up down or sideways. Higher highs and higher lows makes for an uptrend, lower highs and lower lows similarly allows for a downtrend to be registered. Users can adjust the number of bars to include for detection of the pivot points to increase the accuracy of trend changes but this significantly reduces signals. Sideways movement is determined if the average candle price is within a variance of a short SMA. The SMA follows the close of each candle going back 6 candles by default. The variance is 1% by default so if the price is within 1% of the SMA it's considered sideways and no entries can be issued in this condition.
The indicator is designed to identify the trend for longing or shorting, and then provides the entries based on stochastics converging or diverging (not crosses). The convergence and divergence of stochastics is amalgamated into a short EMA which also has length 6 and can be tuned by the user.
The default values of this script best work on 1h and 2h timeframes for specific pairs like BTCUSD. For other time frames and pairs the settings will need to be tweaked but is possible to identify specific parameters for many different pairs and time frames.
I've written several scripts for personal use however this is my first published script so please use at your own risk! It's not perfect!