Help to Convert TradingView Code To Ctrader Cbot

Created at 20 Jun 2021, 18:20
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!
RA

rafee.ameer100

Joined 20.06.2021

Help to Convert TradingView Code To Ctrader Cbot
20 Jun 2021, 18:20


// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © BrendanW98

//@version=4
strategy("My Strategy", overlay=true)

ema5 = ema(close, 9)
ema20 = ema(close, 21)
ema50 = ema(close, 55)

//RSI Signals
// Get user input
rsiSource = close
rsiLength = 14
rsiOverbought = 70
rsiOversold = 30
rsiMid = 50
// Get RSI value
rsiValue = rsi(rsiSource, rsiLength)

//See if RSI crosses 50
doBuy = crossover(rsiValue, rsiOversold) and rsiValue < 50
doSell = crossunder(rsiValue, rsiOverbought) and rsiValue > 50

emacrossover = crossover(ema5, ema20) and ema5 > ema50 and ema20 > ema50 and close > ema50
emacrossunder = crossunder(ema5, ema20) and ema5 < ema50 and ema20 < ema50 and close < ema50

//Entry and Exit
longCondition = emacrossover
closelongCondition = doSell

strategy.entry("Long", strategy.long, 10000.0, when=longCondition)
strategy.close("Long", when=closelongCondition)


shortCondition = emacrossunder
closeshortCondition = doBuy

strategy.entry("Short", strategy.short, 10000.0, when=shortCondition)
strategy.close("Short", when=closeshortCondition)


@rafee.ameer100
Replies

PanagiotisCharalampous
22 Jun 2021, 08:11

Hi there,

If you need somebody to develop a custom indicator for you, you can contact a Consultant or post a Job.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

AlgoGuru
22 Jun 2021, 15:18

RE:

If you need help: please check my website and contact with me: www.algoguru.hu

 


@AlgoGuru