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

PanagiotisCharalampous
04 Mar 2024, 08:38

Hi there,

Unfortunately cTrader running on Parallels is not supported. You should either use it on a native Windows machine or use cTrader for Mac.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
04 Mar 2024, 06:46

Hi there,

Further updates to market replay will come in future updates but not in the upcoming one.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
04 Mar 2024, 06:45

RE: RE: Is it better to call the indicator or write the indicator yourself?

firemyst said: 

PanagiotisCharalampous said: 

Hi there,

Unfortunately I cannot understand the question and I guess many other readers. Could you please rephrase and provide some examples of what you are doing?

Best regards,

Panagiotis

I think what the OP is asking is if he's writing either a bot or a custom indicator that references a common indicator like the EMA, does the code execute faster if he references the native indicator in cTrader, or codes his own EMA within the custom indicator/bot he's writing. 

Since nano-seconds can make a difference, he's essentially wonder if anyone's done any bench marks to see which way is faster.

That's how I read it.

In principle no, as long as the implementations are identical. However, since there are always specifics in each case, this needs to be checked on a case by case basis.


@PanagiotisCharalampous

PanagiotisCharalampous
04 Mar 2024, 06:43

Hi there,

Make sure your algos use .Net 6.0. Only .Net 6.0 algos are supported on Mac.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
04 Mar 2024, 06:41

RE: RE: RE: RE: IndicatorArea problem

Amin.fx said: 

PanagiotisCharalampous said: 

Amin.fx said: 

PanagiotisCharalampous said: 

Hi there,

Looks good to me

Best regards,

Panagiotis

 

 

When I run the indicator for the first time, nothing is displayed to me.
To solve the problem, the ctrader must be closed once and opened again. Or should change the profile to show the button.
This problem did not exist until a few months ago. This problem appeared with the new program update

Can you record a video demonstrating these steps?

 

Unfortunately, the site does not allow me to post videos or links

Hi there,

I do not think there is a problem with links but you can send us the video at community@ctrader.com

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
04 Mar 2024, 06:40

RE: Lines Trader

leonwij said: 

Hello,

Is it possible to update the above code sample to fix all the obsolete errors?

I have tried but some of the errors are not straightforward to correct.

Thanks,

Hi there,

It's a lot of work to update everything. If it is necessary for you to do this, you can assign the job to a professional.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Mar 2024, 07:15

RE: RE: The cBot is not entering trades.

telefonowelolo said: 

PanagiotisCharalampous said: 

Hi there,

The problem is here

Meini.haOpen.Last(0) > Meini.haClose.Last(0)

On bar opening the values will always be equal. Try executing the code in OnBarClosed() instead.

Regarding the timeframe, the Algo class has a Timeframe parameter, you can user it.

Best regards,

Panagiotis

 

Hi PanagiotisCharalampous

I followed your instructions, but my bot is still not working. And I reconstructed it so it looks like this 


//#reference: ..\Indicators\John.algo
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)]
    public class HAK : Robot
    {
        [Parameter("Initial Volume", DefaultValue = 1, MinValue = 1)]
        public int InitialVolume { get; set; }

        [Parameter("Initial Stop Loss", DefaultValue = 40)]
        public int SL { get; set; }

        [Parameter("Initial Take Profit", DefaultValue = 40)]
        public int TP { get; set; }

        public bool isAlreadyInTrade;
        public IndicatorDataSeries haClose { get; set; }
        public IndicatorDataSeries haOpen { get; set; }
        public John HAJ;
        string label = "HAK";

        protected override void OnStart()
        {
            Positions.Closed += OnPositionClosed;
            HAJ = Indicators.GetIndicator<John>(10, MovingAverageType.Simple);
            isAlreadyInTrade = false;
        }

        private void OnPositionClosed(PositionClosedEventArgs args)
        {
            isAlreadyInTrade = false;
        }

        protected override void OnBar()-----------------tried OnBarClosed()
        {
            int index = MarketSeries.Close.Count - 2;

            if (!isAlreadyInTrade)
            {
                Print("Current value of Kolor: " + HAJ.Kolor);
                
                if (HAJ.Kolor)
                {
                    
                    ExecuteMarketOrder(TradeType.Buy, Symbol, InitialVolume, label, SL, TP);
                    isAlreadyInTrade = true;
                }
                //else
                //{
                    
                    //ExecuteMarketOrder(TradeType.Sell, Symbol, InitialVolume, label, SL, TP);
                    //isAlreadyInTrade = true;
                //}
            }
        }
    }
}

I found out that the bot somehow thinks the kolor is always false

Indicator:

public Colors Color;
        public bool Kolor { get; set; }

