Jurij

Transient Zones v1.1

26193 94 2899
Simple indicator to visualize Transient Zones (TZ) and Potential Transient Zones (PTZ).
The last 3 numbers in the header represent: probability of true TZ (black), probability of PTZ (navy) and probability of PTZ resolving (gray).
Original ForexFactory thread by EURUSDD http://www.forexfactory.com/showthread.php?t=434603&page=286

Version 1.1:
- Added TZ/PTZ occurrence probability thanks to SPYderCrusher

Todo:
- Mid bar transient zones detection
- Draw rectangles for zones (once rectangle drawing gets implemented in pine script) or use dot/circle lines
- Mark forming PTZs more clearly

Previous version 1.0:
Transient Zones
Remove from Favorite Scripts Add to Favorite Scripts
//By Jurij w/ TZ percent occurrence by SPYderCrusher
study("Transient Zones v1.1", "TZ", overlay=true)

//inputs
h_left = input(title="H left", type=integer, defval=10)
h_right = input(title="H right", type=integer, defval=10)
sample_period = input(title="Sample bars for % TZ", type=integer, defval=5000)
show_ptz = input(title="Show PTZ", type=bool, defval=true)
show_channel = input(title="Show channel", type=bool, defval=true)

//barCount = nz(barCount[1]) + 1
//check history and realtime PTZ
h_left_low = lowest(h_left)
h_left_high = highest(h_left)
newlow = low <= h_left_low
newhigh = high >= h_left_high
plotshape(newlow and show_ptz, style=shape.triangledown, location=location.belowbar, color=red)
plotshape(newhigh and show_ptz, style=shape.triangleup, location=location.abovebar, color=green)
channel_high = plot(show_channel ? h_left_low : 0, color=silver)
channel_low = plot (show_channel ? h_left_high : 0, color=silver)

//check true TZ back in history
central_bar_low = low[h_right + 1]
central_bar_high = high[h_right + 1]
full_zone_low = lowest(h_left + h_right + 1)
full_zone_high = highest(h_left + h_right + 1)
central_bar_is_highest = central_bar_high >= full_zone_high
central_bar_is_lowest = central_bar_low <= full_zone_low
plotarrow(central_bar_is_highest ? -1 : 0, offset=-h_right-1)
plotarrow(central_bar_is_lowest ? 1 : 0, offset=-h_right-1)

//TZ probability calc
x = central_bar_is_highest ? 1 : 0
high_bar_tz_count = cum(x)

y = central_bar_is_lowest ? 1 : 0
low_bar_tz_count = cum(y)

total_tz = high_bar_tz_count + low_bar_tz_count
percent_tz_high = (high_bar_tz_count / sample_period) * 100
//plot(percent_tz_high, color = lime, transp=100)
percent_tz_low = (low_bar_tz_count / sample_period) * 100
//plot(low_bar_tz_count, color=red, transp=100)
percent_total_tz = (percent_tz_high + percent_tz_low)
plot(percent_total_tz, color=black, transp=100)

//PTZ probability calc
i = newhigh ? 1 : 0
high_bar_ptz_count = cum(i)

j = newlow ? 1 : 0
low_bar_ptz_count = cum(j)

total_ptz = high_bar_ptz_count + low_bar_ptz_count
percent_ptz_high = (high_bar_ptz_count / sample_period) * 100
//plot(percent_ptz_high, color=green, transp=100)
percent_ptz_low = (low_bar_ptz_count / sample_period) * 100
//plot(percent_ptz_low, color=maroon, transp=100)
percent_total_ptz = (percent_ptz_high + percent_ptz_low)
plot(percent_total_ptz, color=navy,  transp=100)

