5️⃣Converting a Strategy > Indicator so you can "Connect"
This section covers how to convert your own strategy or indicator into a host script usable with the Greedy Bastard Risk Management Buddy.
⚠️THIS SECTION IS FOR ADVANCED USERS ONLY:
You need to make sure the Tradingview Script you want to use is in the form of an Indicator, (not a strategy) and Pine Version 5. If you are going to use a Strategy you will need to convert it into an Indicator.
You can convert any indicator to version 5 in the Pine Editor on the right side settings, and convert a strategy to an indicator. (If you don't know how, Youtube it, or DM us on Tradingview or send a support message at GreedyBastard.io )
Replace the word "strategy" with "indicator" in the pine script.
Connect your desired script to the Greedy Bastard Risk Management Buddy Strategy using this snippet of code. (⚠️If you don't know how to set this up or add this code to your indicator, contact us on Discord or at support for a quote.)
// /////////////////////////// SIGNAL FOR STRATEGY ///////////////////////
//-- ADD THIS SNIPPET TO THE BOTTOM OF YOUR HOST SCRIPT and add your buy and sell conditions variable
buy = ?
sell = ?
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title="🔌Connector🔌", display = display.data_window)
// ////////////////////////////////////////////////////////////////////////
Add the Host Connection Snippet to the very bottom of your script
Replace the ( ? ) in the Buy = ? and Sell = ? variables with the Plotting Signal Conditions of your script.
⚠️(This is just an example, not necessarily the actual variables you will replace the ? with.)
Remember that your snippet is making the Plotting Signal Conditions now for the Greedy Bastard Risk Management Buddy Strategy. So you will need to “comment out” (CTRL /) the Plotting Signal Conditions in the original script.
(You can also DM to ask us to do it for you for a small reasonable fee.)
Last updated