Replies

PanagiotisCharalampous
12 Apr 2018, 14:06

Hi ycomp,

It kicks in immediately.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
12 Apr 2018, 09:55

Dear Trader,

Thanks for posting in our forum. See below an example

            var index = MarketSeries.Low.Count - 1;
            var low = MarketSeries.Low[index];
            var text = low.ToString();
            var xPos = index;
            var yPos = low;
            var vAlign = VerticalAlignment.Bottom;
            var hAlign = HorizontalAlignment.Right;
            ChartObjects.DrawHorizontalLine("LongTargetLine", low, Colors.Lime, 1, LineStyle.Lines);
            ChartObjects.DrawText("LongText", "Long Target", xPos, yPos, vAlign, hAlign, Colors.Lime);

You can adjust it based on your parameters

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
12 Apr 2018, 09:50

Dear dordkash@gmail.com,

If you mean how to adjust the size of the text drawn by DrawText() function, currently there is no such possibility.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
12 Apr 2018, 09:25

Hi yearn2012,

cAlgo code currently uses .Net Framework 4.0, therefore C# 7.1 features are not supported.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
11 Apr 2018, 15:23

Hi nordic,

Can you please refresh your chart and let me know if this still happens?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
11 Apr 2018, 09:24

Hi cintuanginbox,

Could you please send us the install log as well as the extension files to check? Also, which cTrader do you use 2.01 or 3.0?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 17:28

Hi nordic,

There was an issue with the settings and the spread for this symbol. We fixed it. Check now.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 16:45

Hi nordic,

Thanks for posting in our forum. Indeed the closing price seems very weird. Could you send us a screenshot of the chart you see and maybe the deal plotted (right click on chart > Viewing Options > Deal Map) on so that we can see the price movement at that moment?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 14:08

Hi Anton,

You can use custom indicators as well. Read how to do this here.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 12:58

Dear Trader,

In cTrader 3.0 you will be able to modify the volume as well. You can download the beta version here.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 12:30

Hi Anton,

Since you cannot provide me with the indicator, please see below how you can access the values of an SMA indicator from a cBot.

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

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC)]
    public class NewcBot : Robot
    {
        private SimpleMovingAverage _sma;

        protected override void OnStart()
        {
            _sma = Indicators.SimpleMovingAverage(MarketSeries.Close, 14);
        }

        protected override void OnBar()
        {
            Print(_sma.Result.LastValue);
        }

        protected override void OnStop()
        {

        }
    }
}

You can adjust the above sample to your indicator.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 11:30

Hi yearn2012,

See below

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

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

        protected override void OnStart()
        {
            var form = new Form();
            form.Show();
        }

        protected override void OnTick()
        {

        }

        protected override void OnStop()
        {

        }
    }
}

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 11:24

Hi anton.kovalchuk,

If you could share the indicator with us, then maybe we could create an example for you.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 11:19

Hi xjavicx,

Thanks for posting in our forum. Did you try to contact your broker regarding this? 

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 11:13

Hi to all,

We will consider adding this feature in a future release. In the meanwhile, a workaround would be to have an integer as a parameter which would then convert to the timeframe within the cBot. A bit sloppy solution but it would work.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 11:05

Hi yearn2012,

You need to change the object name each time. See below an example

ChartObjects.DrawLine(index.ToString(), index - 1, 0, index - 1, 131, Colors.Red, 2, LineStyle.Solid);

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 10:58

Hi yearn2012,

You can use a condition in the Calculate function and skip the calculation for bars before a certain time. See below

        private DateTime _openTime;
        protected override void Initialize()
        {
            // Initialize and create nested indicators
        }

        public override void Calculate(int index)
        {
            if (MarketSeries.OpenTime[index] > _openTime)
            {
                // Calculate Indicator;
            }
        }

Let me know if this helps,

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 10:50

Dear yearn2012,

Please post your issue in a separate thread as it is not related with this one.

Dear fermjy,

You are welcome to post your suggestion in the Suggestions section of our forum.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 10:45 ( Updated at: 21 Dec 2023, 09:20 )

Hi Sasha,

Each broker can configure different min and max volumes for each symbol. See below the relevant information for the two brokers you mentioned

FxPro

Kawase

The issue here is that cAlgo cannot handle fractional volumes, therefore in the case of Kawase it rounds it down to 0. This will be resolved with cTrader 3.0.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Apr 2018, 10:36

Dear Trader,

Thanks for posting in our forum. You can use Modify Position to achieve that.

Let me know if this helps.

Best Regards,

Panagiotis


@PanagiotisCharalampous