Bonjour,
Serait-il possible de convertir le code joint en langage ProBuilder pour ProRealTime.
Je joins le lien original pour voir ce que devrait faire le code selon l’auteur!
Merci
https://fr.tradingview.com/script/GxBNW81a-Cumulative-Delta-TradingFinder-Volume-Periodic-EMA/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © TFlab
//@version=5
indicator("Cumulative Delta [TradingFinder] Volume + Periodic + EMA" , "TFlab Cumulative Delta", overlay = false)
CumMode = input.string('Total' , 'Cumulative Mode', ['Total' , 'Periodic' , 'EMA'])
Period = input.int(21 , 'Period')
UltraData = input.bool( false , '' , inline = 'Data')
Market = input.string('Forex', 'Market Ultra Data', options = ['Forex', 'Crypto', 'Stock'], inline = 'Data')
var string a = '' , var string b = '' , var string c = '' , var string d = '' , var string e = '' , var string f = '' , var string g = '' , var string h = ''
var string i = '' , var string j = '' , var string k = '' , var string l = '' , var string m = '' , var string n = '' , var string o = '' , var string p = ''
var string q = '' , var string r = '' , var string s = '' , var string t = '' , var string u = '' , var string v = '' , var string w = '' , var string x = ''
var string y = '' , var string z = ''
switch Market
'Forex' => a := 'FX', b := 'OANDA' , c := 'FOREXCOM' , d := 'FX_IDC' , e := 'PEPPERSTONE' , f := 'CAPITALCOM' , g := 'ICMARKETS' , h := 'EIGHTCAP' , i := 'SAXO' , j := 'BLACKBULL' , k := 'VANTAGE' , l := 'FUSIONMARKETS'
, m := 'FPMARKETS' , n := 'GBEBROKERS' , o := 'IBKR' , p := 'ACTIVTRADES' , q := 'EASYMARKETS' , r := 'FXOPEN' , s := 'CITYINDEX' , t := 'AFTERPRIME' , u := 'SKILLING' , v := 'WHSELFINVEST' , w := 'TRADENATION'
, x := 'THINKMARKETS' , y := 'CFI' , z := 'PHILLIPNOVA'
'Crypto' => a := 'BITSTAMP', b := 'COINBASE' , c := 'INDEX' , d := 'CRYPTO' , e := 'BINANCE' , f := 'BITFINEX' , g := 'KRAKEN' , h := 'OANDA' , i := 'PEPPERSTONE' , j := 'GEMINI' , k := 'EIGHTCAP' , l := 'ICMARKETS'
, m := 'VANTAGE' , n := 'CAPITALCOM' , o := 'FOREXCOM' , p := 'FX' , q := 'BLACKBULL' , r := 'SAXO' , s := 'FUSIONMARKETS' , t := 'CRYPTOCOM' , u := 'EASYMARKETS' , v := 'OKCOIN' , w := 'FPMARKETS'
, x := 'AFTERPRIME' , y := 'ACTIVTRADES' , z := 'BTSE'
'Stock' => a := '-', b := '-' , c := '-' , d := '-' , e := '-' , f := '-' , g := '-' , h := '-' , i := '-' , j := '-' , k := '-' , l := '-'
, m := '-' , n := '-' , o := '-' , p := '-' , q := '-' , r := '-' , s := '-' , t := '-' , u := '-' , v := '-' , w := '-'
, x := '-' , y := '-' , z := '-'
V = nz(request.security(syminfo.tickerid, timeframe.period , volume, ignore_invalid_symbol = true))
Va = nz(request.security(a + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vb = nz(request.security(b + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vc = nz(request.security(c + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vd = nz(request.security(d + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Ve = nz(request.security(e + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vf = nz(request.security(f + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vg = nz(request.security(g + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vh = nz(request.security(h + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vi = nz(request.security(i + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vj = nz(request.security(j + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vk = nz(request.security(k + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vl = nz(request.security(l + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vm = nz(request.security(m + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vn = nz(request.security(n + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vo = nz(request.security(o + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vp = nz(request.security(p + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vq = nz(request.security(q + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vr = nz(request.security(r + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vs = nz(request.security(s + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vt = nz(request.security(t + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vu = nz(request.security(u + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vv = nz(request.security(v + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vw = nz(request.security(w + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vx = nz(request.security(x + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vy = nz(request.security(y + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vz = nz(request.security(z + ":" + syminfo.ticker, timeframe.period , volume, ignore_invalid_symbol = true))
Vsum = V + Va + Vb + Vc + Vd + Ve + Vf + Vg + Vh + Vi + Vj + Vk + Vl + Vm + Vn + Vo + Vp + Vq + Vr + Vs + Vt + Vu + Vv + Vw + Vx + Vy + Vz
Volume = if UltraData
Vsum
else
volume
Buying = Volume *((close - low) / (high - low))
Selling = Volume * ((high - close) / (high - low))
delta = Buying - Selling
Cumulative = if CumMode == "Total"
ta.cum(delta)
else if CumMode == "Periodic"
math.sum(delta , Period)
else if CumMode == "EMA"
ta.ema(delta , Period)
plotcandle(Cumulative[1], Cumulative,Cumulative[1], Cumulative, color = Cumulative - Cumulative[1] >= 0 ? color.green : color.red, bordercolor = Cumulative - Cumulative[1] >= 0 ? color.green : color.red)