Replies

PanagiotisCharalampous
28 Apr 2020, 11:10

Hi Luca,

See an example 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 NewcBot : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        Symbol _symbol;
        protected override void OnStart()
        {
            _symbol = Symbols.GetSymbol("EURUSD");
        }

        protected override void OnTick()
        {
            // Put your core logic here
        }

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

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
28 Apr 2020, 11:04

Hi MrAnderson,

Can you please try refreshing the page using Ctrl+F5? Let us know if this resolves the issue.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
28 Apr 2020, 08:40

Hi office3131,

It seems you are using an indicator that uses data from other timeframes. There is an issue in optimization for such cases. It will be resolved in a future update.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
28 Apr 2020, 08:24

Hi nhatitp,

Execution issues should be investigated by your broker. However it seems a high spread issue to me.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
28 Apr 2020, 08:21

Hi bodhisvaha.forex,

Equity is not provided by the API. You need to calculate it yourself using the balance and the P&L of the open positions.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
28 Apr 2020, 08:19

Hi,

See below

var sellPositions = Positions.Where(x => x.TradeType == TradeType.Sell);

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 16:46

Hi Cnicholasdownie,

No this is not possible and we do not have plans to add such an option. You cannot change the chart timeframe while the cBot is running.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 12:20

Hi victor.major,

For the Sample Breakout Bot, can you please provide me with the following?

1) Broker

2) Symbol

3) Oprimization Dates.

4) Parameters set that gives different results

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 12:04

Hi chay,

I will fix this for you as soon as I find some time :)

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 12:02

Hi ergun,

Yes this is correct because the referenced indicator does not know how many bars are to be calculated yet.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 11:31

Hi chay,

This is the indicator's problem. It doesn't load enough data to display values in past dates. To work properly on backtesting the programmer has to reprogram it so that it gets enough data from the other timeframes in order to properly display values for past dates.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 11:10

Hi alessio200881,

Can you please make your question a bit more specific? Can you give us an example? What values do you want to get?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 10:55

Hi there,

Can you check again and let us know if still receive this message?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 10:54

Hi Eliezer,

I did not understand what do you need. Can you please provide a more detailed explanation? Maybe a drawing depicting what you expect to see?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 10:45

Hi simone.andriano,

You can find all necessary information here. Let me know if you have any specific questions.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 10:41

Hi alessio200881,

This is already available in cTrader Web.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 10:10

Hi ergun,

If you remove the following code, it should work fine

            if (IsLastBar)
            {
                return;
            }

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 09:45

Hi bodhisvaha.forex,

This tag is only used for limid orders. You cannot use it for a market order

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 09:44

Hi there,

If you need to access all positions, then you just need to stop filtering them by label. Just use the Positions collection directly.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
27 Apr 2020, 09:40

Hi victor.major,

Can you please provide the complete cBot code and steps to reproduce the issue?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous