"output type system.boolean" is not supported ctrader indicator

Created at 17 Apr 2023, 19:58
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!
huge.fuze's avatar

huge.fuze

Joined 17.04.2023

"output type system.boolean" is not supported ctrader indicator
17 Apr 2023, 19:58


My indicator suddenly stops working after an update, when I compile it give an error saying, "output type system.boolean" is not supported ctrader".

Can anyone please advise me of the right way to output a Boolean so that the cbot can use it ? 

My Boolean

 [Output("bearCrossActive")]

  public bool bullCrossActive; 

  [Output("bearCrossActive")]

  public bool bearCrossActive;

 [Output("LevelBuySignal")]

 public bool LevelBuySignal;

 [Output("LevelSellSignal")]

 public bool LevelSellSignal;

Thank you!


@huge.fuze
Replies

firemyst
18 Apr 2023, 15:44

The Output has to be an IndicatorDataSeries.

If you want a public property that other indicators/cBots can access, then you have to remove the [Output] designation and leave it as a public property in your class.

//Example:

//Instead of this:
 [Output("bearCrossActive")]

  public bool bullCrossActive;  


//You need to do this:
  public bool bullCrossActive;  


//or create your own indicator data series as an output:
public IndicatorDataSeries bullCrossActive

 

See this thread for some more information:

 


@firemyst

huge.fuze
19 Apr 2023, 08:56

RE:

firemyst said:

The Output has to be an IndicatorDataSeries.

If you want a public property that other indicators/cBots can access, then you have to remove the [Output] designation and leave it as a public property in your class.

//Example:

//Instead of this:
 [Output("bearCrossActive")]

  public bool bullCrossActive;  


//You need to do this:
  public bool bullCrossActive;  


//or create your own indicator data series as an output:
public IndicatorDataSeries bullCrossActive

 

See this thread for some more information:

 

 

Thank you very much, I really appreciate your assistance.


@huge.fuze