croucrou's avatar


Member since: 24 Feb 2016





Last Algorithm Comments

@News - DailyFx Economic Calendar:  11 Mar 2016, 15:10

Build succeeded, but nothing is showing up neither in the log nor on the screen.


Does the indicator still work?

Last Forum Posts

@cAlgo - Features Coming Soon in cAlgo.API:  08 Oct 2017, 17:46

It will become possible to increase the size of a position of change the position’s side using cAlgo.

Could you please explain, what does it mean exactly. Will it be possible to modify volume of a position during backtesting?

Are you able to say when could the update be possibly expected?

Thank you.

@Execute OnBar() every minute:  21 Sep 2017, 16:41

If you run your robot on the M1 timeframe, the OnBar() logic will execute every minute.

If you are asking about backtesting, you select the timeframe from the menu below the symbol.

@Execute OnBar() every minute:  20 Sep 2017, 19:49

OnBar() executes every minute on the M1 timeframe.

@Take Profits not Triggered:  07 Sep 2017, 16:11

If it is on the 1 min chart, isn't that a bid/ask issue?

@Has touched:  01 Sep 2017, 01:27

I would do it like:

        MovingAverage myEma;
        int x;

        double ema(int index)
            return myEma.Result.Last(index);

        protected override void OnStart()
            myEma = Indicators.MovingAverage(MarketSeries.Close, 20, MovingAverageType.Exponential);

        protected override void OnBar()
            x = 10;

            for (int i = 1; i <= x; i++)
                if (ema(i) >= MarketSeries.Low.Last(i) && ema(i) <= MarketSeries.High.Last(i))
                else if (i == x && !(ema(i) >= MarketSeries.Low.Last(i) && ema(i) <= MarketSeries.High.Last(i)))
                    Print("The price haven't touched EMA for the last {0} bars", i);

Notice that OnBar logic is executed with the start of new bar, so it doesn't take the action on the current bar into account.

If you want to include the current bar into the check, you might want to use OnTick. 

@Has touched:  28 Aug 2017, 17:04

Make a "for" loop up to 20, to check if the moving average is smaller than the bar's high and higher than the bar's low at the same time.

@AutoChartist Problems:  25 Aug 2017, 16:11

It's working now.

Thank you.

@AutoChartist Problems:  25 Aug 2017, 02:25

It has been giving the same information for last couple of days.

Have you experienced the same?

@Adjusting start time:  21 Aug 2017, 14:42

It has been answered several times:


@Set output from code to be invisible on the chart:  31 Jul 2017, 17:10

Thank you for responding.

The funcionality could be set up by an output option: "Display = true/false".

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.

No uploaded.

Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.

No uploaded.