//PTZ resolving probability calc
percent_ptz_resolved = (1 - (total_tz / total_ptz)) * 100
plot(percent_ptz_resolved, color=gray,  transp=100)
christos.mythos
2 years ago
what am I supposed to do with this code ?
thanx
+5 Reply
Jurij christos.mythos
2 years ago
The transient recurrent zones concept is incredible, I suggest you to check the original forum thread: http://www.forexfactory.com/showthread.php?t=434603&page=286
Long read but totally worth. It changed my view of the market.
+4 Reply
christos.mythos Jurij
2 years ago
yes I believe you, but I would like to use it, how do I get it into metatrader ? copy ? and then paste where ? thanx
Reply
Jurij christos.mythos
2 years ago
This is a pine script created for TradingView.com nothing for metatrader, altough other indicators for mt4 exists.

Click the "Add to favourite scripts" button above and then open a new chart on tradingview and select the indicator from the indicators list...
+6 Reply
christos.mythos Jurij
2 years ago
okay thank you :-)
Reply
Nice work!!!
+7 Reply
Jurij coondawg71
2 years ago
Thanks :)
Reply
coondawg71 PRO Jurij
2 years ago
I'm learning about this interesting strategy to trading. Would it make any sense to add a Median line between the High and the Low barriers? Same as the Donchanian Channel. Thanks.
Reply
Jurij coondawg71
2 years ago
just at this line: plot(show_channel ? (h_left_high + h_left_low) / 2 : 0, color=silver) at the end of the script

If it makes sense? I don't know. Depends on trading strategy.
Reply
Jurij Jurij
2 years ago
I meant "add" this line... typo
Reply
coondawg71 PRO Jurij
2 years ago
thanks for the amendment. Is this a method you use often? If you don't mind I have couple specific questions.
Reply
LudmilaHanania
2 years ago
Thanks and nice work. What is the exit signal, like when do you exit a trade?
Reply
AndrewFaulkner
2 years ago
I don't quite understand the offset on the arrows - if it is offset X places back is it too late to trade? Or am I approaching this one in the wrong manner?

Thanks for this though. :)
Reply
Jurij AndrewFaulkner
2 years ago
Please read the forum thread at the link posted above. TZ is an advance concept, to really understand it you need to study what EURUSDD wrote.

There are no shortcuts.
+3 Reply
AndrewFaulkner Jurij
2 years ago
Thanks for getting back to me Jurij. Guess I'll try to get through the forum posts. And thanks again for the code.
+1 Reply
Jurij AndrewFaulkner
2 years ago
The thing is that there are many ways to trade recurrent/transient areas. So best is to understand the concept to create your own strategy.
+1 Reply
accidentje Jurij
2 years ago
Is this applicable to stocks (instead of currency pairs )?
Reply
Coinhike Jurij
a year ago
For some reason it is said " Eurusdd, Professional Scammer ". You indicator is quite very good ! thanks !!
Reply
Debugger
2 years ago
Transient Zones (TZ) and Potential Transient Zones (PTZ). are percentages and appear on the chart as lines - distorting the chart...
Reply
Jurij Debugger
2 years ago
Yes I know, I set it to be 100% trasnparent but they show up anyway. You have to disable the checkmark in the settings pane for those lines.
+1 Reply
Hi Jurij , pls advise how to get it working at MT4 ?
THANKS
Reply
AlistarElvis
2 years ago
Very nice indicator, though it looks like the big green and red arrows are lagging, so it's too late to make good use of them. Is this supposed to be a lagging indicator?
Reply
Jurij AlistarElvis
2 years ago
This is not a general purpose indicator. To use it you have to understand the Transient Zones /Recurrent Zones theory of EURUSDD (ForexFactory member).
+3 Reply
timj PRO
2 years ago
When do the large green and red arrows appear? Do they re-paint after a number of bars or is it realtime?
+1 Reply
IvanLabrie TOP timj
2 years ago
I found decent settings for 15m and 1h and it seems to pick fractals nicely. Thanks for sharing!
+1 Reply
barraiss5 IvanLabrie
a year ago
hello can you send me the change of your script please
Reply
Jurij timj
2 years ago
They appear after h_right bars have passed and no new high/low. The small arrows are potential transient zones, meaning if price makes no new high/low they will confirm to larget arrows after h bars. One can trade towards those PTZs or away from TZs, depends on strategy...
+4 Reply
joe_vijay PRO timj
9 months ago
if plotarrow statement mentions the offset argument, it means it is repainted. So the answer to your question is 'Yes'.

