PanagiotisCharalampous's avatar
PanagiotisCharalampous
26 follower(s) 0 following 1006 subscription(s)
Replies

PanagiotisCharalampous
26 Feb 2018, 14:04

Hi Ochosama,

No this is not meant to be used in cTrader. FIX API is way to trade with your cTrader account without having to use cTrader. You can use it to develop your own trading software. If you explain us why do you want to use FIX API in the first place then maybe I can guide you with more relevant information.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Feb 2018, 12:53

Hi Alexander,

There is an image button when you are creating the post, use that. Else send the screenshots to community@spotware.com. Also sending the cBot would be helpful so that we can reproduce the problem.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Feb 2018, 12:40

Hi jjwes76@gmail.com,

Yes this is possible. 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
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewcBot : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }
        [Parameter(DefaultValue = 0.0)]
        public double TargerPrice { get; set; }
        private SimpleMovingAverage _sma;
        protected override void OnStart()
        {
            _sma = Indicators.SimpleMovingAverage(MarketSeries.High, 5);
        }

        protected override void OnTick()
        {
            if (_sma.Result.LastValue < TargerPrice)
                ExecuteMarketOrder(TradeType.Sell, Symbol, 1000);
        }

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

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Feb 2018, 12:25

Hi Ochosama,

Indeed cTrader provides FIX API for each cTrader account.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Feb 2018, 12:21

Hi Alexander,

It is not clear what was the problem. What do you mean that optimization was not working?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Feb 2018, 12:05

Hi again,

We have posted an announcement about this issue and instructions on how to fix it. You can find it here

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Feb 2018, 11:50

Hi Ochosama,

Thanks for posting in our forum. These credentials are not related with cTrader. If you want to use FIX API with cTrader you need to create a cTrader account with your broker. You can read more details about cTrader FIX API here.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Feb 2018, 11:29

Hi everybody,

Our product teams are aware of the issue and are working to resolve this. This seems to happen during the weekends. It should not happen during trading hours. I will keep you informed as soon as we have some updates.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Feb 2018, 11:17

Hi daguerfi,

When did you observe this behavior? Was it during a weekend?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
26 Feb 2018, 10:26

Hi everybody,

This might happen during weekends when cTrader is in maintenance mode.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Feb 2018, 10:41

Hi jamesricketts24,

Thanks for posting in our forum. We have replied officially regarding this issue in this post.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
22 Feb 2018, 13:02

Hi irmscher9,

Stop Loss is executed as a market order. Therefore slippage is expected, especially when a market is crashing against you. Practically there isn't anything you can do. You cannot sell an asset at a price you want if there is nobody willing to buy it at that price.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
21 Feb 2018, 10:33

Hi tmc,

This has been fixed and will be released with the next update.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
20 Feb 2018, 17:00

Hi irmscher9,

It seems there is an issue with historical data for the specific day. We will fix it and inform you. In the meanwhile, you can continue backtesting using Spotware cAlgo.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
20 Feb 2018, 12:48 ( Updated at: 21 Dec 2023, 09:20 )

Hi Alexander,

You can disable the respective email alerts. See below

Let me know if this helps,

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
20 Feb 2018, 12:09

Hi irmscher9,

I tried to reprocude with the given code but could not. Can you post the complete cBot as well as backtesting parameters so that we can reproduce it as well?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
20 Feb 2018, 11:53

Hi Drummond360,

You might consider something like the below

        protected override void OnStart()
        {
            Positions.Closed += OnPositionsClosed;
        }

        void OnPositionsClosed(PositionClosedEventArgs obj)
        {
            if (obj.Position.NetProfit < 0)
            {
                foreach (var position in Positions)
                {
                    ClosePosition(position);
                }
            }
        }

However note that the code above does not guarantee that the position has been closed by a stop loss. It could be a manual close as well.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
20 Feb 2018, 11:42

Hi Medjan,

We can change the historical data if the broker requests it. If they said that they contacted us, then probably this is sorted out between them and our support team.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
16 Feb 2018, 11:41

Hi Alexander,

You can find a nice guide on how create a custom indicator here. I can provide answers to specific questions, however I cannot guide you step by step on how to create your indicator or teach you C#. If you need professional assistance, you can contact a professional Consultant or post a Job. My role in the community is to help developers with API specific questions. 

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
16 Feb 2018, 11:23

Hi Alexander,

If you want to visualize you can consider creating a custom Indicator. 

Best Regards,

Panagiotis


@PanagiotisCharalampous