🚦How to modify the indicator to work with CDZV Toolkit

Code Zero Visual Trading for TradingView

circle-info

For modification the indicator must be written in pine-script version 5

//@version=5

To integrate with CDZV Toolkit, you can use TradingView indicators that display information using the plotarrow-up-right function.

All other indicators that are open source can be easily modified.

CDZV Toolkit processes two types of input information from indicators:

  1. Numeric values (price, volume and any other floating point numeric value).

  2. Signal (this is also a numeric value, but it is limited: 0 - no signal or 1 - signal is present).

These values can be sent from the indicator using the PineScript plot() function with the parameter display = display.data_window. This parameter indicates that we do not draw anything on the plot, but will be available to the CDZV Toolkit.

Examples:

1️⃣ The indicator draws BUY/SELL labels on the chart or sends alerts. We need to pass them to Condition Manager as signals. https://www.tradingview.com/script/lSHzm9zV-CM-I-RideTheWave7/arrow-up-right

// Here the original indicator draws the inscriptions
plotshape(buySignalk[1] and showsignalsk and O1[1] > K2 ? AlphaTrend[2] * 0.9999 : na, title='LONG', text='LONG', location=location.absolute, style=shape.labelup, size=size.tiny, color=color.new(#0022FC, 0), textcolor=color.new(color.white, 0))
plotshape(sellSignalk[1] and showsignalsk and O2[1] > K1 ? AlphaTrend[2] * 1.0001 : na, title='SHORT', text='SHORT', location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.new(color.maroon, 0), textcolor=color.new(color.white, 0))

// Here the original indicator sends alerts
alertcondition(buySignalk[1] and O1[1] > K2, title='Confirmed BUY Alarm', message='BUY SIGNAL APPROVED!')
alertcondition(sellSignalk[1] and O2[1] > K1, title='Confirmed SELL Alarm', message='SELL SIGNAL APPROVED!')

Make modifications to the indicator code:

Result:

2️⃣ The indicator draws fractals/pivots on the chart. It is necessary to transfer their price to CDZV Toolkit. https://www.tradingview.com/script/1yk1pUCb-CM-I-Williams-Fractals/arrow-up-right

add the code that passes the price to CDZV Toolkit:

Result:

3️⃣ The indicator draws an oscillator that changes its color and it is necessary to transmit signals when the oscillator is GREEN or RED. https://www.tradingview.com/script/JUK476pQ-CM-I-Schaff-Trend-Cycle-STC/arrow-up-right

and below that add logic that will send a GREEN/RED signal

Result:

Last updated