
Topics
Replies
PanagiotisCharalampous
11 Jun 2018, 14:15
Hi hengsarathvichet,
The indicator will run for the same symbol as the cBot. Do you need something different? Do you need an indicator for another symbol than the cBot's one?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2018, 12:18
Hi thongbaogiaodich,
cTrader automatically connects to the proxy with the fastest connection available at the moment. Maybe at that moment London proxy was busier than the Amsterdam one therefore cTrader chose to connect to Amsterdam instead.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2018, 12:13
Hi hengsarathvichet,
Which currency pair are you talking about? The one that the cBot will trade on?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2018, 11:34
Hi hengsarathvichet,
Here it is
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 { private RelativeStrengthIndex _rsi; protected override void OnStart() { var series = MarketData.GetSeries(TimeFrame.Daily); _rsi = Indicators.RelativeStrengthIndex(series.Close, 14); } protected override void OnBar() { Print(_rsi.Result.LastValue); } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2018, 10:54
Hi thongbaogiaodich,
Our servers are in London therefore your VPS should be located in London as well.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2018, 09:34
Dear Trader,
Thanks for posting in our forum. This is currently not possible in cAlgo. A workaround is to get the Color as a string parameter and use the following function to convert the string to a Color
//A function for getting the color from a string private Colors GetColor(string colorString) { foreach (Colors color in Enum.GetValues(typeof(Colors))) { if (color.ToString() == colorString) return color; } return Colors.White; }
Let me know if this helps,
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2018, 09:23
Hi hengsarathvichet,
See below an example of calling an indicator from within a cBot
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 { private RelativeStrengthIndex _rsi; protected override void OnStart() { _rsi = Indicators.RelativeStrengthIndex(MarketSeries.Close, 14); } protected override void OnBar() { Print(_rsi.Result.LastValue); } protected override void OnStop() { // Put your deinitialization logic here } } }
Let me know if this is what you are looking for.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jun 2018, 14:17
( Updated at: 21 Dec 2023, 09:20 )
Dear roydelloyd,
Thanks for posting in our forum. We have introduced a new Analyze application, you can view all the relevant information there. See below
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jun 2018, 14:11
Hi irmscher9,
Next time this happens, please send roubleshooting information. You can do so by pressing Ctrl+Alt+Shift+T, put the link to this discussion in the form and press Submit. The development team will receive all the necessary information to investigate this behavior.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jun 2018, 09:47
Hi qorrog2@utexas.edu,
This is just an example code on how you could program such a behavior. You could use it if you want but I am not sure if this fits your requirements. You can find out how to create and run a cBot here. If you are not a programmer, I would suggest to consider some professional assistance like hiring a Consultant.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Jun 2018, 12:56
Hi WhiteMouseFX,
Thanks for the feedback. We will discuss your feedback internally and see if we can change the tooltips to something less confusing for the community.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Jun 2018, 09:30
Dear qorrog2@utexas.edu,
Thanks for posting in our forum. See an example below
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 EquityTakeProfit { get; set; } [Parameter(DefaultValue = 0.0)] public double EquityStopLoss { get; set; } protected override void OnStart() { // Put your initialization logic here } protected override void OnTick() { //if account equity is more than equity take profit or less than equity stop loss, we close all positions if (Account.Equity > EquityTakeProfit || Account.Equity < EquityStopLoss) foreach (var position in Positions) ClosePosition(position); } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Jun 2018, 09:04
Hi Saka,
If you wish to unlink your account from your cTID, you should contact your broker.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Jun 2018, 17:01
Hi zedodia,
You can write custom code to consider this but it should be customized on your cBot.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Jun 2018, 10:35
Hi WhiteMouseFX
Suggestion - TP and SL are not showing information anymore when passing mouse over the position.
I will pass the suggestion over.
New bug - Typing position values manually
Indeed this seems inconvenient. I will report this to be reviewed by the product team
OLD bug - Reverse position and double position Hints are inverted (This was reported by me long time ago)
This is not a bug even if it seems counterintuitive. The tooltips show the size of the deals need to be executed for the respective actions to happen. When you want to reverse a position then you first need to close the existing deal and then open a deal of the same size in the opposite direction. Therefore if you are 1k long, to reverse the position you need to trade 2k short. In the same way, when you want to double your position, let's say you are 1k long, then you will need to trade another 1k long.
I hope this clarifies things for you,
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Jun 2018, 10:24
Hi zedodia,
Margin requirements are currently not considered in backtesting, however this is in our backlog for future versions.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Jun 2018, 10:20
Hi to both,
Could you please send us some troubleshooting information so that we can investigate further? To do so, press Ctrl+Alt+Shift+T, put a link to this discussion in the textbox and press Submit.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Jun 2018, 09:53
Hi catecalvez,
We cannot build this cBot because longPosition, shortPosition and volumeInUnits are not defined anywhere. Did you write this code or are you trying to modify an existing cBot? Could you let us know what are the variables supposed to contain? Which positions are you trying to close?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
05 Jun 2018, 17:53
Hi mosaddeqi@gmail.com,
If you are talking about this indicator then it is better to contact the developer, Scyware.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2018, 15:59
Hi hengsarathvichet,
The code I provided assumes you are running the cBot from cTrader. You will not be able to run it on an external WinForms application as market data will be missing.
Best Regards,
Panagiotis
@PanagiotisCharalampous