Closed tikidave closed 5 years ago
Inside the predef module, there is a color option:
predef
color
color(defValue) { return { type: ParamType.COLOR, def: defValue }; }
I have implemented it in the params code this way:
params
params: { upColor: predef.paramSpecs.color('lime'), downColor: predef.paramSpecs.color('red'), },
When the indicator is added, the color pickers are not available in the UI:
However it does pick up the default props in the indicator:
props
style: { value: { color: close > priorClose ? this.props.upColor : this.props.downColor } }
Here is a spec for parameter: https://tradovate.github.io/custom-indicators/params.html When a new parameter type will be available on all our platforms, the doc will be updated.
Inside the
predef
module, there is acolor
option:I have implemented it in the
params
code this way:When the indicator is added, the color pickers are not available in the UI:
However it does pick up the default
props
in the indicator: