Help needed in Converting Great Arrow Indicator from TradingView

#14
Hi

I found this interesting indicator on TradingView but I don't get the exact same results than in TradingView. It is close, but some settings are a bit off.
I set Wilder's period as a different parameter. if you want same settings, you will need to compute wilder's period = 2*RSIPeriod -1
https://www.tradingview.com/script/lYqCrCZY/

I someone can help me in checking my code that would be greatly appreciated
(the TV code is embedded in the MQ4)

thanks a lot

Jeff

Code: Select all

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

//@version=4
study("Comando Cripto Oficial Comprar/Vender", overlay=true)

RSI_Period = input(14, title='RSI Length')
SF = input(5, title='RSI Smoothing')
QQE = input(4.238, title='Fast QQE Factor')
ThreshHold = input(10, title="Thresh-hold")

src = close
Wilders_Period = RSI_Period * 2 - 1

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

comprarband = 0.0
venderband = 0.0
trend = 0

DeltaFastAtrRsi = dar
RSIndex = RsiMa
newvenderband = RSIndex + DeltaFastAtrRsi
newcomprarband = RSIndex - DeltaFastAtrRsi
comprarband := RSIndex[1] > comprarband[1] and RSIndex > comprarband[1] ? max(comprarband[1], newcomprarband) : newcomprarband
venderband := RSIndex[1] < venderband[1] and RSIndex < venderband[1] ? min(venderband[1], newvenderband) : newvenderband
cross_1 = cross(comprarband[1], RSIndex)
trend := cross(RSIndex, venderband[1]) ? 1 : cross_1 ? -1 : nz(trend[1], 1)
FastAtrRsiTL = trend == 1 ? comprarband : venderband

// cruzamento das linhas do "rsi qqe"

QQExcomprar = 0
QQExcomprar := nz(QQExcomprar[1])
QQExvender = 0
QQExvender := nz(QQExvender[1])
QQExcomprar := FastAtrRsiTL < RSIndex ? QQExcomprar + 1 : 0
QQExvender := FastAtrRsiTL > RSIndex ? QQExvender + 1 : 0

//Condições

qqeComprar = QQExcomprar == 1 ? FastAtrRsiTL[1] - 50 : na
qqeVender = QQExvender == 1 ? FastAtrRsiTL[1] - 50 : na

// exibir

plotshape(qqeComprar, title="QQE comprar", text="Comprar", textcolor=color.white, style=shape.labelup, location=location.belowbar, color=color.green, transp=0, size=size.tiny)
plotshape(qqeVender, title="QQE vender", text="Vender", textcolor=color.white, style=shape.labeldown, location=location.abovebar, color=color.red, transp=0, size=size.tiny)

// Alertas

alertcondition(qqeComprar, title="Comprar", message="Comprar")
alertcondition(qqeVender, title="Vender", message="Vender")
comando cripto 100.mq4
(32.38 KiB) Downloaded 58 times

Re: Help needed in Converting Great Arrow Indicator from TradingView

#15
ionone wrote:
Tue Aug 23, 2022 10:20 pm
Hi

I found this interesting indicator on TradingView but I don't get the exact same results than in TradingView. It is close, but some settings are a bit off.
I set Wilder's period as a different parameter. if you want same settings, you will need to compute wilder's period = 2*RSIPeriod -1
https://www.tradingview.com/script/lYqCrCZY/

I someone can help me in checking my code that would be greatly appreciated
(the TV code is embedded in the MQ4)

thanks a lot

Jeff

Code: Select all

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

//@version=4
study("Comando Cripto Oficial Comprar/Vender", overlay=true)

RSI_Period = input(14, title='RSI Length')
SF = input(5, title='RSI Smoothing')
QQE = input(4.238, title='Fast QQE Factor')
ThreshHold = input(10, title="Thresh-hold")

src = close
Wilders_Period = RSI_Period * 2 - 1

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

comprarband = 0.0
venderband = 0.0
trend = 0

DeltaFastAtrRsi = dar
RSIndex = RsiMa
newvenderband = RSIndex + DeltaFastAtrRsi
newcomprarband = RSIndex - DeltaFastAtrRsi
comprarband := RSIndex[1] > comprarband[1] and RSIndex > comprarband[1] ? max(comprarband[1], newcomprarband) : newcomprarband
venderband := RSIndex[1] < venderband[1] and RSIndex < venderband[1] ? min(venderband[1], newvenderband) : newvenderband
cross_1 = cross(comprarband[1], RSIndex)
trend := cross(RSIndex, venderband[1]) ? 1 : cross_1 ? -1 : nz(trend[1], 1)
FastAtrRsiTL = trend == 1 ? comprarband : venderband

