Acessing the OutputType

Created at 31 Dec 2021, 16:28
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
YC

ycomp

Joined 16.10.2013

Acessing the OutputType
31 Dec 2021, 16:28


How can I access the OutputType programmatically? I'm trying to specify line thickness with a Parameter and apply that to the plot.

[Parameter("Width", DefaultValue = 1, MinValue = 1, MaxValue = 10)]
        public int Width { get; set; }
 [Output("1", PlotType = PlotType.Line, LineColor = "White", Thickness = Width)]
        public IndicatorDataSeries ExtMapBuffer1 { get; set; }

this doesn't work, but you get the idea of what I'm trying to do. How can I set the thickness from the Width parameter?


@ycomp
Replies

firemyst
02 Jan 2022, 15:05

The width has its own configurations in the cTrader window for anything that's marked as "Output", so using the parameter in that way is irrelevant.

If you're drawing a line of any sort, that's where you'd use a separate width parameter.


@firemyst

amusleh
03 Jan 2022, 09:08

Hi,

You can't, there is no way to set/get the output attribute properties programmatically, you can only set default values and user will be able to change those values via Indicator parameters window.


@amusleh

ycomp
03 Jan 2022, 17:11 ( Updated at: 21 Dec 2023, 09:22 )

RE:

it's not irrelevant when you have a lot of outputs, but I understand anyhow - not possible.

firemyst said:

The width has its own configurations in the cTrader window for anything that's marked as "Output", so using the parameter in that way is irrelevant.

If you're drawing a line of any sort, that's where you'd use a separate width parameter.

 


@ycomp