Replies

PanagiotisCharalampous
04 Jan 2018, 15:57

Dear Trader, 

Thanks for posting in our forum. Unfortunately the information provided is not enough for us to help you. Can you post the code of the cBot and some detailed steps on how to reproduce this behavior? This way we will be able to determine if this is a bug or not.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
04 Jan 2018, 15:04

Hi Drummond360,

Is it possible to post the full code of the cBot? It will be easier to advise you if we have the full cBot code.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Jan 2018, 16:57

Hi Drummond360,

There is no straightforward way to do this however I think that with some coding it is possible. You can access the PenringOrders properties as below

PendingOrders[index].SymbolCode
PendingOrders[index].TradeType

Therefore with a loop and some checks, you should be able to split the orders.

Best Regards

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Jan 2018, 16:51

Hi itmfar,

Did you mean EURUSD instead of EURUSG? In any case, please try the code sample below

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

namespace cAlgo
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class MultiCurrency : Indicator
    {
        [Parameter(DefaultValue = "EURUSG")]
        public string Symboleu { get; set; }

        [Parameter(DefaultValue = "USDJPY")]
        public string Symboluj { get; set; }

        [Parameter(DefaultValue = "XAUUSD")]
        public string Symbolxu { get; set; }


        [Output("Correlation1", Color = Colors.Goldenrod)]
        public IndicatorDataSeries Result1 { get; set; }
        [Output("Correlation2", Color = Colors.Blue)]
        public IndicatorDataSeries Result2 { get; set; }
        [Output("Correlation3", Color = Colors.GhostWhite)]
        public IndicatorDataSeries Result3 { get; set; }


        MarketSeries series1;
        MarketSeries series2;
        MarketSeries series3;


        protected override void Initialize()
        {
            series1 = MarketData.GetSeries(Symboleu, this.TimeFrame);
            series2 = MarketData.GetSeries(Symboluj, this.TimeFrame);
            series3 = MarketData.GetSeries(Symbolxu, this.TimeFrame);
        }

        public override void Calculate(int index)
        {
            // Calculate value at specified index
            //Result1[index] = MarketData.GetSeries(Symboleu, TimeFrame.Hour).Close[index];
            if (series1 != null)
            {
                int index1 = series1.OpenTime.GetIndexByExactTime(MarketSeries.OpenTime[index]);
                Result1[index] = series1.Close[index1];
            }
            if (series2 != null)
            {
                int index2 = series2.OpenTime.GetIndexByExactTime(MarketSeries.OpenTime[index]);
                Result2[index] = series2.Close[index2];
            }
            if (series3 != null)
            {
                int index3 = series3.OpenTime.GetIndexByExactTime(MarketSeries.OpenTime[index]);
                Result3[index] = series3.Close[index3];
            }
        }
    }
}

You need to check first if the series have any values before invoking them to avoid any unexpected issues.

Let me know if this solves your problem.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Jan 2018, 16:04

Hi paanoik@seznam.cz,

Currently there is no workaround for this. We will release soon cTrader 3.0 with a new API that will include a new property,  Symbol.DynamicLeverage, that will resolve your issue.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Jan 2018, 15:12

Hi paanoik@seznam.cz,

This question is better to be addressed to the broker since the leverage for each asset is set by them.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Jan 2018, 11:14

Hi Omega,

Indeed one of the purposes of the forum is to update traders. The comment from Spotware above is four years old, lately we have been giving insights on what you should expect from us in the Coming Soon section. It is our policy though not to commit to deadlines since our top priority is quality. We release only when everything is ready and meets our quality standards. Therefore we avoid giving delivery dates. Regarding Renko charts, they will be included in one of the next releases of cTrader. 

Best Regards,

Panagiotis

 


@PanagiotisCharalampous

PanagiotisCharalampous
03 Jan 2018, 10:53

Hi olddirtypipster,

Thanks for taking the time to post this suggestion. I will communicate it with the team responsible for FIX API for consideration.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Jan 2018, 10:31

Hi paanoik@seznam.cz,

Indeed margin is not taken into account in backtesting but it is in our plans to add it in future releases.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Jan 2018, 14:27

Hi Drummond360

I guess my question is whether cAlgo can cope with 4 instances scalping on a 1 min chart with most of the logic onTick?!?

 The answer to this question is directly related to the hardware you are running your cAlgo on. I would encourage you to test your cBot on the hardware you are planning to use using a demo account and if the performance does not satisfy you, make the necessary adjustments e.g. upgrade your computer or VPS, check your network connection, optimize your code etc.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Jan 2018, 11:03 ( Updated at: 21 Dec 2023, 09:20 )

Hi simitenbiri,

Depth of Market is available in the Symbol's information panel. You can access the information panel by right clicking on a symbol. See screenshot below. 

Let me know if this helps.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Jan 2018, 10:43

Hi tradingu,

No there is no such feature available in cTrader. However, I don't think you avoid any fees using it. 

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
29 Dec 2017, 10:57

Hi MaRCHeW,

I know that everybody is anticipating the new release however we cannot commit to release dates. Nevertheless, we are in the very final stages of development i.e. fixing bugs and stabilizing the new release. Hopefully you should not be waiting for much more.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
29 Dec 2017, 09:55

Dear davide.annia,

Thanks for posting in our forum. I tried to reproduce your issue using Spotware cTrader and Spotware cAlgo but I could not. The functionality seems to be working fine. Can you please provide some more information regarding your problem e.g. your broker, the script you are trying to edit etc. If you could capture a short video demonstrating this behavior, it would be helpful as well.

Best Regards,

Panagiotis 


@PanagiotisCharalampous

PanagiotisCharalampous
27 Dec 2017, 15:26

Hi ctid258463,

The problem is with your conditions. Your conditions are not checking if the indicator has crossed a value or not but if the last value is above or below another value. You should reconsider your conditions and check HasCrossedAbove and HasCrossedBelow functions which you should use for your conditions.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
27 Dec 2017, 15:14

Hi gunning.ernie,

I really like the System.Threading.Timer and I can specify a exact start time with this timer however according to this post (/forum/calgo-support/3577?page=1#9) cAlgo API's is not thread safe and one should not use this timer  HOWEVER the post is old. 

I don't think the post's author meant it this way. A more accurate inteptretation of what is suggested in the post is

"Don't do it if you don't know how to do it. cAlgo will not take care of this for you."

Concluding, you can use System.Threading.Timer as long as you know how to handle concurrency issues i.e. what should happen if two threads access the same resource at the same time e.g. start modifying the same order.

Best Regards,

Panagiotis 


@PanagiotisCharalampous

PanagiotisCharalampous
27 Dec 2017, 15:00

Hi henry.tsui.1222,

Thanks for posting in our forum. Yes you can modify the parameter's step accordingly. See example below

        [Parameter(DefaultValue = 10, Step = 0.1)]
        public double Parameter { get; set; }

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
27 Dec 2017, 14:55

Hi gunning.ernie,

Yes it is still the case.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
27 Dec 2017, 14:50

Hi gunning.ernie,

so when opening a trade you need to specify 1000 as the volume for 0.10c pip value. YOU should increase the Volume by units of the volume step to increase your pip value. For example, you cannot specify 1500 of 4300. it should be devidable by the step (1000). So correct values are 1000, 2000,3000...100 0000.

Correct.

 If everything is correct above then I assumes that Quantity (double) in the PendingOrder class is the amount of units of volume you want to trade thus you can use the QuantityToVolume function that will multiply Quantity with Volume.

No, QuantityToVolume is used to covert lots to volume. You pass lots and you get volume as a results e.g. 1 lot  = 100000 for EURUSD. 

I still do not understand why you include leverage in your pip calculation. It is not related. To calculate pip value you just need to calculate the following formula

Volume * 10^(-PipPosition) = PipSize.

Leverage is not needed anywhere

A lot just represents a number of units of currency to be traded e.g. 1 lot = 100000€, 2 lots = 200000€ etc. Volume is the units themselves.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
27 Dec 2017, 14:13

Hi Drummond360,

The correct way to write the condition is the following

 var targetPrice = (order.TradeType == TradeType.Buy) ? Symbol.Ask + PipsAway * Symbol.PipSize : Symbol.Bid - PipsAway * Symbol.PipSize;

Best Regards,

Panagiotis


@PanagiotisCharalampous