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

PanagiotisCharalampous
03 Sep 2024, 05:47

Hi there,

You can do this only if you run the cBot on the cloud. You can read more information in the link below

https://help.ctrader.com/ctrader-algo/synchronisation/

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:42

Hi there,

Telegram is not the place to report your issues. Your emails were not received. Your video has been forwarded to the product team for further investigation.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:38

Hi there,

The Active Symbol Panel is not available in cTrader for Mac at the moment. It will be added in a future release.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:37

Hi there,

It is not possible unfortunately.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:35

Hi there,

Can you share a screenshot showing this?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:34

RE: RE: RE: I still can't find my cbot

chenshy27 said: 

PanagiotisCharalampous said: 

chenshy27 said: 

As shown in the image, my cbot is called “stop10”, but I can't find it in the dropdown list as you mentioned! So where can I find the log of my cbot???

Hi there,

The first screenshot comes from the Trade section, the second comes from the Algo section. If you will run the cBot in the algo section, you will not see the logs in the Trade section but in the Algo section. 

I don't know why I am unable to load the content of the page you mentioned on the Windows app. There is no issue on the mobile app, and I'm using the same Wi-Fi. Could you please advise if there is a solution? Thanks a lot!

You need to click on a cBot instance


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:27

RE: RE: RE: RE: Bot crash trubleshot

kyosuke said: 

PanagiotisCharalampous said: 

kyosuke said: 

PanagiotisCharalampous said: 

Hi there,

Share your cBot code and send us some troubleshooting information the next time this happens. Please paste a link to this discussion inside the text box before you submit it.

Best regards,

Panagiotis
 

Ok sent…I sent it from another user's cTrader but please refer to me for follow up. Thanks you.

Hi there,

We need the troubleshooting for the session that experiences the problem. Can you please send it again?

Best regards,

Panagiotis

I've sent you the informations from the session which was recreated after the error…I think that's the only thing I could do, no? BTW, it's a randomic crash so I can't give you instructions on how to reproduce it…

I am a bit confused. You said you “sent it from another user's cTrader”. So I am not sure from where exactly you sent the troubleshooting. Your troubleshooting is missing the cBot code. Can you please share it here? 


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:24

RE: RE: RE: RE: How can I delete historical data?

910247359 said: 

PanagiotisCharalampous said: 

910247359 said: 

PanagiotisCharalampous said: 

Hi there,

Can you provide a better explanation of the problem? What do you mean when you say “is too large”? How can we see this?

Best regards,

Panagiotis

The longer the horizontal bar in the red box, the fewer the number of candlesticks in the chart, and the shorter, the more. The short one represents the M1 chart, which has too many candle sticks. I hope it could be like a range chart, where more K-line data is downloaded only when you drag it to the left. Without dragging, only a part of the  candle sticks are displayed. The number of  candle sticks in the M1 chart is very large when the software is opened. I hope it could be as few as the range chart. When I want to see more data, I can just drag it to left.

Hi there,

There is no way to reduce the number of loaded bars at the moment. However I cannot reproduce any delays. Can you provide more information? Can you record a video where we can see what you are experiencing?

Best regards,

Panagiotis

 

There is a delay in data reception(MT4 or MT5 is faster),I thought it might be the historical data caused the problem. I can record a video, but uploading video is not allowed here,only pictures can be uploaded

 

Maybe talk to your broker then. They are responsible for their feeds.


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:23

RE: RE: RE: RE: RE: RE: RE: RE: Backtesting - Incorrect TP / SL calculation

zytotoxiziteat said: 

PanagiotisCharalampous said: 

zytotoxiziteat said: 

PanagiotisCharalampous said: 

zytotoxiziteat said: 

zytotoxiziteat said: 

zytotoxiziteat said: 

PanagiotisCharalampous said: 

Hi there,

Please share your cBot code and make sure you are using tick data for your backtests.

Best regards,

Panagiotis