Color = (haOpen[index] > haClose[index]) ? Colors.Red : Colors.LimeGreen;
                Kolor = (haClose[index] > haOpen[index]);
 

Hi there,

I do not see my instructions being followed anywhere, neither I can help with partial code. You don't seem to use any output IndicatorDataSeries, therefore your Calculate() method is probably not evaluated.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Mar 2024, 07:37

RE: RE: Calculating bar size help please

coppard.steve said: 

PanagiotisCharalampous said: 

Hi there,

how can I test for the pip size of the last bar closed?

Here you go

 var barPipSize = Math.Abs(Bars.ClosePrices.Last(1) - Bars.OpenPrices.Last(1)) / Symbol.PipSize;

Best Regards,

Panagiotis

Thanks very much Panagiotis!

I've noticed at particular times when the London and New York hours overlap that the big banks move the markets, so I am trying to develop a cBot to look for these large aggressive buy and sell candles and “follow the whales” with a long or short trade. So 3 candles on a short time frame more than 20 pips could trigger an automated trade with a take profit and stop loss.

What method can I use to trigger a trade between specific UTC+3 times?

Really appreciate your help.

Thanks 
Steve

Hi Steve,

There is no specific method, you would need to implement the specific checks yourself by checking Server.Time.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Mar 2024, 07:33

Hi there, 

There are many reasons that can cause discrepancies in results. You can find them below

  1. Results are not guaranteed and may vary compared to those of the strategy provider due to the following reasons:
  2. Differences between your positions' entry and closing prices and those of the strategy provider
  3. Differences in the size of your positions compared to those of the strategy provider
  4. Variations in the commissions you pay to your broker compared to those of the strategy provider
  5. The possibility that your broker does not offer the same trading symbols used in the strategy
  6. Insufficient margin in your account to copy some of the orders executed in the strategy
  7. Differences in the stop out levels, which might cause your account to be stopped out, while the strategy provider continues to trade

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Mar 2024, 07:30

Hi there,

The problem is here

Meini.haOpen.Last(0) > Meini.haClose.Last(0)

On bar opening the values will always be equal. Try executing the code in OnBarClosed() instead.

Regarding the timeframe, the Algo class has a Timeframe parameter, you can user it.

Best regards,

Panagiotis

 


@PanagiotisCharalampous

PanagiotisCharalampous
02 Mar 2024, 07:27

Hi there,

You should talk to your broker for price feed issues.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Mar 2024, 07:25

Hi there,

Can you share videos or screenshots demonstrating this issue?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Mar 2024, 07:24

RE: RE: IndicatorArea problem

Amin.fx said: 

PanagiotisCharalampous said: 

Hi there,

Looks good to me

Best regards,

Panagiotis

 

 

When I run the indicator for the first time, nothing is displayed to me.
To solve the problem, the ctrader must be closed once and opened again. Or should change the profile to show the button.
This problem did not exist until a few months ago. This problem appeared with the new program update

Can you record a video demonstrating these steps?


@PanagiotisCharalampous

PanagiotisCharalampous
02 Mar 2024, 07:24

RE: RE: IndicatorArea problem

Amin.fx said: 

PanagiotisCharalampous said: 

Hi there,

Looks good to me

Best regards,

Panagiotis

 

 

When I run the indicator for the first time, nothing is displayed to me.
To solve the problem, the ctrader must be closed once and opened again. Or should change the profile to show the button.
This problem did not exist until a few months ago. This problem appeared with the new program update

Can you record a video demonstrating these steps?


@PanagiotisCharalampous

PanagiotisCharalampous
02 Mar 2024, 07:24

It's hard to help you without the actual FIX messages


@PanagiotisCharalampous

PanagiotisCharalampous
02 Mar 2024, 07:22

Hi there,

It is a known issue and will be fixed in an upcoming update.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
01 Mar 2024, 12:12

RE: RE: Sync drawings across chart tabs?

tian.yiwu said: 

PanagiotisCharalampous said: 

Hi there,

This tool could help you

https://clickalgo.com/chart-drawing-synchroniser

Best regards,

Panagiotis

Thanks!

Do you know if there is a solution for the Web version? Because I find the Mac Desktop version not as good to use, it lacks features by comparison to the Web version.

Hi there,

Unfortunately no. cTrader Web does not support custom indicators


@PanagiotisCharalampous

PanagiotisCharalampous
01 Mar 2024, 12:11

Hi,

Please share the link and I will delete it

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
01 Mar 2024, 12:10

Hi there,

Please share the messages you sent as well

Best regards,


@PanagiotisCharalampous

PanagiotisCharalampous
01 Mar 2024, 09:18

Hi there,

It's not possible.

Best regards,

Panagiotis


@PanagiotisCharalampous