TradingView
fxmaruchan
2018年11月27日午前2時9分

[code-piece] change plotted color with input() 

USD/JPYOANDA

詳細

plotted colored moving average.

Plotted color can be changed by indicator's setting dialog.
It's useful for user to be able to change the color according to background color.

1 = red
2 = blue
3 = green
4 = yellow
5 = lime
6 = aqua
7 = orange
8 = white
other = black

リリースノート

Updated to Pine V4.
コメント
daisuke_gewinn
サンプルコードありがとうございます。
休日スクリプトに反映してみたら、コンパイルは通るのですが、internal server error で実行できない状態になるようです。
if文代用、plotshape内color値に式描画等、関数化、いろいろやってみましたが、どうもplotshapeの数が多すぎるのが原因の様子です。ある程度の数までは指定できるのですが、途中からダメになります。
fxmaruchan
@daisuke_gewinn, なるほど。そのエラーは確かに内部的な制限に引っかかっているようですね。。。後ほどholidayコードも拝見させて頂き、何かワークアラウンドがあればまたコメントさせて頂きます。
詳細