Replies

soskrr
06 Oct 2024, 08:51 ( Updated at: 06 Oct 2024, 12:12 )

RE: RE: RE: Is it possible to get values from ChartIndicator

firemyst said: 

soskrr said: 

PanagiotisCharalampous said: 

Hi there,

It is not possible to get the values from the chart indicator. You would need to create the indicator inside your cBot instead.

Best regards,

Panagiotis

Hi there,

Let's say I have the Indicator's name “MovingAverage”, how can I create the indicator using that string? 

		assembly = typeof(cAlgo.API.Indicators.MovingAverage).Assembly;        Type type = assembly.GetType("cAlgo.API.Indicators.SimpleMovingAverage");        object instance = Activator.CreateInstance(type, new obj[] { //prams });

Can I use an assembly to do this ?

 

Thank you

 

Did you even look at the example URL link I provided? 

Spotware has provided an example there for the SMA.

 

hi,

it's a different scenario. I know how to initialise an indicator. what i am trying to do is, first getting all names of indicators added to a chart. then from the names i can initailie indicators (We don't know what indicators they will be). Finally, we can read their values. Hope I explained clear.

I think using System.Reflection can achieve that.

object result = Indicators.GetType().GetMethod("IndicatorName").Invoke(Indicators, new object[] { params };DataSeries data = (DataSeries)result.GetType().GetProperty("PropertyName").GetValue(result);

  That's what I think that can achieve my thoughts, I don't know if it is the right way. Please correct me if i am wrong.

 

Thank you


@soskrr

soskrr
06 Oct 2024, 08:37

RE: RE: RE: Is it possible to get values from ChartIndicator

firemyst said: 

soskrr said: 

PanagiotisCharalampous said: 

Hi there,

It is not possible to get the values from the chart indicator. You would need to create the indicator inside your cBot instead.

Best regards,

Panagiotis

Hi there,

Let's say I have the Indicator's name “MovingAverage”, how can I create the indicator using that string? 

		assembly = typeof(cAlgo.API.Indicators.MovingAverage).Assembly;        Type type = assembly.GetType("cAlgo.API.Indicators.SimpleMovingAverage");        object instance = Activator.CreateInstance(type, new obj[] { //prams });

Can I use an assembly to do this ?

 

Thank you

 

Did you even look at the example URL link I provided? 

Spotware has provided an example there for the SMA.

 

Hi,

It's a different scenario


@soskrr

soskrr
05 Oct 2024, 22:37

RE: Is it possible to get values from ChartIndicator

PanagiotisCharalampous said: 

Hi there,

It is not possible to get the values from the chart indicator. You would need to create the indicator inside your cBot instead.

Best regards,

Panagiotis

Hi there,

Let's say I have the Indicator's name “MovingAverage”, how can I create the indicator using that string? 

		assembly = typeof(cAlgo.API.Indicators.MovingAverage).Assembly;
        Type type = assembly.GetType("cAlgo.API.Indicators.SimpleMovingAverage");
        object instance = Activator.CreateInstance(type, new obj[] { //prams });

Can I use an assembly to do this ?

 

Thank you


@soskrr

soskrr
28 Sep 2024, 13:49 ( Updated at: 29 Sep 2024, 04:41 )

RE: MacOS App Backtesting

akhilascoder said: 

Backtesting is now available in Mac (Version 5.0 (20)). I'm using it for a while now.

Hi

How did you get the update?

 


@soskrr