Replies

PanagiotisCharalampous
04 Sep 2024, 05:13

RE: RE: Very simple issue

tuuguu177 said: 

PanagiotisCharalampous said: 

Hi there,

No this is not possible at the moment.

Best regards,

Panagiotis

Hello

How to make line into transparent at coding?

Hi there,

You need to set make your line's color transparent by setting the alpha to 0. See below

var color = Color.FromArgb(0,255,0,0); 

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 11:55

Hi again,

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, 11:48

RE: RE: badvolumn

chenshy27 said: 

PanagiotisCharalampous said: 

Hi there,

Please share your cBot code so that we can understand what it is doing.

Best regards,

Panagiotis

using cAlgo.API;
using cAlgo.API.Internals;
using System.Linq;

namespace cAlgo.Robots
{
   [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
   public class GridTradingBot : Robot
   {
       private const double EurUsdTakeProfit = 2.5;  // EUR/USD 盈利2.5美金时平仓
       private const double UsdChfTakeProfit = 2.27; // USD/CHF 盈利2.27美金时平仓
       private const double EurUsdLossThreshold = 2.5;   // EUR/USD 亏损2.5美金时加仓
       private const double UsdChfLossThreshold = 2.27;  // USD/CHF 亏损2.27美金时加仓
       private const double LotSize = 0.01;          // 初始手数
       private const double MaxLotSize = 0.1;        // 最大手数

       private Symbol _eurUsd;
       private Symbol _usdChf;

       protected override void OnStart()
       {
           // 获取符号信息
           _eurUsd = Symbols.GetSymbol("EURUSD");
           _usdChf = Symbols.GetSymbol("USDCHF");

           // 启动时开仓 EUR/USD 和 USD/CHF 多单
           OpenPosition(_eurUsd, TradeType.Buy);
           OpenPosition(_usdChf, TradeType.Buy);
       }

       protected override void OnTick()
       {
           ManagePositions(_eurUsd, EurUsdTakeProfit, EurUsdLossThreshold);
           ManagePositions(_usdChf, UsdChfTakeProfit, UsdChfLossThreshold);
       }

       private void OpenPosition(Symbol symbol, TradeType tradeType, double volume = LotSize)
       {
           ExecuteMarketOrder(tradeType, symbol.Name, volume, "GridTradingBot");
       }

       private void ManagePositions(Symbol symbol, double takeProfit, double lossThreshold)
       {
           var positions = Positions.FindAll("GridTradingBot", symbol.Name);

           foreach (var position in positions)
           {
               // 如果单个仓位的利润达到设定的盈利目标,平仓并重新开仓
               if (position.NetProfit >= takeProfit)
               {
                   ClosePosition(position);
                   OpenPosition(symbol, position.TradeType, LotSize);
               }
           }

           // 如果总亏损超过设定的亏损阈值且手数未达到上限,加仓
           double totalVolume = positions.Sum(p => p.VolumeInUnits);
           double totalProfit = positions.Sum(p => p.NetProfit);

           if (totalProfit <= -lossThreshold && totalVolume < MaxLotSize * 100000)
           {
               OpenPosition(symbol, TradeType.Buy, LotSize);
           }
       }
   }
}

The volume in your order method should be in units not in lots. Use QuantityToVolume() method to convert your lots to units


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 11:44

RE: RE: Algo Compiler v8 for Cloud?

elia.morling said: 

PanagiotisCharalampous said: 

Hi there,

Can you describe your problem using screenshots so that we can understand what you are looking at?

Best regards,

Panagiotis

Sorry, seems like compiled v8 works in Cloud. Issue is rather with the code itself, which may run locally but not in Cloud.

A few follow up quetions:
1. Is there sample of a script which can run in Cloud and able to call external service (assuming it needs to be web socket and port 25345)?
2. How to debug cbots in cloud? I am not seeing any errors whatsoever?

Hi there,

Unfortunately I do not have an example script for you. You can see your cloud instance's log in the Instance Information tab 


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 09:33

RE: RE: RE: RE: RE: RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

firemyst said: 

PanagiotisCharalampous said: 

 

Hi firemyst,

It seems we have not received this email. Can you please resend it to community@ctrader.com?

Best regards,

Panagiotis

Resent as requested. PLease let me know if you received it. If not, I might have to send separate individual emails with all the info as I wonder if your email system might be blocking it or sending it to spam for some reason.

Hi firemyst,

Try my personal one as well pcharalampous@spotware.com

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 08:58

Hi there,

Please share your cBot code so that we can understand what it is doing.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 08:55

RE: RE: RE: RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

firemyst said: 

PanagiotisCharalampous said: 

firemyst said: 

PanagiotisCharalampous said: 

Hi firemyst,

Can we have the cBot that reproduces this problem?

Best regards,

Panagiotis

Any updates on this?

  1. I provided a private video link on YouTube demonstrating the issue;
  2. I provided access details to my VPS so the team can see it first hand.
  3. I provided .algo file and source code that reproduces the issue on the VPS
  4. I've provided plenty of details in this thread

Thank you.

Hi firemyst,

We were not able to reproduce this. You said that you will provide access to your VPS but we have not received anything yet.

Best regards,

Panagiotis

I sent the email last week:

Hi firemyst,

It seems we have not received this email. Can you please resend it to community@ctrader.com?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 08:50

RE: RE: Placing Stop Order - FAILED with error "TechnicalError"

sebastien.t said: 

Hello,

 

thank you for your answer.

 

I modified the code to respect the Ticksize. I still get an error

Trade | → Placing Stop Order to Sell 10 DE30 (Price: 18772.6, SL: 5700, TP: 5000) FAILED with error "TechnicalError"

 

I also tried to use the Pipsize :

But I have the same issue Trade | → Placing Stop Order to Sell 10 DE30 (Price: 18772.6, SL: 570, TP: 500) FAILED with error "TechnicalError"

 

Thank you for your help.

 

PanagiotisCharalampous said: 

Hi there,

You are setting the SL and TP is absolute price. You need to set them in pips.

Best regards,

Panagiotis

 

Please share the complete cBot code, your cBot parameters and backtesting settings, as well as your broker, so that we can reproduce this on backtesting.


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:58

RE: RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

firemyst said: 

PanagiotisCharalampous said: 

Hi firemyst,

Can we have the cBot that reproduces this problem?

Best regards,

Panagiotis

Any updates on this?

  1. I provided a private video link on YouTube demonstrating the issue;
  2. I provided access details to my VPS so the team can see it first hand.
  3. I provided .algo file and source code that reproduces the issue on the VPS
  4. I've provided plenty of details in this thread

Thank you.

Hi firemyst,

We were not able to reproduce this. You said that you will provide access to your VPS but we have not received anything yet.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:56

Hi there,

Can you describe your problem using screenshots so that we can understand what you are looking at?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:55

Hi there,

You need to provide some more information. What do you mean when you say “my screen is totally freeze”? Can you share screenshots/videos so that we can see what happens?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
03 Sep 2024, 05:50

Hi there,

You are setting the SL and TP is absolute price. You need to set them in pips.

Best regards,

Panagiotis


@PanagiotisCharalampous

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