Multiple Symbol using Renko

Created at 25 Jun 2020, 14:32
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!
MA

malas7malas

Joined 08.12.2019

Multiple Symbol using Renko
25 Jun 2020, 14:32


Hi 

I cant figure out how can I use multiple symbols on by cbot using Renko.

I'm trying to get EMA (Exponential moving average) price from all symbols using Renko

On the time frame I can loop through symbols using MarketData.GetBars function, but I don't seem to have Renko in the Timeframe.

            Bars BAR_EURUSD = MarketData.GetBars(TimeFrame.Minute15, "EURUSD");
            Bars BAR_GBPUSD = MarketData.GetBars(TimeFrame.Minute15, "GBPUSD");

            GBEMA50 = Indicators.ExponentialMovingAverage(BAR_GBPUSD.ClosePrices, 50);

            EUEMA50 = Indicators.ExponentialMovingAverage(BAR_EURUSD.ClosePrices, 50);

Is there a work around or is there another way of doing it? 

 

Thanks 

Malas


@malas7malas
Replies

PanagiotisCharalampous
25 Jun 2020, 14:57

Hi Malas,

Try passing the timeframe as a parameter. See below

        [Parameter(DefaultValue = 0.0)]
        public TimeFrame Timeframe { get; set; }

        protected override void OnStart()
        {
            Bars BAR_EURUSD = MarketData.GetBars(Timeframe, "EURUSD");
        }

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

malas7malas
25 Jun 2020, 18:16

Hi Panagiotis

You are genius I was trying to figure out for a week and I received resolution from you in 15 minutes. Thank you for all help and effort .


@malas7malas