Indicator event listeners

Created at 27 Jan 2020, 22:23
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!
CA

calgodemo

Joined 28.05.2019

Indicator event listeners
27 Jan 2020, 22:23


Hey All,

I'm developing a multi-tf indicator and I am hoping to call the indicator on a new bar event.

The indicator does not hit/break on the event handler code, I'm wondering if the indicator can use the event Bars.BarOpened += Bars_BarOpened and subsequent function?

 

Thanks! code snippet below.

CaD

 

[Parameter("2nd Indicator TimeFrame", DefaultValue = "Hour4")]
        public TimeFrame SecondaryTimeframe { get; set; }
.
.
.

protected override void Initialize()
        {

            TriggerSeries = MarketData.GetBars(SecondaryTimeframe);
           

            Bars.BarOpened += Bars_BarOpened;
            TriggerSeries.BarOpened += TriggerSeries_BarOpened;
        }

        private void TriggerSeries_BarOpened(BarOpenedEventArgs obj)
        {
        }

 


@calgodemo
Replies

PanagiotisCharalampous
29 Jan 2020, 11:31

Hi calgodemo,

This should work on indicators as well. If you can share the complete indicator code, we can have a look.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

calgodemo
30 Jan 2020, 17:47

RE:

PanagiotisCharalampous said:

Hi calgodemo,

This should work on indicators as well. If you can share the complete indicator code, we can have a look.

Best Regards,

Panagiotis 

Join us on Telegram

can I share with you privately?


@calgodemo

PanagiotisCharalampous
03 Feb 2020, 09:25

RE: RE:

Hi calgodemo,

You can send it to me at community@spotware.com.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous