How to build an indicator in a cbot with DataSeries

Created at 08 Nov 2022, 20:02
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!
JW

jwandia2022

Joined 30.09.2022

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


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
Replies

jwandia2022
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


@jwandia2022

PanagiotisChar
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

 


@PanagiotisChar

jwandia2022
11 Nov 2022, 13:30

RE:

Hi

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

 

Joyce.


@jwandia2022