Yes it is. You need to calculate your candle's duration and then detect when the upcoming closing time is closer that 10 seconds, then execute your logic.
Best regards,
Panagiotis
Hi Panagiotis
Could you please tell me how to do that? Do I have to start the bot at the exact hour, like 15:35:00, and then calculate it, or is there an easier way? The bot will be opening trades on a 5-minute chart.
I have created a bot like this, but it only prints "Green candle" after the candle closes; it prints it at exact hours not 10 s before.
using System; using cAlgo.API;
namespace cAlgo { [Robot(TimeZone = TimeZones.UTC)] public class BOT : Robot { int PeriodInSeconds = 300; int Seconds = 10;
protected override void OnBar() // On tick doesn't work either { var timeToClose = PeriodInSeconds - (Server.Time - MarketSeries.OpenTime.Last(1)).TotalSeconds;
if (timeToClose <= Seconds) { var lastCandle = MarketSeries.Open.Last(1); if (lastCandle > MarketSeries.Close.Last(1)) { Print("Green candle"); } } } } }
Hi there,
Unfortunately I cannot write the code for you. If you need professional assistance, you can contact a consultant
1. If I'm correct the profit fee will be deducted automatically?
Yes
2. Is there a way to see who is connected to our cTrader copy strategy and Is there any way to see how much profit did we get from each user that copies your strategy?
No
3.Is there any way to automatically add and remove users from the cTrader copy strategy, maybe by using an API? As far as I understand there is a possibility to invite users using a private link, but no way to remove them?
No
4. Does the cTrader client need to run all the time, for the strategy copying to work?
Yes it is. You need to calculate your candle's duration and then detect when the upcoming closing time is closer that 10 seconds, then execute your logic.
A video demonstrating the exact steps you take and the message you receive.
Best regards,
Panagiotis
I have the same issue. I cannot install any .algo files on my iMac. I tested the same .algo file on Windows 10 cTrader app and it works. However, I use iMac for all of my trading work. Here is the link to the algo: https://ctrader.com/algos/indicators/show/2969
This indicator has been built with .Net framework 4.0. cTrader for Mac supports only algos that have been built using .Net 6.0. You need to upgrade this indicator in order to use in cTrader for Mac.
This is a known issue and will be fixed soon. In the meanwhile, try restarting your computer. Sometimes it works.
Best regards,
Panagiotis
Thank you, but even after restarting, it still doesn't work. Is there anything else I can do?
Hi there,
You could also try clearing your backtesting cache in C:\Users\user\AppData\Roaming\Broker cTrader\BacktestingCache
Beyond that I have no further suggestions at the moment
Best regards,
Panagiotis
Thank you, same issue as always. Do you think that buying external data could solve the problem?
Hi there,
I haven't tried this solution so I cannot tell for sure.
Best regards,
Hello, are there any updates regarding the optimization issue? I can only perform backtesting in VisualMode; it does not allow me to backtest without it, nor does it allow optimization.
Hi there,
Try creating a new account and use it for backtesting.
Best regards,
Panagiotis
Hello @PanagiotisCharalampous, I've noticed that the issue might be due to the Cbot, some operate in a non-visual mode allowing me to carry out Backtesting and Optimizations quickly, while others I've created only work in display mode. Could you help me solve this problem?
I can't help you, sorry. You need to wait for the update.
PanagiotisCharalampous
20 Mar 2024, 07:06
RE: RE: Is it possible in C bot?
flappiyt said:
Hi there,
Unfortunately I cannot write the code for you. If you need professional assistance, you can contact a consultant
Best regards,
Panagiotis
@PanagiotisCharalampous