ObjectStackLibrary "ObjectStack"
init()
push()
push()
push()
push()
push()
nextIndex()
nextIndex()
nextIndex()
nextIndex()
nextIndex()
delete()
delete()
delete()
delete()
delete()
cleanOldest()
cleanOldest()
cleanOldest()
cleanOldest()
cleanOldest()
Stack
[CLX][#03] Object-Stack (Labels/Lines/Boxes)This script shows an example of how to manage objects (lines/labels/boxes) and prevent the need of garbage collecting and missing objects.
You only have to push your object into the right array.
*_FIXED (left-lock) or *_FORWARD (right-lock)
We hope you enjoy it! 🎉
CRYPTOLINX - jango_blockchained 😊👍
Disclaimer:
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely.
The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold cryptolinx TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script.
BEST Exit Investment StackHello traders
💎 Access to this paid script can be requested through our website: link is in my signature and on my profile page (www.tradingview.com)
💎 This script is not a trading indicator but an exit investment indicator.
After a big move and especially when we're at All-time-high or all-time-low levels, it's really a best random guess to exit.
We designed this algorithm to give an early TOP/BOTTOM signal allowing to exit near:
the highest price of a LONG movement
the lowest price of a SHORT movement
We built this system knowing the followings:
1) Any asset moving strongly UP or DOWN will retrace at some point.
2) And the faster it goes UP/DOWN, the more violently it will retrace.
This is one of the few guarantees we have in trading - the market MUST punish the greedy investors/traders who dare never taking profit
This indicator is really amazing
📊 Performance
This is a very simple trading strategy.
It's never easy to take profit as we always fear of missing out.
Now, it's much easier and designed to:
multiply your stack
give a few trades per year only
What to do after exiting your stack?
1) Best case scenario:
You were long and exited and then it drops a lot.
The perfect scenario where we can get back in with a dollar cost average methodology or using your favorite trading indicator(s)
2) You exited but it keeps going and going
That's totally OK to take profit, this is never a mistake - repeat it an hundred times until your brain agrees with this statement.
Of course, you can re-enter using your favorite indicator(s)
Even if the scenario 2) happens, the scenario 1) should largely offset the missed-out profits.
Which asset classes?
Compatible with anything than can be held long-term.
Namely, cryptocurrencies, stocks, commodities.
⌚ Which Timeframes?
It's compatible with an hourly and a 2-hours timeframes.
We mostly use here the H2 timeframe to exit our HODL positions
🔔 Alerts
Alerts are obviously enabled for both directions
Best regards
Dave
Data Structure StackThe script shows a workaround for stack in pine-script via drawings.
There are few restrictions with them:
1. The depth of the stack cannot be more that amount of allowed drawings (about 40 by now)
2. Because the stack shares the space of drawings throughout the whole script, using drawings with the stack must be careful, with handly creating and removing of each drawing, because otherwise pine's garbage collector might break the stack
3. push() and pop() must be called on every bar, because of implementation of functions in pine there are inner serieses, which must be updated on every bar. So wherever you have a setter or getter in the code - it must be called on every bar. But if it's just an update, then you should pass 'false' as a param of the funtion.
And the example of using the stack: if the stack is empty - then fill it and taking by a value per bar till the stack is emty and then fill it again.