Hi all, here is the latest version of the script:
NEW USER INPUTS SETTINGS
- High volatility filter: (previously, “Enable Volatility Parameter”) filters out signals when volatility is high / when bands turn red.
- Low volatility filter: (new) filters out signals when volatility is low / when bands turn green
- Risk Reward: increase take profit size
- Alert Messages: Designed for 3Commas users to simply copy/paste "Messages" from their bots using TradingView custom signals (see tooltip). Otherwise, input any messages and/or {{placeholders}} you like!
OTHER IMPROVEMENTS
- Stops and target are now using the ATR and a multiplier of the ATR to calculate top loss and take profits distances.
- Trailing stop were improved, allowing tighter fits through more options.
- The strategy is now in Pinescript V5.
- Use of the strategy function parameter: calc_on_order_fills = TRUE
If left FALSE, Strategy’s alerts would only fire upon bar closed. It’s ok for trade entries (upon bar close), but problematic for stop losses & take profits (anytime).
Therefore, “calc_on_order_fills” was set to TRUES. Hence, Strategy tester display: “Caution!
This strategy may use look-ahead bias, which can lead to unrealistically profitable results”. Here, this warning is irrelevant.
Overall, the whole script and user settings were cleaned up, making it more readable and editable.
As always, hope you enjoy!