How to build an indicator in a cbot with DataSeries

jwandia2022 since: 30 Sep 2022;

  08 Nov 2022, 20:04
How to build an indicator in a cbot with DataSeries

Hi,

I'm just curious since I have tried building out an indicator in a cbot with the parameters below but errors keep on coming time and again. How can one call these indicator parameters to the cbot on the OnStart section? I have added my own version on the OnStart but this does not seem to work.

Joyce.

From Indicator
public class xyz : Indicator

[Parameter("High")]
public DataSeries High { get; set; }
 
[Parameter("Low")]
public DataSeries Low { get; set; }
 
[Parameter("Strength", DefaultValue = 5, MinValue = 1)]
public int strength { get; set; }
 

To Cbot
Indicator Declarations
private xyz ss;

On Start Indicator BuildOut
=======>       ss = indicators.GetIndicator<xyz>(High,Low,5)  <=====================

jwandia2022 since: 30 Sep 2022;

  09 Nov 2022, 09:24
RE: How to build an indicator in a cbot with DataSeries

Hi,

The two errors I'm getting while building out the indicator in the cbot are:

  1. Error CS0103: The name 'High' does not exist in the current context
  2. Error CS0103: The name 'Low' does not exist in the current context

Joyce

PanagiotisChar's avatar

PanagiotisChar since: 15 Sep 2022;

  09 Nov 2022, 16:08

Hi there,

It's better to share the complete cBot and Indicator code so that we can advise.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

Cofounder and Chief Technologist at Aieden Technologies

jwandia2022 since: 30 Sep 2022;

  11 Nov 2022, 13:30
RE:

Hi

Found a solution already from one of the forums. Thank you.

Joyce.