MichelT

Data structure List

The script shows a workaround for list in pine-script via drawings.
There are few restrictions with them:
1. The size of the list cannot be more that amount of allowed drawings (about 40 by now)
2. Because the list shares the space of drawings throughout the whole script, using drawings with the list must be careful, with handly creating and removing of each drawing, because otherwise pine's garbage collector might break the list
3. Setters and Getters 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 an example of using the list - reversing of the list. When the list have been created, it's filled on every bar and then gets reversed. Plots show result before and after reversing of the list.
There are also some pieces of commented code showing possible way of working with another funtions of the list.
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?