TradingView
fxmaruchan
27 Th11 2018 02:09

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

USD/JPYOANDA

Mô tả

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

Phát hành các Ghi chú

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