Studies-Overrides

One can set default style and inputs values for newly created indicators using studies_overrides parameter. Its value is expected to be an object where key is a path to property being changed and value is the new value for it. Example:

studies_overrides: {
    "volume.volume.color.0": "#00FFFF",
    "volume.volume.color.1": "#0000FF",
    "volume.volume.transparency": 70,
    "volume.volume ma.color": "#FF0000",
    "volume.volume ma.transparency": 30,
    "volume.volume ma.linewidth": 5,
    "volume.show ma": true,
    "bollinger bands.median.color": "#33FF88",
    "bollinger bands.upper.linewidth": 7
}

In the example above, in example, all created Bollinger Bands will have upper line width = 7 (unless you create it through API and have specified another value for this line).

How to set study name

You should use studies names as-they-are in the Insert Study dialog, but in lower case. So if you want to override default EMA's length, try using moving average exponential.length. The same principle works for inputs names: use names as you can see them in Study Properties dialog (use lower case also). Example: stochastic.smooth d.

Compare

You can customize new series added via Compare. Use compare.plot to customize the line and compare.source to change the price source:

"compare.plot.color": "#000000",
"compare.source": "high"

Overlay

Since 1.12 to customize Overlay you may use the following properties:

Overlay.style: (bars = 0, candles = 1, line = 2, area = 3, heiken ashi = 8, hollow candles = 9)
Overlay.showPriceLine: boolean

Overlay.candleStyle.upColor: color
Overlay.candleStyle.downColor: color
Overlay.candleStyle.drawWick: boolean
Overlay.candleStyle.drawBorder: boolean
Overlay.candleStyle.borderColor: color
Overlay.candleStyle.borderUpColor: color
Overlay.candleStyle.borderDownColor: color
Overlay.candleStyle.wickColor: color
Overlay.candleStyle.barColorsOnPrevClose: boolean

Overlay.hollowCandleStyle.upColor: color
Overlay.hollowCandleStyle.downColor: color
Overlay.hollowCandleStyle.drawWick: boolean
Overlay.hollowCandleStyle.drawBorder: boolean
Overlay.hollowCandleStyle.borderColor: color
Overlay.hollowCandleStyle.borderUpColor: color
Overlay.hollowCandleStyle.borderDownColor: color
Overlay.hollowCandleStyle.wickColor: color
Overlay.hollowCandleStyle.barColorsOnPrevClose: boolean

Overlay.barStyle.upColor: color
Overlay.barStyle.downColor: color
Overlay.barStyle.barColorsOnPrevClose: boolean
Overlay.barStyle.dontDrawOpen: boolean

Overlay.lineStyle.color: color
Overlay.lineStyle.linewidth: integer
Overlay.lineStyle.priceSource: open/high/low/close
Overlay.lineStyle.styleType: (bars = 0, candles = 1, line = 2, area = 3, heiken ashi = 8, hollow candles = 9)

Overlay.areaStyle.color1: color
Overlay.areaStyle.color2: color
Overlay.areaStyle.linecolor: color
Overlay.areaStyle.linestyle: (solid = 0; dotted = 1; dashed = 2; large dashed = 3)
Overlay.areaStyle.linewidth: integer
Overlay.areaStyle.priceSource: open/high/low/close

Syntax

Property path is a set of lower-case identifiers splitted with dot (.). Path formats are described below.

Remark: If a plot/band/area/input name is the same you can get an error. In this case you can specify an exact destination that you want to change by adding :plot, :band, :area or :input to the path. (e.g. short:plot.color)

Study input

Format: indicator_name.input_name

  • indicator_name: use name as you can see it in Indicators dialog.
  • input_name: use name as you can see it in indicator's properties dialog (for example, show ma)

Examples: volume.show ma, bollinger bands.length

Plot property

Format: indicator_name.plot_name.property_name

  • indicator_name: < ... >
  • plot_name: as you can see it in indicator's properties dialog (for example, Volume or Plot)
  • property_name: one of the following:
    • transparency
    • linewidth
    • plottype. Supported plot types are:
      • line
      • histogram
      • cross
      • area
      • columns
      • circles
      • line_with_breaks
      • area_with_breaks

Examples: volume.volume.transparency, bollinger bands.median.linewidth

Plot colors

