
Topics
Replies
PanagiotisCharalampous
17 Nov 2021, 07:56
Hi haohan51,
There is no gerenal issue with our connectivity at the moment so probably the issue is on your side. Some things you can check.
- Check your proxy latency. Try restarting cTrader so that it can connect to the best available proxy.
- Confirm that your VPS can execute your cBots efficiently. If the cBots consume much of the resources of the VPS, disconnections might happen.
- Try running the cBot on a different machine, maybe your own PC, and check if you can reproduce the problem.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
16 Nov 2021, 10:15
Hi blockchainTrader1,
You can use enums for this purpose.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
16 Nov 2021, 10:14
Hi blockchainTrader1,
If your account is stopped out, then you are obviously using leverage. You are opening positions with a value higher than your account's balance/ The account's leverage does not matter and has no effect to the size of positions you are opening. If you don't want to use your account's leverage, just don't use it and open positions with a value that does not exceed your account's equity.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
16 Nov 2021, 08:19
Hi vitorsilvabr.f,
Your post is not very clear to me. Do you mind elaborating a bit?
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
16 Nov 2021, 08:13
Hi blockchainTrader1,
You can do this with any leverage account. Your account's leverage just defimes the upper limit of volume you can use. But does not restrict you from trading lower volumes than that. If for example your account has a balance of 1000 and you want to buy stocks worth of 1000 valued at 200 each, just buy 5 stocks.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
16 Nov 2021, 08:09
Hi blockchainTrader1,
Thanks for your post. However it is not clear to me what the question is. Can you be more specific?
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
15 Nov 2021, 14:41
Hi there,
Can you please provide us with examples of these "wrong weird math calculation results"?
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
15 Nov 2021, 08:45
Hi kojomidoji,
Unfortunately I cannot build the entire code for you but below you can find a small example of how to call the Bollinger Bandwidth - Squeeze and Bulge indicator and print the last value to the log.
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, AccessRights = AccessRights.None)]
public class NewcBot : Robot
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { get; set; }
BBSqueezeBulge _bb;
protected override void OnStart()
{
// Put your initialization logic here
_bb = Indicators.GetIndicator<BBSqueezeBulge>(10, 2, MovingAverageType.Simple, 20, Bars.ClosePrices);
Print(_bb.Bandwidth.LastValue);
}
protected override void OnTick()
{
// Put your core logic here
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
15 Nov 2021, 08:34
Hi irmantas1981,
Brokers have their own price streams, so usually price quotes are usually different.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
15 Nov 2021, 08:31
Hi mohsabry.ms,
To be able to access your indicator's values from a cBot, you first need to expose them in a public variable, preferably an IndicatorDataSeries.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
15 Nov 2021, 08:19
Hi bowen.guo.kaust,
The standard deviation formula is pretty much... standard :)
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
15 Nov 2021, 08:17
Hi MATRIXTRADER,
As far as I can see, you are using the current chart symbol for your indicators.
MA = Indicators.MovingAverage(Bars.ClosePrices, MA_period, MAType);
_macd = Indicators.MacdHistogram(LongCycle, ShortCycle, MACDPeriod);
So for every symbol the indicators will be different. Why do you expect the results to be the same?
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
13 Nov 2021, 17:51
Hi kojomidoji,
You did not reply to my question. Can you reply please?
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
12 Nov 2021, 09:02
Hi kojomidoji,
So you do not have a code and you need a sample on how to reference the indicators?
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
12 Nov 2021, 08:57
Hi m4trader4,
Yes it is.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
11 Nov 2021, 12:04
Hi amml,
No there aren't. This method is not actually supported and from the next update (4.2) you will be able to use dotnet build command instead. So you will need to survive with this workaround till then :).
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Nov 2021, 10:10
Hi amml,
This function is not documented at the moment. However it seems that your path does not include the project file name. You should include the file name in the path as well e.g.
C:\Users\amml\Documents\cAlgo\Sources\Robots\MyFirstRobot\MyFirstRobot\MyFirstRobot.csproj
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Nov 2021, 16:44
Hi kojomidoji,
The links provide the code for the indicator. We need your cBot's code as well.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
10 Nov 2021, 15:27
Hi xabbu,
The deal map is always greyed out when on Renko. I did not mention anything about on/off on Renko charts.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous
PanagiotisCharalampous
17 Nov 2021, 08:01
Hi MATRIXTRADER,
One of the improvements you can make to the code is to execute the logic of the cBot on each symbol's BarOpened event. OnBar is executed differently for each symbol and this can cause discrepancies to the results.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous