bolling band value not changed

12 Jul 2019, 05:42bolling band value not changed#1
zhaow7-139posts: 2since: 10 Jul 2019

The boll band indicator has problem .The bottom value and the top value doesn't changed.

 

test sourcecode:


namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Test : Robot
    {
        private BollingerBands bb;

        protected override void OnStart()
        {
            // Put your initialization logic here
            bb = Indicators.BollingerBands(MarketSeries.Close, 20, 2, MovingAverageType.Simple);
            Print("Test:now-{0},top:{1},bottom:{2}", MarketSeries.Close.Last(1), bb.Top.Last(1), bb.Bottom.Last(1));

        }

        protected override void OnBar()
        {
            Print("Test:now-{0},top:{1},bottom:{2}", MarketSeries.Close.Last(1), bb.Top.Last(1), bb.Bottom.Last(1));

        }

        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }
    }
}

17 Jul 2019, 11:48#2
Panagiotis Charalampousposts: 3006since: 13 Jan 2017

Hi zhaow7-139,

Thanks for posting in our forum. We would need some more information Where did this happen? On backtesting? On live testing? Which broker? Are there any steps to reproduce the problem? Did you experience any disconnections before this happened?

Best Regards,

Panagiotis


Head of Community Management at cTrader
17 Jul 2019, 11:55RE:#3
zhaow7-139posts: 2since: 10 Jul 2019

Panagiotis Charalampous said:

Hi zhaow7-139,

Thanks for posting in our forum. We would need some more information Where did this happen? On backtesting? On live testing? Which broker? Are there any steps to reproduce the problem? Did you experience any disconnections before this happened?

Best Regards,

Panagiotis

On live.

Fxpro.

you can create a new cbot.

use the sourcecode with I attach.

Then just run to see the log.  Use 30 minute Timeframe or 15 minute timeframe .

It may happen after many hours.

 

17 Jul 2019, 12:11#4
Panagiotis Charalampousposts: 3006since: 13 Jan 2017

Hi zhaow7-139,

There was a known issue that could cause this after a disconnection. It will be fixed in the next major update of cTrader.

Best Regards,

Panagiotis


Head of Community Management at cTrader