Format: indicator_name.plot_name.color<.color_index>

  • indicator_name: < ... >
  • plot_name: < ... >
  • color. It is just a keyword.
  • color_index (optional): color index (if any). It's just an ordinal number of a color for this plot. I.e., to replace the color which is green by default for Volume, one should use color_index = 1.

Remark 1: color.0 is a synonym of color .So paths volume.volume.color.0 and volume.volume.color are treated to be the same.

Remark 2: For now, customizing area fill color and transparency is not supported.

Limitations:

  • Only #RRGGBB format is supported for colors. Do not use short format #RGB.
  • Transparency varies in [0..100] range. 100 means plot is fully opaque.
  • Thickness is an integer.

Default precision

Since 1.6 you can change default precision of studies using name.precision format. Example:
"average true range.precision": 8

?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
  • 序言:七十年代末抵窒,一起剝皮案震驚了整個濱河市弛针,隨后出現的幾起案子,更是在濱河造成了極大的恐慌李皇,老刑警劉巖削茁,帶你破解...
    沈念sama閱讀 211,817評論 6 492
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現場離奇詭異掉房,居然都是意外死亡茧跋,警方通過查閱死者的電腦和手機矛辕,發(fā)現死者居然都...
    沈念sama閱讀 90,329評論 3 385
  • 文/潘曉璐 我一進店門捕虽,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人汰具,你說我怎么就攤上這事哪亿≈嗨福” “怎么了贤笆?”我有些...
    開封第一講書人閱讀 157,354評論 0 348
  • 文/不壞的土叔 我叫張陵,是天一觀的道長讨阻。 經常有香客問我芥永,道長,這世上最難降的妖魔是什么钝吮? 我笑而不...
    開封第一講書人閱讀 56,498評論 1 284
  • 正文 為了忘掉前任埋涧,我火速辦了婚禮,結果婚禮上奇瘦,老公的妹妹穿的比我還像新娘棘催。我一直安慰自己,他們只是感情好耳标,可當我...
    茶點故事閱讀 65,600評論 6 386
  • 文/花漫 我一把揭開白布巧鸭。 她就那樣靜靜地躺著,像睡著了一般麻捻。 火紅的嫁衣襯著肌膚如雪纲仍。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,829評論 1 290
  • 那天贸毕,我揣著相機與錄音郑叠,去河邊找鬼。 笑死明棍,一個胖子當著我的面吹牛乡革,可吹牛的內容都是我干的。 我是一名探鬼主播摊腋,決...
    沈念sama閱讀 38,979評論 3 408
  • 文/蒼蘭香墨 我猛地睜開眼沸版,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了兴蒸?” 一聲冷哼從身側響起视粮,我...
    開封第一講書人閱讀 37,722評論 0 266
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎橙凳,沒想到半個月后蕾殴,有當地人在樹林里發(fā)現了一具尸體,經...
    沈念sama閱讀 44,189評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡岛啸,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 36,519評論 2 327
  • 正文 我和宋清朗相戀三年钓觉,在試婚紗的時候發(fā)現自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片坚踩。...
    茶點故事閱讀 38,654評論 1 340
  • 序言:一個原本活蹦亂跳的男人離奇死亡荡灾,死狀恐怖,靈堂內的尸體忽然破棺而出,到底是詐尸還是另有隱情批幌,我是刑警寧澤础锐,帶...
    沈念sama閱讀 34,329評論 4 330
  • 正文 年R本政府宣布,位于F島的核電站逼裆,受9級特大地震影響,放射性物質發(fā)生泄漏赦政。R本人自食惡果不足惜胜宇,卻給世界環(huán)境...
    茶點故事閱讀 39,940評論 3 313
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望恢着。 院中可真熱鬧桐愉,春花似錦、人聲如沸掰派。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,762評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽靡羡。三九已至系洛,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間略步,已是汗流浹背描扯。 一陣腳步聲響...
    開封第一講書人閱讀 31,993評論 1 266
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留趟薄,地道東北人绽诚。 一個月前我還...
    沈念sama閱讀 46,382評論 2 360
  • 正文 我出身青樓,卻偏偏與公主長得像杭煎,于是被迫代替她去往敵國和親恩够。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 43,543評論 2 349

推薦閱讀更多精彩內容