TradingView
Peter_O
5 Eyl 2019 09:37

How to Collapse, hide, fold blocks of your code 

Euro Fx/U.S. DollarFXCM

Açıklama

This script contains no trading value. This is no indicator.
It is only showing how to use a powerful editor feature:

To collapse (hide, fold) and expand (unhide, unfold) some blocks of your code.

Don't tell me you never wished it was there ;)
Well - it is!

How to enable it?
Look at line 4 of this script. It starts with //, but then there is this "opening curly bracket"
- it marks where block of code starts.
It produces that small arrow near number "4" of the code line, which you can click.
You close the block with "closing curly bracket" in line 18.

Thanks @RicardoSantos for showing me this!

Next breakthrough editor feature like that will be Search&Replace. Stay tuned!

*********
Forex / Indices / Commodities traders who want to start AUTO-TRADING might want to take a look at tradingconnector.com, which allows no-latency trades execution from TradingView to MT4.
Yorumlar
jwbrenna
nice, thanks, I wish the default can be set to closed also since all of the blocks are opened when a script is opened
aidonaks
@jwbrenna, @Peter_O This is indeed very helpful. Did you ever find out how to set the default as closed?
Dumitavi
@jwbrenna, This clip doesn't seem to be available anymore. How did he do it?
premiernc
@jwbrenna, Looks like ALT and click collapses all of the brackets. Cant figure out what expands them all.
ParametricTrading
@premiernc, ALT+ click cycles through opening and collapsing the brackets. 2nd click will be the opposite of what the first did.
TY19
Thanks @Peter_O for sharing the knowledge.
Duyck
Awesome!! :-D
e2e4mfck
Perfect, thank you!
Phince
That is really helpful. Thanks!
AlphaBotSystem
Thanks a lot for this!
Daha Fazla