Conversion indicateur Boxes Trail v1 de TV a PRT
Forums › ProRealTime forum Français › Support ProBuilder › Conversion indicateur Boxes Trail v1 de TV a PRT
- This topic has 4 replies, 3 voices, and was last updated 8 months ago by maxlys.
-
-
02/09/2024 at 6:42 PM #227774
Bonjour,
Un indicateur nommé Boxes trail sur TV semble interessant a utiliser. principalement sur les signaux achat long et court
Serais-t-il possible d’en faire la conversion pour PRT ?
Merci
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256//@version=3study(title = "Boxes Trail v1", overlay = true)trackprice = input(title='Track Price', type=bool, defval=false)length1 = input(title='Support / Resistance length:', type=integer, defval=20)top1 = valuewhen(high >= highest(high, length1), high, 0)bot1 = valuewhen(low <= lowest(low, length1), low, 0)plot(top1, color=top1 != top1[1] ? na : black, linewidth=1, offset=0, trackprice=trackprice, transp=0)plot(bot1, color=bot1 != bot1[1] ? na : green, linewidth=1, offset=0, trackprice=trackprice, transp=0)barlength = input(title='Bar length:', type=integer, defval=20)length = input(title="Length", type=integer, defval=14, minval=1)src = input(title="Source", type=source, defval=close)factor = 0.0slope = 0.0for i = 1 to lengthfactor := 1 + 2 * (i - 1)slope := slope + (src[i - 1]) * (length - factor) / 2shmma = sma(src, length) + (6 * slope) / ((length + 1) * length)newtop = shmma >= highest(shmma, barlength)newbot = shmma <= lowest(shmma, barlength)top = valuewhen(newtop, shmma, 0)bot = valuewhen(newbot, shmma, 0)plot(top, color=top != top[1] ? na : red, linewidth=1, offset=0, transp=0)plot(bot, color=bot != bot[1] ? na : lime, linewidth=1, offset=0, transp=0)//mode = input('ATR', options=["ATR", "Traditional"])modeValue = input(14.000, type=float)bricksize = naif mode == "ATR"bricksize := atr(round(modeValue))if mode == "Traditional"bricksize := modeValueshowOverlay = input(false)ropen = napropen = nz(ropen[1])ropen := close > propen+bricksize or high > propen+bricksize ? propen+bricksize : close < propen-bricksize or low < propen-bricksize ? propen-bricksize : propenrclose = narclose := ropen > propen ? ropen-bricksize : ropen < propen ? ropen+bricksize : nz(rclose[1])direction = nadirection := ropen > propen ? 1 : ropen < propen ? -1 : nz(direction[1])rc = direction == 1 ? green : direction == -1 ? maroon : nap00 = plot(not showOverlay ? na : ropen, style=cross, color=rc, linewidth=3)p01 = plot(not showOverlay ? na : rclose, style=circles, color=gray, linewidth=2)fill(p00, p01, color=gray, transp=75)//use2bars=input(false,title="use 2 bars?")lookback=input(100, type=integer, minval=1, maxval=200,title="look back bars?")range = high-low+0.000000001range2= (highest(high,2)-lowest(low,2))+0.000000001value1=navalue1:= close > open and range != 0 ? (range/(2*range+open-close))*close : value1value1:= close < open and range != 0 ? ((range+close-open)/(2*range+close-open))*close: value1value1:= close == open ? close:value1value2 = close-value1//using only one barvalue3 = abs(value1+value2)value4 = value1*rangevalue5 = (value1-value2)*rangevalue6 = value2*rangevalue7 = (value2-value1)*rangevalue8 = value1/rangevalue9 = (value1-value2)/rangevalue10 = value2/rangevalue11 = (value2-value1)/rangevalue12 = value3/range// Using two barsvalue13 = use2bars?( value3+value3[1]):navalue14 = use2bars?(value1+value1[1])*range2:navalue15 = use2bars?(value1+value1[1]-value2-value2[1])*range2:navalue16 = use2bars?(value2+value2[1])*range2:navalue17 = use2bars?(value2+value2[1]-value1-value1[1])*range2:navalue18 = use2bars ? (value1+value1[1])/range2:navalue19 = use2bars ? (value1+value1[1]-value2-value2[1])/range2:navalue20 = use2bars ? (value2+value2[1])/range2:navalue21 = use2bars ? (value2+value2[1]-value1-value1[1])/range2:navalue22 = use2bars ? value13/range2:na// one bar conditionscondition1 = value3 == lowest(value3,lookback)condition2 = value4 == highest(value4,lookback) and close > opencondition3 = value5 == highest(value5,lookback) and close > opencondition4 = value6 == highest(value6,lookback) and close < opencondition5 = value7 == highest(value7,lookback) and close < opencondition6 = value8 == lowest(value8,lookback) and close < opencondition7 = value9 == lowest(value9,lookback) and close < opencondition8 = value10 == lowest(value10,lookback) and close > opencondition9 = value11 == lowest(value11,lookback) and close > opencondition10 = value12 == highest(value12,lookback)// two bar conditionscondition11 = use2bars and value13 == lowest(value13,lookback)condition12 = use2bars and value14 == highest(value14,lookback) and close > open and close[1] > open[1]condition13 = use2bars and value15 == highest(value15,lookback) and close > open and close[1] > open[1]condition14 = use2bars and value16 == highest(value16,lookback) and close < open and close[1] < open[1]condition15 = use2bars and value17 == highest(value17,lookback) and close < open and close[1] < open[1]condition16 = use2bars and value18 == lowest(value18,lookback) and close < open and close[1] < open[1]condition17 = use2bars and value19 == lowest(value19,lookback) and close < open and close[1] < open[1]condition18 = use2bars and value20 == lowest(value20,lookback) and close > open and close[1] > open[1]condition19 = use2bars and value21 == lowest(value21,lookback) and close > open and close[1] > open[1]condition20 = use2bars and value22 == highest(value22,lookback)//Classifying the bars using one bar conditions, or using both one bar and two bar conditions simultaneosly if "use2bars" button selected.lowvolume = (condition1 or condition11)climaxupvolume = (condition2 or condition3 or condition8 or condition9 or condition12 or condition13 or condition18 or condition19)climaxdownvolume = (condition4 or condition5 or condition6 or condition7 or condition14 or condition15 or condition16 or condition17)churnvolume = (condition10 or condition20)climaxchurnvolume = (condition10 or condition20) and (condition2 or condition3 or condition4 or condition5 or condition6 or condition7 or condition8 or condition9 or condition12 or condition13 or condition14 or condition15 or condition16 or condition17 or condition18 or condition19)trend=1supplyline=highsupportline=lowtrend:=barstate.isfirst?1:close>nz(supplyline[1])?1:close<nz(supportline[1])?-1:nz(trend[1])supplyline:= trend==1?climaxdownvolume?highest(2): high>supplyline[1]?high: supplyline[1]: climaxdownvolume?highest(2): supplyline[1]supportline:= trend==-1? climaxupvolume? lowest(2): low<supportline[1]?low: supportline[1] : climaxupvolume?lowest(2): supportline[1]trailing=trend==-1?supportline:supplylinetrailing1=trend==1?supportline:supplyline//plot(trailing,title="trailline",color=trend==1?blue:red,linewidth=2,transp=0)//plot(trailing1,title="trailline",color=trend==1?blue:red,linewidth=2,transp=0)//// ConditionslongCond = nashortCond = nalongCond := crossover(trailing,trailing1)shortCond := crossunder(trailing,trailing1)// Count your long short conditions for more control with PyramidingsectionLongs = 0sectionLongs := nz(sectionLongs[1])sectionShorts = 0sectionShorts := nz(sectionShorts[1])if longCondsectionLongs := sectionLongs + 1sectionShorts := 0if shortCondsectionLongs := 0sectionShorts := sectionShorts + 1// Pyramidingpyrl = 1// These check to see your signal and cross references it against the pyramiding settings above// These check to see your signal and cross references it against the pyramiding settings abovelongCondition = longCond and sectionLongs <= pyrlshortCondition = shortCond and sectionShorts <= pyrl// Get the price of the last opened long or shortlast_open_longCondition = nalast_open_shortCondition = nalast_open_longCondition := longCondition ? open : nz(last_open_longCondition[1])last_open_shortCondition := shortCondition ? open : nz(last_open_shortCondition[1])// Check if your last postion was a long or a shortlast_longCondition = nalast_shortCondition = nalast_longCondition := longCondition ? time : nz(last_longCondition[1])last_shortCondition := shortCondition ? time : nz(last_shortCondition[1])in_longCondition = last_longCondition > last_shortConditionin_shortCondition = last_shortCondition > last_longCondition// Take profitisTPl = input(false, "Take Profit Long")isTPs = input(false, "Take Profit Short")tp = input(2, "Take Profit %", type=float)long_tp = isTPl and crossover(high, (1+(tp/100))*last_open_longCondition) and longCondition == 0 and in_longCondition == 1short_tp = isTPs and crossunder(low, (1-(tp/100))*last_open_shortCondition) and shortCondition == 0 and in_shortCondition == 1// Stop LossisSLl = input(false, "Stop Loss Long")isSLs = input(false, "Stop Loss Short")sl= 0.0sl := input(3, "Stop Loss %", type=float)long_sl = isSLl and crossunder(low, (1-(sl/100))*last_open_longCondition) and longCondition == 0 and in_longCondition == 1short_sl = isSLs and crossover(high, (1+(sl/100))*last_open_shortCondition) and shortCondition == 0 and in_shortCondition == 1// Create a single close for all the different closing conditions.long_close = long_tp or long_sl ? 1 : 0short_close = short_tp or short_sl ? 1 : 0// Get the time of the last closelast_long_close = nalast_short_close = nalast_long_close := long_close ? time : nz(last_long_close[1])last_short_close := short_close ? time : nz(last_short_close[1])// Alerts & Signalsbton(b) => b ? 1 : 0plotshape(longCondition , title="buy alert", color=green, textcolor=green, transp=0,style=shape.triangleup, location=location.belowbar, size=size.small,text="LONG",offset=0)plotshape(shortCondition, title="sell alert", color=red, textcolor=red, transp=0,style=shape.triangledown, location=location.abovebar, size=size.small,text="SHORT",offset=0)plotshape(long_tp and last_longCondition > nz(last_long_close[1]), text ="TP", title="Take Profit Long", style=shape.triangledown,location=location.abovebar, color = red, editable = false, transp = 0)plotshape(short_tp and last_shortCondition > nz(last_short_close[1]) , text ="TP", title="Take Profit Short", style=shape.triangleup,location=location.belowbar, color = lime, editable = false, transp = 0)ltp = iff(long_tp and last_longCondition > nz(last_long_close[1]), (1+(tp/100))*last_open_longCondition, na)plot(ltp, style=cross, linewidth=3, color = white, editable = false)stp = iff(short_tp and last_shortCondition > nz(last_short_close[1]), (1-(tp/100))*last_open_shortCondition, na)plot(stp, style = cross, linewidth=3, color = white, editable = false)plotshape(long_sl and last_longCondition > nz(last_long_close[1]), text ="SL", title="Stop Loss Long", style=shape.triangledown,location=location.abovebar, color = red, editable = false, transp = 0)plotshape(short_sl and last_shortCondition > nz(last_short_close[1]), text ="SL", title="Stop Loss Short", style=shape.triangleup,location=location.belowbar, color = lime, editable = false, transp = 0)lsl = iff(long_sl and last_longCondition > nz(last_long_close[1]), (1-(sl/100))*last_open_longCondition, na)plot(lsl, style=cross, linewidth=3, color = white, editable = false)ssl = iff(short_sl and last_shortCondition > nz(last_short_close[1]), (1+(sl/100))*last_open_shortCondition, na)plot(ssl, style = cross, linewidth=3, color = white, editable = false)//alertcondition(bton(longCondition), title="Buy Alert")alertcondition(bton(shortCondition), title="Sell Alert")alertcondition(bton(long_tp and last_longCondition > nz(last_long_close[1])), title="Take Profit Long")alertcondition(bton(short_tp and last_shortCondition > nz(last_short_close[1])), title="Take Profit Short")alertcondition(bton(long_sl and last_longCondition > nz(last_long_close[1])), title="Stop Loss Long")alertcondition(bton(short_sl and last_shortCondition > nz(last_short_close[1])), title="Stop Loss Short")//lien explicatif : https://www.tradingview.com/script/BJBqI74K-Boxes-Trail-v1/
02/26/2024 at 3:12 PM #228765Bonjour à tous
Voici la conversion en langage ProRealtimePRC_BOXES TRAIL123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360//PRC_BOXES TRAIL//version = 0//26.02.24//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge////////////////////////////////////////////////////inputslength1 = 20 //Support / Resistance lengthbarlength = 20 //Bar lengthlength = 14 //Lengthsrc = customclose //Sourcemode = 0 //ATR or Traditionalmodevalue = 14showoverlay=1//Booleanuse2bars=0//Booleanlookback=100isTPl = 0 //Boolean // take profit longisTPs = 0 //Boolean // take profit shorttp = 2 //% take profitisSLl = 0 //Boolean // stop loss longisSLs = 0 //Boolean // stop loss shortsl = 3 //% stop loss//////////Resistance linesif high>=highest[length1](high) thent1 = 0top1 = highelsetop1 = top1t1 = t1+1drawsegment(barindex - t1,top1,barindex,top1)coloured("black")endif////Support linesif low<=lowest[length1](low) thenb1 = 0bot1 = lowelsebot1 = bot1b1 = b1+1drawsegment(barindex - b1,bot1,barindex,bot1)coloured("green")endif/////factor = 0slope = 0for i=1 to length dofactor = 1+2*(i-1)slope = slope + (src[i-1])*(length-factor)/2nextshmma = average[length](src)+6*slope/((length+1)*length)if shmma >= highest[barlength](shmma) thentop2 = shmmat2 = 0elsetop2 = top2t2 = t2+1drawsegment(barindex-t2,top2,barindex,top2)coloured("red")endifif shmma <= lowest[barlength](shmma) thenbot2 = shmmab2 = 0elsebot2 = bot2b2 = b2+1drawsegment(barindex-b2,bot2,barindex,bot2)coloured("lime")endif////bricksizeif mode thenbricksize = averagetruerange[round(modevalue)]elsebricksize = modevalueendif////if barindex < 2 thenpropen = 0ropen = 0rclose = 0elsepropen = ropen[1]if close > propen+bricksize or high > propen+bricksize thenropen = propen+bricksizeelsif close < propen-bricksize or low < propen-bricksize thenropen = propen-bricksizeelseropen = propenendifif ropen > propen thenrclose = ropen-bricksizeelsif ropen < propen thenrclose = ropen+bricksizeelserclose = rclose[1]endifif ropen > propen thendirection = 1r=0g=255b=0elsif ropen < propen thendirection = -1r=120g=0b=0elsedirection = direction[1]endifif showoverlay thendrawtext("✚",barindex,ropen)coloured(r,g,b)drawtext("•",barindex,rclose)coloured("gray")endifendif///////////range1=high-low+0.000000001range2=highest[2](high)-lowest[2](low)+0.000000001if close > open and range1<>0 thenvalue1=(range1/(2*range1+open-close))*closeelsif close < open and range1<>0 thenvalue1=((range1+close-open)/(2*range1+close-open))*closeelsif close=open thenvalue1=closeelsevalue1 = value1endifvalue2=close-value1///using only one barvalue3 = abs(value1+value2)value4 = value1*range1value5 = (value1-value2)*range1value6 = value2*range1value7 = (value2-value1)*range1value8 = value1/range1value9 = (value1-value2)/range1value10 = value2/range1value11 = (value2-value1)/range1value12 = value3/range1// Using two barsif use2bars thenvalue13 = value3+value3[1]value14 = (value1+value1[1])*range2value15 = (value1+value1[1]-value2-value2[1])*range2value16 = (value2+value2[1])*range2value17 = (value2+value2[1]-value1-value1[1])*range2value18 = (value1+value1[1])/range2value19 = (value1+value1[1]-value2-value2[1])/range2value20 = (value2+value2[1])/range2value21 = (value2+value2[1]-value1-value1[1])/range2value22 = value13/range2endif// one bar conditionscondition1 = value3 = lowest[lookback](value3)condition2 = value4 = highest[lookback](value4) and close > opencondition3 = value5 = highest[lookback](value5) and close > opencondition4 = value6 = highest[lookback](value6) and close < opencondition5 = value7 = highest[lookback](value7) and close < opencondition6 = value8 =lowest[lookback](value8) and close < opencondition7 = value9 =lowest[lookback](value9) and close < opencondition8 = value10 =lowest[lookback](value10) and close > opencondition9 = value11 =lowest[lookback](value11) and close > opencondition10 = value12 =highest[lookback](value12)// two bar conditionscondition11 = use2bars and value13 = lowest[lookback](value13)condition12 = use2bars and value14 =highest[lookback](value14) and close > open and close[1] > open[1]condition13 = use2bars and value15 =highest[lookback](value15) and close > open and close[1] > open[1]condition14 = use2bars and value16 =highest[lookback](value16) and close < open and close[1] < open[1]condition15 = use2bars and value17 =highest[lookback](value17) and close < open and close[1] < open[1]condition16 = use2bars and value18 =lowest[lookback](value18) and close < open and close[1] < open[1]condition17 = use2bars and value19 =lowest[lookback](value19) and close < open and close[1] < open[1]condition18 = use2bars and value20 =lowest[lookback](value20) and close > open and close[1] > open[1]condition19 = use2bars and value21 =lowest[lookback](value21) and close > open and close[1] > open[1]condition20 = use2bars and value22 =highest[lookback](value22)//Classifying the bars using one bar conditions, or using both one bar and two bar conditions simultaneosly if "use2bars" button selected.lowvolume = (condition1 or condition11)climaxupvolume = (condition2 or condition3 or condition8 or condition9 or condition12 or condition13 or condition18 or condition19)climaxdownvolume = (condition4 or condition5 or condition6 or condition7 or condition14 or condition15 or condition16 or condition17)churnvolume = (condition10 or condition20)climaxchurnvolume = (condition10 or condition20) and (condition2 or condition3 or condition4 or condition5 or condition6 or condition7 or condition8 or condition9 or condition12 or condition13 or condition14 or condition15 or condition16 or condition17 or condition18 or condition19)if barindex<2 thentrend=1supplyline=highsupportline=lowelsif close>supplyline[1] thentrend=1elsif close<supportline[1] thentrend=-1elsetrend=trend[1]endifif trend=1 thenif climaxdownvolume thensupplyline=highest[2](high)elsif high>supplyline[1] thensupplyline=highelsesupplyline=supplyline[1]endifelseif climaxdownvolume thensupplyline=highest[2](high)elsesupplyline=supplyline[1]endifendifif trend=-1 thenif climaxupvolume thensupportline=lowest[2](low)elsif low < supportline[1] thensupportline=lowelsesupportline=supportline[1]endifelseif climaxupvolume thensupportline=lowest[2](low)elsesupportline=supportline[1]endifendifif trend=-1 thentrailing2 = supportlineelsetrailing2 = supplylineendifif trend=1 thentrailing1 = supportlineelsetrailing1 = supplylineendiflongcond = trailing2 crosses over trailing1shortcond = trailing2 crosses under trailing1if barindex < 2 thensectionlongs=0sectionshorts=0elseif longcond thensectionlongs=sectionlongs+1sectionshorts=0elsif shortcond thensectionlongs=0sectionshorts=sectionshorts+1endifendif// Pyramidingpyrl = 1// These check to see your signal and cross references it against the pyramiding settings above// These check to see your signal and cross references it against the pyramiding settings abovelongCondition = longCond and sectionLongs <= pyrlshortCondition = shortCond and sectionShorts <= pyrlif barindex < 2 thenlastopenlongCondition=0lastopenshortCondition=0lastlongCondition = 0lastshortCondition = 0else// Get the price of the last opened long or shortif longCondition thenlastopenlongCondition = openelselastopenlongCondition = lastopenlongCondition[1]endifif shortCondition thenlastopenshortCondition = openelselastopenshortCondition = lastopenshortCondition[1]endif// Check if your last postion was a long or a shortif longCondition thenlastlongCondition = barindexelselastlongCondition = lastlongCondition[1]endifif shortCondition thenlastshortCondition = barindexelselastshortCondition = lastshortCondition[1]endifendifinlongcondition = lastlongcondition > lastshortconditioninshortcondition = lastlongcondition < lastshortcondition// Take profitlongTP = isTPl and high crosses over (1+(tp/100))*lastopenlongCondition and longcondition = 0 and inlongconditionshortTP = isTPs and low crosses under (1-(tp/100))*lastopenshortCondition and shortcondition = 0 and inshortcondition// Stop LosslongSL = isSLl and low crosses under (1-(sl/100))*lastopenlongCondition and longcondition = 0 and inlongconditionshortSL = isSLs and high crosses over (1+(sl/100))*lastopenshortCondition and shortcondition = 0 and inshortcondition// Create a single close for all the different closing conditions.if barindex < 2 thenlastlongClose = 0lastshortClose = 0elseif longTP or longSL thenlongclose = 1lastlongclose = barindexelselongclose = 0lastlongclose = lastlongclose[1]endifif shortTP or shortSL thenshortclose = 1lastshortclose = barindexelseshortclose = 0lastshortclose = lastshortclose[1]endifendif// Signalsif longcondition thendrawarrowup(barindex,low-0.15*averagetruerange[10](close))coloured("green")elsif shortcondition thendrawarrowdown(barindex,high+0.15*averagetruerange[10](close))coloured("red")endifif longTP and lastlongCondition>lastlongclose[1] thendrawtext("TPlg",barindex,high+0.15*averagetruerange[10](close))coloured("red")drawpoint(barindex,(1+(tp/100))*lastopenlongcondition,2)coloured("white")elsif shortTP and lastshortCondition>lastshortclose[1] thendrawtext("TPsh",barindex,low-0.15*averagetruerange[10](close))coloured("green")drawpoint(barindex,(1-(tp/100))*lastopenshortcondition,2)coloured("white")elsif longSL and lastlongcondition>lastlongclose[1] thendrawtext("SLlg",barindex,high+0.15*averagetruerange[10](close))coloured("red")drawpoint(barindex,(1-(sl/100))*lastopenlongcondition,2)coloured("white")elsif shortSL and lastshortcondition>lastshortclose[1] thendrawtext("SLsh",barindex,low-0.15*averagetruerange[10](close))coloured("green")drawpoint(barindex,(1+(sl/100))*lastopenshortcondition,2)coloured("white")endifreturn02/26/2024 at 3:50 PM #228771Merci pour ce travail.
J’ai un petit souci concernant l’affichage des éléments qui se trouvent en fin de code, je ne vois pas les inscriptions TPlg,Tpsh,SLlg etc… de quoi pourrais provenir ce probeleme ? J’ai tenté de changer les parametres de couleurs et de “distance” pour l’ffichage mais rien n’y fait. Voir photo ; Merci
12345678910111213if longTP and lastlongCondition>lastlongclose[1] thendrawtext("TPlg",barindex,high+0.15*averagetruerange[10](close))coloured("red")drawpoint(barindex,(1+(tp/100))*lastopenlongcondition,2)coloured("white")elsif shortTP and lastshortCondition>lastshortclose[1] thendrawtext("TPsh",barindex,low-0.15*averagetruerange[10](close))coloured("green")drawpoint(barindex,(1-(tp/100))*lastopenshortcondition,2)coloured("white")elsif longSL and lastlongcondition>lastlongclose[1] thendrawtext("SLlg",barindex,high+0.15*averagetruerange[10](close))coloured("red")drawpoint(barindex,(1-(sl/100))*lastopenlongcondition,2)coloured("white")elsif shortSL and lastshortcondition>lastshortclose[1] thendrawtext("SLsh",barindex,low-0.15*averagetruerange[10](close))coloured("green")drawpoint(barindex,(1+(sl/100))*lastopenshortcondition,2)coloured("white")endif02/26/2024 at 4:36 PM #228776Bonjour
pour afficher ces éléments il faut passer les valeurs booléennes suivantes de 0 à 1
isTPl =1 //Boolean // take profit long
isTPs =1 //Boolean // take profit shortisSLl = 1 //Boolean // stop loss longisSLs =1 //Boolean // stop loss short02/26/2024 at 6:08 PM #228781 -
AuthorPosts
Find exclusive trading pro-tools on