using System;using System.Collections.Generic;using cAlgo.API;using cAlgo.API.Indicators;using cAlgo.API.Internals;namespace cAlgo.Robots{    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]    public class TradingBot : Robot    {        [Parameter("Risk Percentage", DefaultValue = 1, MinValue = 0.1, MaxValue = 10)]        public double RiskPercentage { get; set; }        [Parameter("Stop Loss (Pips)", DefaultValue = 40, MinValue = 0, MaxValue = 100)]        public double StopLossPips { get; set; }        [Parameter("Take Profit (Pips)", DefaultValue = 20, MinValue = 0, MaxValue = 200)]        public double TakeProfitPips { get; set; }        private AI_101.ML101.ModelInput _modelInput;        private double _lastPrediction;        protected override void OnStart()        {            _modelInput = new AI_101.ML101.ModelInput();        }        protected override void OnTick()        {            // Ensure only one open position per currency pair            if (Positions.FindAll("ML Prediction", Symbol.Name).Length > 0)                return;            // Update model input with the latest close price            _modelInput.ClosePrice = (float)Symbol.Bid;  // Use Symbol.Bid instead of Symbol.LastTick.Bid            // Get prediction            var prediction = AI_101.ML101.Predict(_modelInput);            // Calculate the predicted price change            double predictedChange = prediction.ClosePrice[0] - _modelInput.ClosePrice;            // Determine if we should open a position            if (Math.Abs(predictedChange) > Symbol.PipSize)            {                if (predictedChange > 0 && _lastPrediction <= 0)                {                    OpenPosition(TradeType.Buy);                }                else if (predictedChange < 0 && _lastPrediction >= 0)                {                    OpenPosition(TradeType.Sell);                }            }            _lastPrediction = predictedChange;        }        private void OpenPosition(TradeType tradeType)        {            // Calculate position size based on risk            double riskAmount = Account.Balance * (RiskPercentage / 100);            double volumeInUnits = riskAmount / (StopLossPips * Symbol.PipValue);            // Ensure volume is within acceptable range and increments            volumeInUnits = Symbol.NormalizeVolumeInUnits(volumeInUnits, RoundingMode.ToNearest);            // Check if the volume is valid            if (volumeInUnits < Symbol.VolumeInUnitsMin || volumeInUnits > Symbol.VolumeInUnitsMax)            {                Print("Volume is out of range: " + volumeInUnits);                return;            }            // Open the position            ExecuteMarketOrder(tradeType, Symbol.Name, volumeInUnits, "ML Prediction", StopLossPips, TakeProfitPips);        }    }}

My thought was:

Since I collected only m5 candle data for my Machine learning module I changed the “Data” in settings to “m5 bars from server” for backtesting 

and I was considering to change “protected override void OnTick()” to "protected override void OnBar()".
 

Is that wrong?

What is the best solution?

Thank you

Hi there, 

If you are using fixed SL and TP, you need to use tick data to ensure accurate results in backtesting.

Best regards,

Panagiotis

Okay, my cbot code uses

protected override void OnTick()

I still get wrong TP.

You need to use tick data on your backtesting settings. OnTick() is irrelevant.

 

Where does the option “m5 bars from server” come from?

 

 I thought the system provided the best possible set-up because of my csv file, which contains only m5 bars data. 

 

I don't understand what you mean. It's just an option in a dropdown list


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:20

Dear trader,

Thank you for reporting this issue. Unfortunately we were not able to reproduce this behavior. Could you please send us some troubleshooting information the next time this happens? Please paste a link to this discussion inside the text box before you submit it.

Best regards,

Panagiotis
 


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:16

Hi there,

This is not available at the moment in cTrader for Mac.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:15

Hi there,

There is no such feature available at the moment.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:14

RE: RE: Self-hosting CALGO VPS?

karatedog said: 

PanagiotisCharalampous said: 

Hi there,

We do not have any ETA for this.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook 

Hi,

any update on this?

Thanks!

Hi there,

This has been released. Read more below

https://help.ctrader.com/ctrader-algo/ctrader-cli/?h=cli


@PanagiotisCharalampous

PanagiotisCharalampous
02 Sep 2024, 08:51

Hi there,

It is not possible at the moment, neither there are any plans at the moment unfortunately.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Sep 2024, 08:32

RE: RE: Bot crash trubleshot

kyosuke said: 

PanagiotisCharalampous said: 

Hi there,

Share your cBot code and send us some troubleshooting information the next time this happens. Please paste a link to this discussion inside the text box before you submit it.

Best regards,

Panagiotis
 

Ok sent…I sent it from another user's cTrader but please refer to me for follow up. Thanks you.

Hi there,

We need the troubleshooting for the session that experiences the problem. Can you please send it again?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Sep 2024, 08:13

RE: RE: RE: RE: RE: RE: Backtesting - Incorrect TP / SL calculation

zytotoxiziteat said: 

PanagiotisCharalampous said: 

zytotoxiziteat said: 

zytotoxiziteat said: 

zytotoxiziteat said: 

PanagiotisCharalampous said: 

Hi there,

Please share your cBot code and make sure you are using tick data for your backtests.

Best regards,

Panagiotis

using System;using System.Collections.Generic;using cAlgo.API;using cAlgo.API.Indicators;using cAlgo.API.Internals;namespace cAlgo.Robots{    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]    public class TradingBot : Robot    {        [Parameter("Risk Percentage", DefaultValue = 1, MinValue = 0.1, MaxValue = 10)]        public double RiskPercentage { get; set; }        [Parameter("Stop Loss (Pips)", DefaultValue = 40, MinValue = 0, MaxValue = 100)]        public double StopLossPips { get; set; }        [Parameter("Take Profit (Pips)", DefaultValue = 20, MinValue = 0, MaxValue = 200)]        public double TakeProfitPips { get; set; }        private AI_101.ML101.ModelInput _modelInput;        private double _lastPrediction;        protected override void OnStart()        {            _modelInput = new AI_101.ML101.ModelInput();        }        protected override void OnTick()        {            // Ensure only one open position per currency pair            if (Positions.FindAll("ML Prediction", Symbol.Name).Length > 0)                return;            // Update model input with the latest close price            _modelInput.ClosePrice = (float)Symbol.Bid;  // Use Symbol.Bid instead of Symbol.LastTick.Bid            // Get prediction            var prediction = AI_101.ML101.Predict(_modelInput);            // Calculate the predicted price change            double predictedChange = prediction.ClosePrice[0] - _modelInput.ClosePrice;            // Determine if we should open a position            if (Math.Abs(predictedChange) > Symbol.PipSize)            {                if (predictedChange > 0 && _lastPrediction <= 0)                {                    OpenPosition(TradeType.Buy);                }                else if (predictedChange < 0 && _lastPrediction >= 0)                {                    OpenPosition(TradeType.Sell);                }            }            _lastPrediction = predictedChange;        }        private void OpenPosition(TradeType tradeType)        {            // Calculate position size based on risk            double riskAmount = Account.Balance * (RiskPercentage / 100);            double volumeInUnits = riskAmount / (StopLossPips * Symbol.PipValue);            // Ensure volume is within acceptable range and increments            volumeInUnits = Symbol.NormalizeVolumeInUnits(volumeInUnits, RoundingMode.ToNearest);            // Check if the volume is valid            if (volumeInUnits < Symbol.VolumeInUnitsMin || volumeInUnits > Symbol.VolumeInUnitsMax)            {                Print("Volume is out of range: " + volumeInUnits);                return;            }            // Open the position            ExecuteMarketOrder(tradeType, Symbol.Name, volumeInUnits, "ML Prediction", StopLossPips, TakeProfitPips);        }    }}

My thought was:

Since I collected only m5 candle data for my Machine learning module I changed the “Data” in settings to “m5 bars from server” for backtesting 

and I was considering to change “protected override void OnTick()” to "protected override void OnBar()".
 

Is that wrong?

What is the best solution?

Thank you

Hi there, 

If you are using fixed SL and TP, you need to use tick data to ensure accurate results in backtesting.

Best regards,

Panagiotis

Okay, my cbot code uses

protected override void OnTick()

I still get wrong TP.

You need to use tick data on your backtesting settings. OnTick() is irrelevant.


@PanagiotisCharalampous

PanagiotisCharalampous
02 Sep 2024, 08:12

RE: RE: RE: RE: RE: Cbot access the trendlines drawn on the chart

keerthankumarkateel said: 

keerthankumarkateel said: 

PanagiotisCharalampous said: 

keerthankumarkateel said: 

PanagiotisCharalampous said: 

Hi there,

Unfortunately there is no way to set names for lines manually drawn on the chart.

Best regards,

Panagiotis

Hello,

Thank you for responding. If i want to create an algo with two mannually drawn trendlines (line-A and line-B). Logic is if the price crossed below Line-A buy the ticker and if the price touches the Line-B close the position.

 

Is this possible to implement? this needs algo to read the mannuaaly drawn trendline, identify it and calculate the price based on the line. Point me if there are any examples/documentation on this on how to implement this.

Hi there,

Yes it is possible to do this but there is no specific documentation for this since this is rudimentary algebra and not a cTrader specific issue. A trendline's equation is ax+b, you need to use it to find the value of the trendline on each bar and determine if the price has crossed it or not.

Best regards,

Panagiotis

 

 

if im drawing the line on the chart mannually (NOT via algo), 

  1. how i can get values of a,x,b in the algo for that line?
  2. If i draw multiple lines on the chart (mannually), how can distinguish between the lines? As i can see when i draw a line on the chart, i cant name the line

 

 

Hi there,

  1. ChartTrendLine has Time1, Time1, Y1(start price) and Y2(end price) properties. You can use them to calculate a,x and b.
  2. There is no easy way to do this. Names for the lines are assigned automatically by cTrader.

@PanagiotisCharalampous

PanagiotisCharalampous
02 Sep 2024, 06:24

Hi there,

Obsolete documentation has been removed and obsolete classes are not documented, they are kept for backward compatibility only.

Indeed links to types would be helpful but you can still easily search them on the search bar.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Sep 2024, 06:14

RE: RE: How can I delete historical data?

910247359 said: 

PanagiotisCharalampous said: 

Hi there,

Can you provide a better explanation of the problem? What do you mean when you say “is too large”? How can we see this?

Best regards,

Panagiotis

The longer the horizontal bar in the red box, the fewer the number of candlesticks in the chart, and the shorter, the more. The short one represents the M1 chart, which has too many candle sticks. I hope it could be like a range chart, where more K-line data is downloaded only when you drag it to the left. Without dragging, only a part of the  candle sticks are displayed. The number of  candle sticks in the M1 chart is very large when the software is opened. I hope it could be as few as the range chart. When I want to see more data, I can just drag it to left.

Hi there,

There is no way to reduce the number of loaded bars at the moment. However I cannot reproduce any delays. Can you provide more information? Can you record a video where we can see what you are experiencing?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
02 Sep 2024, 06:07

Hi there,

Can you please provide more specific information about your issue? Which menu? What exactly happens? Can you record a video?

Best regards,

Panagiotis


@PanagiotisCharalampous