How to tradingview buy sell indicator converter?

Created at 18 Oct 2022, 15:53
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
OM

omurcaliyim

Joined 30.09.2022

How to tradingview buy sell indicator converter?
18 Oct 2022, 15:53


Hi guys, how can we convert a buy and sell indicator in tradingview? Or can someone convert it?

 

study("RSI Buy and Sell Alert", overlay=true)

myPeriod = input(defval=14, type=integer, title="Period")

myThresholdUp = input(defval=70, type=float, title="Upper Threshold")

myThresholdDn = input(defval=30, type=float, title="Lower Threshold")

myAlgoFlipToggle = input(defval=false, type=bool, title="Imverse Algorthim")

myLineToggle = input(defval=true, type=bool, title="Show Lines")

myLabelToggle = input(defval=true, type=bool, title="Show Labels")

myRSI=rsi(close, myPeriod)

buy = myAlgoFlipToggle ? falling(myRSI,1) and cross(myRSI, myThresholdDn) : rising(myRSI, 1) and cross(myRSI,myThresholdUp)

sell = myAlgoFlipToggle ? rising(myRSI, 1) and cross(myRSI,myThresholdUp) : falling(myRSI,1) and cross(myRSI, myThresholdDn)

myPosition = buy==1 ? 0 : sell==1 or myPosition[1]==1 ? 1 : 0

trendColor = buy ? red : sell ? green : na

 

barcolor(myPosition[1]==1 ? red : myPosition[1]==0 ? green : na)

 

plot(myLineToggle ? buy and myPosition[1]==1 ? low - 0.004: sell and myPosition[1]==0 ? high + 0.004 : na : na, color=trendColor, style=line, linewidth=4, editable=true)

 

plotshape(myLabelToggle ? buy and myPosition[1]==1 ? low - 0.005 : na : na, title="BUY", style=shape.labelup,  size=size.normal, location=location.absolute, text="Buy", transp=0, textcolor = white, color=green, editable=false)

plotshape(myLabelToggle ? sell and myPosition[1]==0 ? high + 0.005 : na : na, title="SELL",  style=shape.labeldown,  size=size.normal, location=location.absolute, text="Sell", transp=0, textcolor = white, color=red, editable=false)



 

// === /PLOTTING ===

// Send alert to TV alarm sub-system

alertcondition(myLabelToggle ? sell and myPosition[1]==0 ? high + 0.005 : na : na,title="Sell",message="Sell")

alertcondition(myLabelToggle ? buy and myPosition[1]==1 ? low - 0.005 : na : na,title="BuY",message="Buy")

alertcondition(myLabelToggle ? buy and myPosition[1]==1 ? low - 0.005 : na : na,title="BuY",message="Buy")

alertcondition(myLabelToggle ? buy and myPosition[1]==1 ? low - 0.005 : na : na,title="BuY",message="Buy")





 


@omurcaliyim
Replies

PanagiotisChar
19 Oct 2022, 09:24

Hi there,

We are offering conversion services. If you are interested, contact me at development@clickalgo.com

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 


@PanagiotisChar