BarOutputAttribute constructor
constructor · BarOutputAttribute · cAlgo.API Since 5.4
DesktopCLICloud
Initializes a new instance of the BarOutputAttribute and sets the name.
Definition
public BarOutputAttribute(string name)
BarOutputAttribute(name: str)
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
name | string | str |
Examples
public partial class BarOutputSample : Indicator
{
public override void Calculate(int index)
{
Result[index] = new OhlcvBar(Bars.OpenPrices[index], Bars.HighPrices[index], Bars.LowPrices[index], Bars.ClosePrices[index], (long)Bars.TickVolumes[index]);
}
}
def calculate(self, index):
api.Result[index] = OhlcvBar(api.Bars.OpenPrices[index], api.Bars.HighPrices[index], api.Bars.LowPrices[index], api.Bars.ClosePrices[index], int(api.Bars.TickVolumes[index]))
{
"AccessRights": "None",
"IsOverlay": false,
"BarOutputs": [
{
"Name": "Result",
"DisplayName": "Main"
}
]
}