// cruzamento das linhas do "rsi qqe"

QQExcomprar = 0
QQExcomprar := nz(QQExcomprar[1])
QQExvender = 0
QQExvender := nz(QQExvender[1])
QQExcomprar := FastAtrRsiTL < RSIndex ? QQExcomprar + 1 : 0
QQExvender := FastAtrRsiTL > RSIndex ? QQExvender + 1 : 0

//Condições

qqeComprar = QQExcomprar == 1 ? FastAtrRsiTL[1] - 50 : na
qqeVender = QQExvender == 1 ? FastAtrRsiTL[1] - 50 : na

// exibir

plotshape(qqeComprar, title="QQE comprar", text="Comprar", textcolor=color.white, style=shape.labelup, location=location.belowbar, color=color.green, transp=0, size=size.tiny)
plotshape(qqeVender, title="QQE vender", text="Vender", textcolor=color.white, style=shape.labeldown, location=location.abovebar, color=color.red, transp=0, size=size.tiny)

// Alertas

alertcondition(qqeComprar, title="Comprar", message="Comprar")
alertcondition(qqeVender, title="Vender", message="Vender")
Looks like a qqe crossing the fast trend line main chart arrows. Think we have some sub-window versions that draw on-chart arrows when crossing the qqe crossing the fast trend line. For Wilder's period don't think you need it as an external parameter since it is already

Code: Select all

RsiPeriod*2-1
so maybe do

Code: Select all

double Wilders_Period = RsiPeriod*2-1
then use Wilders_Period where required, except for externally. Would make it more automatic that way.


Re: Help needed in Converting Great Arrow Indicator from TradingView

#16
mrtools wrote:
Wed Aug 24, 2022 4:19 am
Looks like a qqe crossing the fast trend line main chart arrows. Think we have some sub-window versions that draw on-chart arrows when crossing the qqe crossing the fast trend line. For Wilder's period don't think you need it as an external parameter since it is already

Code: Select all

RsiPeriod*2-1
so maybe do

Code: Select all

double Wilders_Period = RsiPeriod*2-1
then use Wilders_Period where required, except for externally. Would make it more automatic that way.
I separated wilder's period intentionally, to have more controls
did you look at the code ? does it feel right to you ?

Re: Good TradingView Arrows

#18
RplusT wrote:
Fri Jul 22, 2022 9:41 pm
My algo......I spent hundreds of hours to code that.....Thus you understand, can't just give it away....... :D


Image




Thanks to mrtools and kvak
! Hama averages (mtf + alerts).ex4
2x alma + ribbon mtf BT.ex4
how did a m8 get these settings and arrows please?
no spam,, no hacking,, no bad language,, no source code
no bad request,, no fake email or location,, no no contribution
no unauthorized sells

0+0=0, infinity/infinity=1

The wages of sin is death and gift of God is eternal life through Jesus Christ
It’s self evident there is a creator and judgement.

Re: Good TradingView Arrows

#19
chickensword wrote:
Thu Sep 22, 2022 10:53 pm
how did a m8 get these settings and arrows please?
Phuhhh...that was quite a while ago. Did not save that Template, thus I have no clue where the arrows come from.

Got to play with the settings of Alma Period and Alma Sigma 1 and 2 to find something that suits you.

Here's an example

2x Alma_Hama.JPG
2x Alma_Fx Station.tpl
(7.04 KiB) Downloaded 14 times


Attachments 11
  1. Similar Topics

    1. Conversion of mt5 indicator to tradingview

      0 Replies 475 Views

      by naruto277, Tue Feb 15, 2022 6:11 am in Coding Help

      0 Replies
      475 Views
    2. Send TradingView Alerts to MT4

      0 Replies 569 Views

      by Hsat, Tue Jun 07, 2022 12:07 am in Commercial Services

      0 Replies
      569 Views
    3. Automate TradingView Strategy to Binance

      0 Replies 204 Views

      by Hsat, Thu Jul 28, 2022 1:41 am in Commercial Services

      0 Replies
      204 Views

Return to “Commercial Services”

Users viewing this forum: CommonCrawl [Bot] and 3 guests