plotarrow(central_bar_is_highest ? -1 : 0, offset=-h_right-1)
plotarrow(central_bar_is_lowest ? 1 : 0, offset=-h_right-1)
Reply
ahmed.barakat1
2 years ago
could you please give more explanation ? .I allready did red 100 pages in forexfactory but I Could not understand how to find entries and where to Stop loss. also there are any kind of indicators there and they are different in the content and concept. also, if I Want to use your indicator, shall I wait for arrows ? or..........
Reply
Jurij ahmed.barakat1
2 years ago
That's because there is no predefined entry and exit. Once you understand the TZ concept you can build your own trading strategy around it.
TZ only gives probability for an event occurring within a specific (h) time constraint.
+1 Reply
kakola
2 years ago
What does this offer that the zig-zag indicator does not?
Reply
Hey Jurij, I'm a long time lurker of EURUSDD's teachings. Thanks a ton for making this indicator! Any way we can get the developing TZs on the chart somehow? Keep up the great work.
+2 Reply
Jurij DeltheTrader
2 years ago
Thanks. I'm new to the pine script language used by TW. If I understand it correctly it is not possible to cancel elements drawn on chart and no functions for drawing rectangles or zones, only dots. Without the possibility to delete chart objects it is not possible to cancel a PTZ that became invalid.
+1 Reply
fitzkennedy
2 years ago
Is anyone using this while day trading the SPY?
+1 Reply
It seems that cum(x) and cum(y) are counting tz in the entire data series instead of within sample_period. The tz/ptz probability drops as sample_period increases.
Reply
macintosh
2 years ago
This is highly interesting! Good reading and bright ideas.
Somehow I don't see probability numbers up on screen.
Reply
400golpes
2 years ago
Hi, the link to the Forex factory forum is page 286. Sorry but I don´t see anything about Transient Zone in that page.
Reply
Jurij 400golpes
2 years ago
FF has moved the thread to the recycle bin, that's how they deal with loyal members... Check out penguintraders.com, I posted there an archived version as PDF of the thread with all attachments...
+2 Reply
anyone using this to trade real time..seem like the signals are lagging...Jurij, anyway we can get this to work real-time..this would be the best working indicator on trading view if it worked real time
+3 Reply
JRG PRO nheminism21
2 years ago
Thanks for programming this indicator. I await your revisions (todo list)! Question, I have TZ=78, PTZ=294, PTZR=73...how is it possibile to have PTZ @ 294%? Would you explain pls.
+1 Reply
I just realized this system lags and the indicators don't show up at current market price.
+4 Reply
bonzomad PRO QuantitativeExhaustion
10 months ago
How bad is the lag? does it show trade arrows on the next trade window?
Reply
Jurij bonzomad
10 months ago
no lag, arrow appear at candle close, this is grail system accuracy 95-99% -.-

sorry mate, couldn't resist.
this is not a system, it is an indicator that draw transient zones and potential TZs, no more
Reply
bonzomad PRO Jurij
10 months ago
thankfully this is not a comedy club :)

On advice that could actually work with this in regards to stock/etf trading more real time take a look at the williams vix fix
CM_Williams_Vix_Fix  Finds Market Bottoms

Reply
MONEYMENOW PRO Jurij
9 months ago
the important thing is u tried and it kinda of works.. Ur effort is well appreciated.. Its not it works or not, its about ur effort to make it work.. That is the most important.. Same thing with trading... Its not about making money, it is about having more wins than losses. Eventually money comes in...
Reply
Canundo
2 years ago
For some reason that script doesnt work for me. The priceline switches to the top of the graph. There i can see red and green arrows and the grey line is drawing some pixels and and down. But not like in your picture. It looks like it got shrinked were much vertically. You know how to fix that? https://www.tradingview.com/e/4yPFaVKP/#
Reply
jesus.perales1
2 years ago
What is the main purpose of this indicator? it's a buy sell signal ?
Reply
M-Forex
2 years ago
Hello, does not work
snapshot
what can be done? Thanks
+7 Reply
Is this Alert friendly ? I can see the 2 blue numbers of the indicator showing -1 or 1 >> (on close of each bar), how would you set it up ?
Reply
Evgenich
2 years ago
I set the display and all flattened, what to do?
+1 Reply
PerH
2 years ago
Hi Jurij,

