Integrating Indicators
Developed a custom indicator on TradingView and wish to backtest it? Bonsai BX is your solution. Use your indicator outputs as inputs for the Bonsai BX backtester.
This is needed especially if your indicators display signals as shapes on the chart, which are not directly usable as sources for other indicators or strategies on TradingView.
Step-by-Step Guide:
Access Pine Script Editor. Open your Pine Script editor on TradingView and select your custom indicator.
Modify Your Script. Append this code at the end of your script:
Replace
long_condition
andshort_condition
with the variable names in your script that signal the long and short conditions.Change
"Your_Long_Condition"
and"Your_Short_Condition"
to preferred names for your long and short signals.
Attach to Your Chart. Add this modified indicator script to your TradingView chart, along with the Bonsai BX (Backtester).
Configure Bonsai BX Settings. In Bonsai BX settings, locate the "Quick Sources 🌳" section and input your newly named signals.
Outcome: By following these steps, your custom TradingView indicators will effectively feed into Bonsai BX, allowing for comprehensive backtesting of your strategies.
Last updated