Converting TradingView indicator to cTrader indicator

Created at 24 Sep 2023, 04:07
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!
YS

ys2310

Joined 03.12.2021

Converting TradingView indicator to cTrader indicator
24 Sep 2023, 04:07


I have a pine script as following. would like to convert this part into a cTrader indicator. 

especially, the RsiMa[1] - RsiMa part doesn't translate directly into cTrader code. Can anyone help me how to 

translate this script? 

Rsi = rsi(src, RSI_Period)
RsiMa = ema(Rsi, SF)
AtrRsi = abs(RsiMa[1] - RsiMa)
MaAtrRsi = ema(AtrRsi, Wilders_Period)
dar = ema(MaAtrRsi, Wilders_Period) * QQE

longband = 0.0
shortband = 0.0
trend = 0

DeltaFastAtrRsi = dar
RSIndex = RsiMa
newshortband = RSIndex + DeltaFastAtrRsi
newlongband = RSIndex - DeltaFastAtrRsi
longband := RSIndex[1] > longband[1] and RSIndex > longband[1] ? max(longband[1], newlongband) : newlongband
shortband := RSIndex[1] < shortband[1] and RSIndex < shortband[1] ? min(shortband[1], newshortband) : newshortband
cross_1 = cross(longband[1], RSIndex)
trend := cross(RSIndex, shortband[1]) ? 1 : cross_1 ? -1 : nz(trend[1], 1)
FastAtrRsiTL = trend == 1 ? longband : shortband

@ys2310
Replies

applusplus
03 Oct 2024, 10:15 ( Updated at: 03 Oct 2024, 13:05 )

For starters use Claude or ChatGPT, they do a decent job of writing code in cTrader.

You can literally ask them to convert the code. Obviously you will most likely have to test and correct it, but they still do a decent job in explaining what each function does etc. 


@applusplus

applusplus
03 Oct 2024, 10:15 ( Updated at: 03 Oct 2024, 13:05 )

For starters use Claude or ChatGPT, they do a decent job of writing code in cTrader.

You can literally ask them to convert the code. Obviously you will most likely have to test and correct it, but they still do a decent job in explaining what each function does etc. 


@applusplus