Traduction code ifvg de Luxalgo
Forums › ProRealTime forum Français › Support ProBuilder › Traduction code ifvg de Luxalgo
- This topic has 4 replies, 3 voices, and was last updated 52 minutes ago by Iván.
-
-
01/02/2025 at 4:11 PM #242079
Bonjour,
tout d’abord je vous souhaite une bonne année 2025. j’ai découvert un indicateur génial qui est l’ifvg (inversion fair value gap) codé par LuxAlgo et qui pourrait intéresser beaucoup de monde je pense. Lorsqu’une fvg baissière est breakée, cette dernière devient alors une zone de support (et inversement avec une FVG haussière). Malheureusement, je ne sais pas coder sur PRT et je me demande si une âme charitable pourrait proposer une conversion de ce super indicateur de Tradingview pour PRT.
Un grand merci d’avance pour votre aide.
Cordialement.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/// ©LuxAlgo//@version=5indicator("Inversion Fair Value Gaps (IFVG) [LuxAlgo]", "LuxAlgo - Inversion Fair Value Gaps (IFVG)", overlay = true, max_boxes_count = 500, max_lines_count = 500, max_labels_count = 500)//---------------------------------------------------------------------------------------------------------------------}//Settings//---------------------------------------------------------------------------------------------------------------------{disp_num = input.int(5, maxval = 100, minval = 1, title = "Show Last", tooltip = "Specifies the amount of most recent inversion FVG to display in Bullish/Bearish pairs, starting at the current and looking back.")signal_pref = input.string("Close", title = "Signal Preference", options = ["Close","Wick"], tooltip = "Choose to send signals based on Wicks or Close Price.")wt = signal_pref == "Wick"atr_multi = input.float(0.25, step = 0.25,minval = 0, title = "ATR Multiplier", tooltip = "Filters FVGs based on ATR Width, Only displays Inversions that are Greater-Than the ATR*Multiplier.")//Colorsgreen = input.color(color.new(#089981, 80), title = "Bull Color", group = "Colors")red = input.color(color.new(#f23645, 80), title = "Bear Color", group = "Colors")gray = input.color(#787b86, title = "Midline Color", group = "Colors")invis = color.rgb(0,0,0,100)//---------------------------------------------------------------------------------------------------------------------}//UDT's//---------------------------------------------------------------------------------------------------------------------{type lab //Contains Necessary Label Data to Send to Label Functionint xfloat yint dirtype fvg //Contains Necessary FVG Data to Send to Chart.int left = nafloat top = naint right = nafloat bot = nafloat mid = naint dir = naint state = naarray<lab> labs = naint x_val = na//---------------------------------------------------------------------------------------------------------------------}//Functions//---------------------------------------------------------------------------------------------------------------------{//Basic Calcsbuffer = 100 //How many FVGs to keep in memory.c_top = math.max(open,close)c_bot = math.min(open,close)label_maker(_x,_y,_dir) => //Used for making Labelsswitch_dir == 1 => label.new(_x,_y,"\n▲", style = label.style_text_outline, color = invis, textcolor = color.new(green,0), size = size.small, xloc = xloc.bar_time)_dir == -1 => label.new(_x,_y, "▼\n", style = label.style_text_outline, color = invis, textcolor = color.new(red,0), size = size.small, xloc = xloc.bar_time)fvg_manage(_ary,_inv_ary) => //First step filtering of FVG data, Not all FVGs will be displayed, only inversions.if _ary.size() >= buffer_ary.shift()if _ary.size() > 0for i = _ary.size()-1 to 0value = _ary.get(i)_dir = value.dirif _dir == 1 and (c_bot < value.bot)value.x_val := time_inv_ary.push(_ary.remove(i))if _dir == -1 and (c_top > value.top)value.x_val := time_inv_ary.push(_ary.remove(i))inv_manage(_ary) => //All inversions will be displayed.fire = falseif _ary.size() >= buffer_ary.shift()if _ary.size() > 0for i = _ary.size()-1 to 0value = _ary.get(i)bx_top = value.topbx_bot = value.bot_dir = value.dirst = value.stateif (st == 0 and _dir == 1)value.state := 1value.dir := -1if (_dir == -1 and st == 0)value.state := 1value.dir := 1if st >= 1value.right := timeif (_dir == -1 and st == 1 and close < bx_bot and (wt?high:close[1]) >= bx_bot and (wt?high:close[1]) < bx_top)value.labs.push(lab.new(time,bx_top,-1))fire := trueif (_dir == 1 and st == 1 and close > bx_top and (wt?low:close[1]) <= bx_top and (wt?low:close[1]) > bx_bot)value.labs.push(lab.new(time,bx_bot,1))fire := trueif st >= 1 and ((_dir == -1 and c_top > bx_top) or (_dir == 1 and c_bot < bx_bot))_ary.remove(i)firesend_it(_ary) => // Draws Everything on the Chartlast_index = _ary.size()-1for [index,value] in _arybx_top = value.topbx_bot = value.botbx_left = value.leftxval = value.x_valmid = value.midcol = value.dir == -1 ? green : redo_col = value.dir == -1 ? red : greenif index > last_index - disp_numbox.new(bx_left,bx_top,xval,bx_bot,bgcolor = col, border_color = invis, xloc = xloc.bar_time)box.new(xval,bx_top,time,bx_bot, bgcolor = o_col, border_color = invis, xloc = xloc.bar_time)line.new(bx_left,mid,time,mid, color = gray, style = line.style_dashed, xloc = xloc.bar_time)box.new(bar_index,bx_top,bar_index+50,bx_bot, bgcolor = o_col, border_color = invis)line.new(bar_index,mid,bar_index+50,mid, color = gray, style = line.style_dashed)for stuff in value.labslabel_maker(stuff.x,stuff.y,stuff.dir)//---------------------------------------------------------------------------------------------------------------------}//Delete drawings//---------------------------------------------------------------------------------------------------------------------{for boxes in box.allbox.delete(boxes)for lines in line.allline.delete(lines)for labels in label.alllabel.delete(labels)//---------------------------------------------------------------------------------------------------------------------}//Data Arrays//---------------------------------------------------------------------------------------------------------------------{var bull_fvg_ary = array.new<fvg>(na) // FVG Data, Not all will be Drawnvar bear_fvg_ary = array.new<fvg>(na)var bull_inv_ary = array.new<fvg>(na) // Inversion Data, All will be Drawnvar bear_inv_ary = array.new<fvg>(na)//---------------------------------------------------------------------------------------------------------------------}//FVG Detection//---------------------------------------------------------------------------------------------------------------------{atr = nz(ta.atr(200)*atr_multi, ta.cum(high - low) / (bar_index+1))fvg_up = (low > high[2]) and (close[1] > high[2])fvg_down = (high < low[2]) and (close[1] < low[2])if fvg_up and math.abs(low-high[2]) > atrarray.push(bull_fvg_ary,fvg.new(time[1], low, time, high[2], math.avg(low,high[2]), 1, 0,array.new<lab>(na),na))if fvg_down and math.abs(low[2]-high) > atrarray.push(bear_fvg_ary,fvg.new(time[1], low[2], time, high, math.avg(high,low[2]),-1 ,0,array.new<lab>(na),na))//---------------------------------------------------------------------------------------------------------------------}//Running Functions//---------------------------------------------------------------------------------------------------------------------{// FVG_Data -> Inversion_Data -> Chartfvg_manage(bull_fvg_ary,bull_inv_ary)fvg_manage(bear_fvg_ary,bear_inv_ary)bear_signal = inv_manage(bull_inv_ary)bull_signal = inv_manage(bear_inv_ary)if barstate.islastsend_it(bull_inv_ary)send_it(bear_inv_ary)//Alert Optionsalertcondition(bull_signal, "Bullish Signal")alertcondition(bear_signal, "Bearish Signal")//---------------------------------------------------------------------------------------------------------------------}1 user thanked author for this post.
01/02/2025 at 4:35 PM #242081c’est pas celui ci par hasard
https://www.prorealcode.com/topic/smart-money-concepts-luxalgo/
il faut chercher dans le site site avant de demander une traduction du code
01/02/2025 at 4:41 PM #242082Bonjour,
je vous remercie pour votre réponse mais il ne s’agit pas du même indicateur. Et ce n’est pas le même concept si vous regardez ce que j’ai posté. Pour votre information, j’ai déjà recherché sur le forum et dans les indicateurs proposés et il n’y est pas.
Cordialement01/09/2025 at 11:29 PM #242359Je me permets de relancer cette demande avec le détail de l’inversion Fair value Gaps de Luxalgo. Je poste le lien avec la description de cet indicateur qui est très puissant pour déceler des zones de support/resistance.
https://fr.tradingview.com/script/8FHucjY6-Inversion-Fair-Value-Gaps-IFVG-LuxAlgo/
Si vous le testez, vous l’adopterez.
Merci d’avance aux généreux développeurs pour leur aide.
01/10/2025 at 9:09 AM #242369 -
AuthorPosts