Topics
Replies
PanagiotisCharalampous
13 Jun 2018, 16:35
Hi again,
I think it would be much easier to recreate the indicator for cTrader instead of trying to get a signal from an email alert. Maybe you could talk to a Consultant or post a Job.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Jun 2018, 16:12
Dear Trader,
Thanks for posting in our forum. What kind of alert is it? Didn't you consider just programming this alert in cTrader?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Jun 2018, 14:11
Hi ADFX,
It is not possible to retrieve the color of IndicatorDataSeries using cAlgo.
Best Regards,
Panagiotis Charalampous
@PanagiotisCharalampous
PanagiotisCharalampous
13 Jun 2018, 11:40
( Updated at: 21 Dec 2023, 09:20 )
Hi Solomon,
This is what I do but seems correct. See below
Can you send a similar screenshot?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Jun 2018, 10:48
Hi Solomon,
We had a look at this but we don't see any issue. Could you please send us more information e.g. a screenshot and/or a cBot?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Jun 2018, 09:21
Hi solomonawulonu,
Thanks for posting in our forum and for reporting this issue. We will investigate and fix if there is a problem.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Jun 2018, 09:10
Hi thongbaogiaodich,
Could you please post the complete cBot code?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Jun 2018, 17:55
Hi thongbaogiaodich,
Try skipping
var positions = Positions.FindAll(newsLabel, Symbol, TradeType.Buy);
Just check if a position has TradeType.Buy before closing it.
Let me know if this helps,
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Jun 2018, 14:33
Hi Delta_Gamma,
The option of changing trading account properties is provided by brokers therefore you should contact your broker. For QuickTrade settings, make sure you are signed in with your cTID.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Jun 2018, 14:28
Hi hamidrtafx@gmail.com,
Try the below
if ((MarketSeries.Open.Last(2) < MarketSeries.Close.Last(1) && MarketSeries.Close.Last(2) > MarketSeries.Close.Last(1)) || (MarketSeries.Open.Last(2) > MarketSeries.Close.Last(1) && MarketSeries.Close.Last(2) < MarketSeries.Close.Last(1))) { // Do something }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Jun 2018, 09:50
Hi hamidrtafx@gmail.com,
It is not clear what you need the code to do. Please give us more information in order to help you.
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
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
14 Jun 2018, 09:41
Hi padik,
You cannot change a trading account while a cBot is running. If you want to trade on another account simultaneously, just open a new instance of cTrader.
Best Regards,
Panagiotis
@PanagiotisCharalampous