Replies

PanagiotisCharalampous
26 Jul 2018, 15:45

Hi Lavio,

Is it possible to have the full cBot code so that we can reproduce?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Jul 2018, 14:20

Hi John,

Yes this is what I mean. The issue appears only on cTrader Web.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Jul 2018, 09:50

Hi Waxy,

Transparency has already been added. We have a new Colors.FromArgb() function that allows you to set the alpha channel. Regarding interactivity, all chart objects have an IsInteractive property which is set to false by default.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Jul 2018, 09:42

Hi John,

I do not have a release date but it has been marked with the highest priority, so it should be released with the first update after it is resolved.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Jul 2018, 09:40

Hi hideki,

Thanks for posting in our forum.  MarketSeries.TickVolume.Last(1) is equivalent to MarketSeries.TickVolume[MarketSeries.TickVolume.Count - 2]. See corrected code below.

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class TestTickVolume : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        protected override void OnStart()
        {
            // Put your initialization logic here
        }

        protected override void OnBar()
        {
            Print(MarketSeries.TickVolume[MarketSeries.TickVolume.Count - 2]);
            Print(MarketSeries.TickVolume.Last(1));
        }

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

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Jul 2018, 09:32

Hi Noureldin,

Welcome to cTrader forum. Check this disucssion, it might be helpful for you https://ctrader.com/forum/fix-api/12196

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Jul 2018, 09:26

Dear Richard,

Welcome to the cTrader community. These lines visualize your deals and all of them together are called the deal map. The starting point represents the price and entry time of your opening deal and the ending point is the price and entry time of your closing deal. If you want to remove the deal map from the graph, just right click, go to Viewing Options and uncheck Deal Map.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
25 Jul 2018, 16:40

Hi John,

Fix is in progress. It will be fixed in an upcoming update.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
25 Jul 2018, 10:33

Hi tjahjadibudiali,

You can start by studying the following resources

Accessibility Levels

Polymorphish

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
25 Jul 2018, 09:30

Hi hiba7rain,

First of all you need to sort out the logic of what you are trying to do. Do you want the indicator to send an email once and never again? Then just raise a flag and do not reset it ever. But I guess your purpose is not that. Probably you would like to send one email per bar, when conditions are met. That is why proposed a cBot since it is easier to track bar changes with the OnBar() method. If you still want to keep the code in an indicator, there is nothing wrong with that, you just need to decide when you want your flag to be reset.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
25 Jul 2018, 09:20

Hi Vince,

I don't think getting rid of the indicator is a good idea. Keep the indicator and just move the notification sending part into the cBot. The indicator should keep working as is does and the cBot should just read the values of the indicator and send the emails whenever necessary.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Jul 2018, 15:34

Dear Trader,

Thanks for posting in our forum. Renko charts are still not available in cTrader. They will be available in v3.02 sometime this autumn. They will be available in cTrader Automate as well.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Jul 2018, 12:54

Hi Sasha,

I don't see an issue with the posted code. Could the problem be in another part? Maybe this part of the code is never reached to close the position.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Jul 2018, 11:59

Hi flores.ernestoiii,

No it will not work. Another option is to program the indicator to work for its timeframe and add the indicator on several charts with different timeframes. There is no need to code all timeframes in the indicator.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Jul 2018, 10:38

Hi hiba7rain,

It is not. You did not put the brackets.


@PanagiotisCharalampous

PanagiotisCharalampous
24 Jul 2018, 10:25

This is because you set _emailSent to true even if no email was sent. Change it to the following

                if ( !_emailSent)
                 {
                     Notifications.SendEmail("XXX@XX.com", "XXX@XX.com", Symbol.Code + "Signal", "XXXXX");
                     _emailSent = true;
                 }

 


@PanagiotisCharalampous

PanagiotisCharalampous
24 Jul 2018, 10:13

Hi hiba7rain,

What do you mean what you say it is not working? Is the email not sent? Is it sent multiple times? Alos note that I use a cBot and not an indicator,

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Jul 2018, 09:29

Hi flores.ernestoiii,

Thanks for posting in our forum. My advice would be not to send alerts from within the indicator but use a cBot instead that will read your indicator's value. Then you can use several cBots, one for each timeframe of interest that will send the relevant notifications.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Jul 2018, 09:24

Hi hiba7rain,

You could raise a flag as soon as you send a notification and check the flag in order not to send it again. See below an example

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewcBot : Robot
    {
        private bool _notificationSent;
        protected override void OnStart()
        {

        }

        protected override void OnTick()
        {
            var sendNotification = false;
            //  Make all your checks here and update sendNotification variable accordingly
            //   .
            //   .
            //   .
            if (sendNotification && !_notificationSent)
            {
                Notifications.SendEmail("email", "email", "Subject", "Text");
                _notificationSent = true;
            }
        }
        protected override void OnBar()
        {
            _notificationSent = false;
        }
        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }
    }
}

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Jul 2018, 09:14

Hi johnreygalax8,

See an example below

using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
    public class RoundNumbers : Indicator
    {
        [Parameter(DefaultValue = 100)]
        public int StepPips { get; set; }

        protected override void Initialize()
        {

        }

        public override void Calculate(int index)
        {
            ChartObjects.RemoveAllObjects();
            double max = MarketSeries.High.Maximum(MarketSeries.High.Count);
            double min = MarketSeries.Low.Minimum(MarketSeries.Low.Count);

            double step = Symbol.PipSize * StepPips;
            double start = Math.Floor(min / step) * step;

            for (double level = start; level <= max + step; level += step)
            {
                ChartObjects.DrawText("text_" + level, level.ToString(), index, level);
                ChartObjects.DrawHorizontalLine("line_" + level, level, Colors.Gray);
            }
        }
    }
}

Best Regards,

Panagiotis


@PanagiotisCharalampous