Jurij

Transient Zones v1.1

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)
what am I supposed to do with this code ?
thanx
+8 Reply
Jurij christos.mythos
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
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
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
okay thank you :-)
Reply
MarxBabu christos.mythos
SUPER SUPERTREND THREE LINE PROFIT STRATEGY
Reply
Nice work!!!
+7 Reply
Jurij coondawg71
Thanks :)
Reply
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
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
I meant "add" this line... typo
Reply
thanks for the amendment. Is this a method you use often? If you don't mind I have couple specific questions.
Reply
Thanks and nice work. What is the exit signal, like when do you exit a trade?
Reply
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
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
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
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
Is this applicable to stocks (instead of currency pairs )?
+1 Reply
For some reason it is said " Eurusdd, Professional Scammer ". You indicator is quite very good ! thanks !!
Reply
Transient Zones (TZ) and Potential Transient Zones (PTZ). are percentages and appear on the chart as lines - distorting the chart...
Reply
Jurij Debugger
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.
+2 Reply
Hi Jurij , pls advise how to get it working at MT4 ?
THANKS
Reply
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
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
When do the large green and red arrows appear? Do they re-paint after a number of bars or is it realtime?
+1 Reply
I found decent settings for 15m and 1h and it seems to pick fractals nicely. Thanks for sharing!
+1 Reply
barraiss5 IvanLabrie
hello can you send me the change of your script please
Reply
Jurij timj
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
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
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
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.
+2 Reply
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
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
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
This is highly interesting! Good reading and bright ideas.
Somehow I don't see probability numbers up on screen.
Reply
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
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
+5 Reply
JRG nheminism21
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
How bad is the lag? does it show trade arrows on the next trade window?
Reply
Jurij bonzomad
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
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
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
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
What is the main purpose of this indicator? it's a buy sell signal ?
Reply
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
I set the display and all flattened, what to do?
+1 Reply
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
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
nice code, high speed response at graph changes
Reply
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
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
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
this indicator looks fabulous BUT very lagging....Is there a workaround how you guys use this?????
Reply
ravi456 ravi456
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
This indicator is repainted. Useless.
+1 Reply
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/
+3 Reply
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
snapshot

Reply
accidentje cristian.d
Can your observation/hypothesis be tested with the back-test functionalities on TV?
Reply
cristian.d accidentje
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
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
That is not the way to trade this indicator.
Reply
Does this work for 2 min stock charts.. I have no clue about coding. Can u help.
Reply
Jurij MONEYMENOW
can't see why it should not work on a specific time frame, so yes
Reply
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
make sure you checked the "scale price chart only" option.
Right click on the chart -> Price Scale -> Scale price chart only
Reply
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
Are you sure this is not repainting?
Reply
lux5romtripp joe_vijay
is repainting bro... you cant see the arrows in online mode....
Reply
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
Read above, answer has been given at least 5 times.
Reply
When I apply this to my chart all the bars will disappear, am I doing something wrong or somebody else has the same situation?
+2 Reply
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
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
red and green bars show up after 10 bars have passed and a trend is confirmed.
+1 Reply
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
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.
+1 Reply
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
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
Right click near Y axis of chart and select Scale Price Chart only.
+2 Reply
wow.. it works.! thank you very much!
Reply
How do I set an alert either for small triangles or arrows
Reply
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
got it in scale price chart , thanx
Reply
awesome work mate :)
Like your work and appreciating your efforts...keep up the good work.
+2 Reply
script is distorting my graph, shrinking it, what can I do to rectify? thanks, Ian
Reply
For some reason i try using this on my.. chart but nothing shows.. everything is flat lined
Reply
Dude you are great i can happly say this indicator wks 100%for mee
Reply
@table, how do you use this indicator?
Reply
@table, look what happens on my chart could u help me
https://www.screencast.com/t/BxRHh77QG
Reply
Jurij etienne.marechal
@etienne.marechal,
https://www.tradingview.com/script/NBcEvyej-Transient-Zones-v1-1/#tc233220
Reply
Hi Jurij. Do you know how to convert your transient zones code to amibroker (AFL) code?
Reply
Hi,

With H4 the arrow will appear right after the 4th candle to the right of the arrow candle, correct?

And does it repaint, or is this the only lag and thats it?

Thanks in advance!
Reply
Hi is someone can help me i like this script i install it but when i activate in on my chart look in the small video screen shot what open , i can not see the indicator
https://www.screencast.com/t/BxRHh77QG
thks if u got the solution Guys
Etienne
Reply
How do I get arrows and triangles to appear under and over bars, instead of at the top of the chart in "tradingview"?
Reply
Link to the FF thread does no longer work, here working link:
https://www.forexfactory.com/showthread.php?t=434603&page=286
Reply
Jurij Jurij
@Jurij, what's up tradingview, you are missing with links....
FF thread link: https://goo.gl/PXeDxK
Reply
@Jurij, hi, genius
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Forex Signal Finder 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 Account and Billing Sign Out