Very nice effort ! I am new to Pine myself but trying to get better. Along the way I found this little thing from Ricardo Santos,
[RS]Point And Figure Overlay V0

Perhaps a way to draw rectangles on the charts?

(( Per

Reply
Crit_Nasty
a year ago
I copy and poaste it into Pine, and when I click add to chart, it removes the candles and everything else I had on my chart? Help please :)
+1 Reply
devicemxl
a year ago
nice code, high speed response at graph changes
Reply
Jurij
a year ago
If you are having visual problems like flat price chart after adding this script, you have to activate the "scale price chat only" option. To do this, click with the right mouse button on your chart, then select "Price scale" and check the "Scale price chart only" option.
+1 Reply
mroue26 Jurij
a year ago
Hi Jurij,
i've been reading all your posts since the last 4 hours! this is very intresting! great effort!
i set everything on my chart and its like magic!
snapshot

i just have a question does this work only on EURUSD?
and about the Grey prices in the middle when i put the mouse on a green or red arrow does it tell where the price is heading next?
kindly waiting for your reply
if this works 100% i would be glad if you accept my donations afterwards.
thank you.
Reply
Jurij mroue26
10 months ago
the arrows appear after n bars have passed so not tradable in real time. thhe indicator was never intended for this purpose. it shows only potential transient zones (PTZ) that are confirmed ion true transient zones (TZ) after n bars.
Reply
ravi456
a year ago
this indicator looks fabulous BUT very lagging....Is there a workaround how you guys use this?????
Reply
ravi456 ravi456
a year ago
can anybody using this guide me how to use like timeframe/levels to use?
Reply
I didn't see any percentage value show up. Even in the above sample chart. need help
Reply
Coinhike
a year ago
This indicator is repainted. Useless.
+1 Reply
albert.callisto
10 months ago
I stumbled upon this indicator and I'm trying to figure out what's behind it, it's not crystal clear yet. The original posts on ForexFactory are very confusing, I know the maths behind Markov (well I knew long time ago..) but the original poster was not making it reader friendly.
By searching a bit, someone made a clearer explanation to give at least the basics..

http://penguintraders.com/2014/12/11/transient-recurrent-zones/
+2 Reply
cristian.d
10 months ago
The only way I see this indicator tradeble without going through 1000s of pages is to be contrarian. When an arrow shows up, it's after the trend/minitrend is over, so take the opposite of whatever the arrow is showing. https://www.tradingview.com/chart/WxpCE8mK/
Reply
cristian.d cristian.d
10 months ago
snapshot

Reply
accidentje cristian.d
10 months ago
Can your observation/hypothesis be tested with the back-test functionalities on TV?
Reply
cristian.d accidentje
10 months ago
I don't know. These TV strategies are not so relevant because of difficulty of setting reasonable stops. So the Profit Factor has to suffer; a PF of 1.5 in TV might be actually 3 if we take manual exits. The entries are what's important, the exits are subjective. I trust better my manual test and observation.
Reply
MONEYMENOW PRO cristian.d
9 months ago
You so right. I trade much better without indicators. Just simple trendlines, patterns, candlestick patterns, volume,sma9,20,200 and ultimate oscillator is more than enough to make tons of cash.. these indicators dont let u make decision in time.. Trading is about timing and not about indicators. All indicators except Ult Oscillator show delayed info to decide.. U miss the timing u missed the trade and then regret or fear jumps in.. and money gone....
Reply
Bonavest PRO cristian.d
2 months ago
That is not the way to trade this indicator.
Reply
MONEYMENOW PRO
9 months ago
Does this work for 2 min stock charts.. I have no clue about coding. Can u help.
Reply
Jurij MONEYMENOW
9 months ago
can't see why it should not work on a specific time frame, so yes
Reply
belod4me Jurij
9 months ago
Thanks for this great work. it does not load on my trading view chat when added. what am i doing wrong yet other scripts work
Reply
Jurij belod4me
9 months ago
make sure you checked the "scale price chart only" option.
Right click on the chart -> Price Scale -> Scale price chart only
Reply
lux5romtripp Jurij
9 months ago
how are you using that TZ bro if it is repainting ? what is the secret.... i mean here on TV in TradingView... if you post it let us know how NOT TO USE it but explain how to setting to not repainting.... with much respect
Reply
joe_vijay PRO
9 months ago
Are you sure this is not repainting?
Reply
lux5romtripp joe_vijay
9 months ago
is repainting bro... you cant see the arrows in online mode....
Reply
WaqasRabbani
8 months ago
hi, i had added the script as i add other but what is see only red and green bars .. whole chart is so minimized that i cant see it, no matter how much i zoom it .. help needed .. i can send you snapshot but dont know how ...
Reply
gtrolo PRO WaqasRabbani
8 months ago
Read above, answer has been given at least 5 times.
Reply
SilverRatnik
7 months ago
When I apply this to my chart all the bars will disappear, am I doing something wrong or somebody else has the same situation?
+1 Reply
rich15stan
7 months ago
Hey Jurij, How do you make the arrows more accurate to the market? my arrows are showing up like hours late... how do I tune it to show me the arrow on time with the market or sooner?
Reply
Jurij rich15stan
7 months ago
Please read the description and comments again, the indicator does what it is supposed to do.
Maybe a crystal ball is the right tool :P
Reply
WatchStock rich15stan
6 months ago
red and green bars show up after 10 bars have passed and a trend is confirmed.
Reply
rich15stan
6 months ago
10 candles... what time frame are you on? if I'm on a 15min time frame is it still ten candles? Jurij I use to have one but I lost it and was looking for a new one.
Reply
kking37
6 months ago
Anybody know how to make this scripts autoscale function properly? When I add it to my chart it automatically zooms as far out as possible.
Reply
Gummibear PRO
5 months ago
Jurij, wow, this is incredible. Thanks to your indicator I learned about the transient zone concept. "It blew my mind", indeed. Too bad I didn't see this already 2 years ago. This changed the way I look at price movements. Your indicator code was the missing element in my trading system for optimizing and validating entries and exits. So simple, and so effective!
Reply
stevenafford
5 months ago
Jurij,

The script does not open up completely in my platform....Its like all Shrunk up, and I can't stretch it open.....what do I need to do .... :::?????
Reply
dev16108 stevenafford
5 months ago
Right click near Y axis of chart and select Scale Price Chart only.
Reply
tlzkrh1029 PRO dev16108
3 months ago
wow.. it works.! thank you very much!
Reply
How do I set an alert either for small triangles or arrows
Reply
seanmichael
2 months ago
good day Jurij , great script , having a bit of difficulty , seems as if the pine editor loads with the trending arrows but the market is totally flat , strange I know , can you help , would greatly appreciate your help, looking forward to seeing your script in action
Reply
seanmichael seanmichael
2 months ago
got it in scale price chart , thanx
Reply
sameer_patel18in
2 months ago
awesome work mate :)
Like your work and appreciating your efforts...keep up the good work.
+2 Reply
icam108
a month ago
script is distorting my graph, shrinking it, what can I do to rectify? thanks, Ian
Reply
redchevy007
18 days ago
For some reason i try using this on my.. chart but nothing shows.. everything is flat lined
Reply
table
9 days ago
Dude you are great i can happly say this indicator wks 100%for mee
Reply
nheminism21 PRO table
3 days ago
@table, how do you use this indicator?
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out