Trendline : Une approche du trading
Forums › ProRealTime forum Français › Discussions générales sur le Trading › Trendline : Une approche du trading
- This topic has 100 replies, 11 voices, and was last updated 2 years ago by JJ Tec.
-
-
09/28/2021 at 7:24 PM #178676
ANNULE ET REMPLACE
Perfect Trend Line 2 , je l’ai déjà 🙂
Lors de l’un de mes précédents post, j’ai mélangé Perfect Trend Line et Fractals Trend Line : désolé 🙁 . Je parle bien de l’indicateur Fractals Trend Line.
Mon pb concerne bien le Fractal Trend Line : les escaliers tracés en partie supérieure (Fractals Trend line) et inférieure (Fractals trend Line 2) avec un remplissage bleu correspondent de mémoire aux différents supports et résistances antérieures.
09/28/2021 at 7:48 PM #178677Bon ben c’est quand on cherche on trouve : en page 3 🙂
“Si tu souhaites récupérer les valeurs des lignes de support et resistance dynamique de l’indicateur trendline, tu n’as qu’à changer la dernière ligne comme ceci:
1RETURN LTOPy, LBOTyTu pourras ainsi ensuite faire un CALL de l’indicateur et récupérer ces deux valeurs.”
Désolé cette perte de tps 🙁
09/28/2021 at 7:56 PM #178678Concernant l’indicateur initial “Fractals Trend Line”, est-il possible de créer un screenner valable sur tous les UT qui permet de détecter :
- un croisement des Trend Lines obliques
- une ouverture ou mèche la plus basse sur la Trend Line oblique inférieure (flag orange)
- une clôture ou mèche la plus haute sur la Trend Line oblique supérieure (flag gris)
- une ouverture ou mèche la plus basse sur le support Trend Line horizontale supérieure (flag vert)
- une clôture ou mèche la plus haute sur la résistance Trend Line horizontale inférieure (flag rouge)
J’ai voulu créer ce screener en CALL mais impossible d’avoir ces données en sélection d’ou le passage par une programmation et l’ideal serait d’ajouter un flag (voir fin de ligne scénario) ou une numérotation dans le champ zone de la liste.
Si tu le souhaites, je peux décrire les différents scénarios pas copies d’écran.
Merci pour ton aide
10/18/2021 at 8:22 PM #17989310/19/2021 at 7:23 AM #179897Cette version de l’indicateur des fractals trend line renvoi la valeur en temps réel des lignes, donc on peut l’utiliser en CALL pour tester un croisement avec par exemple:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657defparam drawonlastbaronly = truedefparam calculateonlastbars = 500//fractalscp = lookbackif high[cp] >= highest[(cp)*2+1](high) thenLLH = 1elseLLH = 0endifif low[cp] <= lowest[(cp)*2+1](low) thenLLL = -1elseLLL = 0endifif LLH = 1 thenoldLTOPy = LTOPy[1]oldLTOPx = LTOPx[1]LTOPy = high[cp]LTOPx = barindex[cp]endifif LLL = -1 thenoldLBOTy = LBOTy[1]oldLBOTx = LBOTx[1]LBOTy = low[cp]LBOTx = barindex[cp]endif//trend lineDRAWLINE(oldLTOPx,oldLTOPy,LTOPx,LTOPy)coloured(112,169,161)DRAWLINE(oldLBOTx,oldLBOTy,LBOTx,LBOTy)coloured(211,78,36)//support/resistanceif showSR thenDRAWHLINE(LTOPy) COLOURED(207,215,199,100)DRAWHLINE(LBOTy) COLOURED(207,215,199,100)endifbarelapsedTOP=barindex-LTOPXbarelapsedBOTTOM=barindex-LBOTXfactorTOP = (LTOPy-oldLTOPy)/(LTOPx-oldLTOPx)factorBOTTOM = (LBOTy-oldLBOTy)/(LBOTx-oldLBOTx)//drawtext("#factor#",barindex,low-10*pipsize,Dialog,Bold,20)nowTOP = LTOPy+(barelapsedTOP*factorTOP)drawtext("X",barindex,nowTOP,Dialog,Bold,20) coloured(112,169,161)nowBOTTOM = LBOTy+(barelapsedBOTTOM*factorBOTTOM)drawtext("X",barindex,nowBOTTOM,Dialog,Bold,20) coloured(211,78,36)RETURN nowTOP coloured(0,0,0,0), nowBOTTOM coloured(0,0,0,0)1 user thanked author for this post.
10/19/2021 at 12:08 PM #17994510/19/2021 at 1:03 PM #17996110/20/2021 at 12:58 PM #18001310/20/2021 at 12:58 PM #18001510/20/2021 at 7:35 PM #18003910/21/2021 at 8:02 AM #180049Très bien, le code du screener ci-dessous détecte les cassures de triangle :
12345678910111213141516171819202122232425262728293031323334353637383940414243lookback = 10//fractalscp = lookbackif high[cp] >= highest[(cp)*2+1](high) thenLLH = 1elseLLH = 0endifif low[cp] <= lowest[(cp)*2+1](low) thenLLL = -1elseLLL = 0endifif LLH = 1 thenoldLTOPy = LTOPy[1]oldLTOPx = LTOPx[1]LTOPy = high[cp]LTOPx = barindex[cp]endifif LLL = -1 thenoldLBOTy = LBOTy[1]oldLBOTx = LBOTx[1]LBOTy = low[cp]LBOTx = barindex[cp]endifbarelapsedTOP=barindex-LTOPXbarelapsedBOTTOM=barindex-LBOTXfactorTOP = (LTOPy-oldLTOPy)/(LTOPx-oldLTOPx)factorBOTTOM = (LBOTy-oldLBOTy)/(LBOTx-oldLBOTx)nowTOP = LTOPy+(barelapsedTOP*factorTOP)nowBOTTOM = LBOTy+(barelapsedBOTTOM*factorBOTTOM)breakout = (close crosses over nowtop or close crosses under nowbottom) and nowtop<nowtop[1] and nowbottom>nowbottom[1] and nowtop>nowbottomscreener[breakout]1 user thanked author for this post.
10/21/2021 at 12:09 PM #180070Bonjour Nicolas,
Est il possible de fabriquer le même screener de sorties de triangle avec le code de Swapping ?
Swapping trendline area123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168// Swapping Trendline area 3//PRC_TrendLine_Area | Indicator 16.01.2019 (release 1.3)//Nicolas @ www.prorealcode.com// ( Modification du code "PRC_Quick Fib" afin de visualiser les lignes de tendances obliques ou leurs segments avec réglage de l'épaisseur des traits et les zones support ou resistance// AJOUT de style(line,3) aux segments et lignes dans la version 3Defparam calculateonlastbars = 100DefParam DrawOnLastBarOnly = true// --- property settings//Period = 150 perso = 100 // Lookback period of the Fibonacci Retracement//TrendLine = 0 // (0= Segment, 1= Trend Line)//Fibonacci = 0 // (0= Empty, 1= Fibonacci)//Invert = 0 // (0= Fibo normal, 1= Fibo invert)//Area = 0 // (0= Empty, 1= Rectangle)//Thickness = 2 // Thickness Area rectangle (default 2)// --- end of settingshh = 0ll = lowshiftlowest = barindexfor i = period downto 1 doif high[i]>hh thenhh = high[i]shifthighest = barindex[i]endifif low[i]<ll thenll = low[i]shiftlowest = barindex[i]endifnextisSwingDown = shiftHighest < shiftLowestif isSwingDown thenfullrange = abs(hh-ll)fibo100 = hhfibo0 = llfibo236 = ll+(fullrange*0.236)fibo382 = ll+(fullrange*0.382)fibo50 = ll+fullrange/2fibo618 = ll+(fullrange*0.618)fibo764 = ll+(fullrange*0.764)startbar = min(shifthighest,shiftlowest)r = 255 // Orange // rouge 200g = 136 // Orange // rouge 0b = 0 // rouge 0DrawText("HI #hh#",shifthighest,hh+fullrange*0.03,dialog,standard,10) coloured(r,g,b) // plot price at 0% and 100% levelsDrawText("LO #ll#",shiftlowest,ll-fullrange*0.03,dialog,standard,10) coloured(r,g,b)elsefullrange = abs(hh-ll)fibo100 = llfibo0 = hhfibo236 = hh-(fullrange*0.236)fibo382 = hh-(fullrange*0.382)fibo50 = hh-fullrange/2fibo618 = hh-(fullrange*0.618)fibo764 = hh-(fullrange*0.764)startbar = min(shifthighest,shiftlowest)r = 247 // Jaune // vert 0g = 255 // Jaune // vert 200b = 0 // Jaune // vert 0DrawText("HI #hh#",shifthighest,hh+fullrange*0.03,dialog,standard,10) coloured(r,g,b) // plot price at 0% and 100% levelsDrawText("LO #ll#",shiftlowest,ll-fullrange*0.03,dialog,standard,10) coloured(r,g,b)endifif Fibonacci = 1 and invert = 0 then // plot fibonacci levelsDrawSegment(startbar,fibo0,barindex,fibo0) coloured(r,g,b)style (line,3)DrawText(" 0%",barindex,fibo0,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo236,barindex,fibo236) coloured(r,g,b)style (line,3)DrawText(" 23.6%",barindex,fibo236,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo382,barindex,fibo382) coloured(r,g,b)style (line,3)DrawText(" 38.2%",barindex,fibo382,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo50,barindex,fibo50) coloured(r,g,b)style (line,3)DrawText(" 50.0%",barindex,fibo50,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo618,barindex,fibo618) coloured(r,g,b)style (line,3)DrawText(" 61.8%",barindex,fibo618,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo764,barindex,fibo764) coloured(r,g,b)style (line,3)DrawText(" 76.4%",barindex,fibo764,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo100,barindex,fibo100) coloured(r,g,b)style (line,3)DrawText(" 100%",barindex,fibo100,Dialog,Standard,20) coloured(r,g,b)elsif Fibonacci = 1 and invert = 1 then // plot invert fibonacci levelsDrawSegment(startbar,fibo0,barindex,fibo0) coloured(r,g,b)style (line,3)DrawText(" 100%",barindex,fibo0,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo236,barindex,fibo236) coloured(r,g,b)style (line,3)DrawText(" 76.4%",barindex,fibo236,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo382,barindex,fibo382) coloured(r,g,b)style (line,3)DrawText(" 61.8%",barindex,fibo382,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo50,barindex,fibo50) coloured(r,g,b)style (line,3)DrawText(" 50.0%",barindex,fibo50,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo618,barindex,fibo618) coloured(r,g,b)style (line,3)DrawText(" 38.2%",barindex,fibo618,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo764,barindex,fibo764) coloured(r,g,b)style (line,3)DrawText(" 23.6%",barindex,fibo764,Dialog,Standard,20) coloured(r,g,b)DrawSegment(startbar,fibo100,barindex,fibo100) coloured(r,g,b)style (line,3)DrawText(" 0%",barindex,fibo100,Dialog,Standard,20) coloured(r,g,b)endif// contour linesshiftContourDown = barindex-shiftHighesthighestSlope = 0counth = max(1,(barindex-shifthighest))for i = 2 to counth dothisSlope = (high[i] - hh) / ((barindex-shiftHighest) - i)if (thisSlope >= highestSlope or highestSlope = 0) thenshiftContourDown = ihighestSlope = thisSlopeendifnextshiftContourUp = barindex-shiftLowestLowestSlope = 0countl = max(1,(barindex-shiftLowest))for i = 2 to countl dothisSlope = (low[i] - ll) / ((barindex-shiftLowest) - i)if (thisSlope <= LowestSlope or LowestSlope = 0) thenshiftContourUp = iLowestSlope = thisSlopeendifnext// retracement blocksif Area thenif isSwingDown thenblockprice = hhstartbar = barindex-shifthighestfor i = startbar downto 2 doif low[i]<blockprice thenblockprice = low[i]blockbar = barindex[i]endifnext//DrawRectangle(blockbar,blockprice,barindex,ll) coloured(r,g,b) // program init with box "DrawRectangleBlocks"DrawRectangle(shifthighest,blockprice-(thickness),barindex,ll+(thickness)) coloured(r,g,b) // Option Zone with Thicknesselseblockprice = llstartbar = barindex-shiftlowestfor i = startbar downto 2 doif high[i]>blockprice thenblockprice = high[i]blockbar = barindex[i]endifnext//DrawRectangle(blockbar,blockprice,barindex,hh) coloured(r,g,b) // program init with box "DrawRectangleBlocks"DrawRectangle(blockbar+60,blockprice-(thickness),shiftlowest,hh+(thickness)) coloured(r,g,b) // Option Zone with Thicknessendifendifif TrendLine = 0 thenDrawSegment(shifthighest,hh,barindex[shiftcontourdown],high[shiftcontourdown]) coloured(r,g,b) style (line,3) // only SegmentDrawSegment(shiftlowest,ll,barindex[shiftcontourup],low[shiftcontourup]) coloured(r,g,b) style (line,3) // only Segmentelsif TrendLine = 1 and Invert = 0 thenDrawLine(shifthighest,hh,barindex[shiftcontourdown],high[shiftcontourdown]) coloured(r,g,b) style (line,3) // program initDrawLine(shiftlowest,ll+(thickness),barindex[shiftcontourup],low[shiftcontourup]+(thickness)) coloured(r,g,b) style (line,3) // add double shiftlowest insideDrawLine(shiftlowest,ll,barindex[shiftcontourup],low[shiftcontourup]) coloured(r,g,b) style (line,3) // program initDrawLine(shifthighest,hh-(thickness),barindex[shiftcontourdown],high[shiftcontourdown]-(thickness)) coloured(r,g,b) style (line,3) // add double shifthighwest insideelseDrawLine(shifthighest,hh,barindex[shiftcontourdown],high[shiftcontourdown]) coloured(r,g,b) style (line,3) // program initDrawLine(shiftlowest,ll-(thickness),barindex[shiftcontourup],low[shiftcontourup]-(thickness)) coloured(r,g,b) style (line,3) // add double shifthilowest outsideDrawLine(shiftlowest,ll,barindex[shiftcontourup],low[shiftcontourup]) coloured(r,g,b) style (line,3) // program initDrawLine(shifthighest,hh+(thickness),barindex[shiftcontourdown],high[shiftcontourdown]+(thickness)) coloured(r,g,b)style (line,3) // add double shifthighest outsideendifreturn10/21/2021 at 1:01 PM #180072Ci-dessous le code du screener pour détecter les breakout de trendline avec ce dernier code:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162// Swapping Trendline area 3//PRC_TrendLine_Area | Indicator 16.01.2019 (release 1.3)//Nicolas @ www.prorealcode.com// ( Modification du code "PRC_Quick Fib" afin de visualiser les lignes de tendances obliques ou leurs segments avec réglage de l'épaisseur des traits et les zones support ou resistance// AJOUT de style(line,3) aux segments et lignes dans la version 3// --- property settingsPeriod = 50 //perso = 100 // Lookback period of the Fibonacci Retracement// --- end of settingshh = 0ll = lowshiftlowest = barindexfor i = period downto 1 doif high[i]>hh thenhh = high[i]shifthighest = barindex[i]endifif low[i]<ll thenll = low[i]shiftlowest = barindex[i]endifnext// contour linesshiftContourDown = max(1,barindex-shiftHighest)highestSlope = 0counth = max(1,(barindex-shifthighest))for i = 2 to counth dothisSlope = (high[i] - hh) / ((barindex-shiftHighest) - i)if (thisSlope >= highestSlope or highestSlope = 0) thenshiftContourDown = ihighestSlope = thisSlopeendifnextshiftContourUp = max(1,barindex-shiftLowest)LowestSlope = 0countl = max(1,(barindex-shiftLowest))for i = 2 to countl dothisSlope = (low[i] - ll) / ((barindex-shiftLowest) - i)if (thisSlope <= LowestSlope or LowestSlope = 0) thenshiftContourUp = iLowestSlope = thisSlopeendifnextbarelapsedTOP=barindex-shifthighestbarelapsedBOTTOM=barindex-shiftlowestfactorTOP = (hh-high[shiftcontourdown])/(barindex[shiftcontourdown]-shifthighest)factorBOTTOM = (low[shiftcontourup]-ll)/(barindex[shiftcontourup]-shiftlowest)nowTOP = hh-(barelapsedTOP*factorTOP)nowBOTTOM = ll+(barelapsedBOTTOM*factorBOTTOM)breakout = close crosses over nowtop or close crosses under nowbottomscreener[breakout]1 user thanked author for this post.
10/21/2021 at 1:29 PM #18008310/30/2021 at 5:31 PM #180612 -
AuthorPosts
Find exclusive trading pro-tools on