
Topics
Replies
PanagiotisCharalampous
24 Jul 2018, 11:59
Hi flores.ernestoiii,
No it will not work. Another option is to program the indicator to work for its timeframe and add the indicator on several charts with different timeframes. There is no need to code all timeframes in the indicator.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Jul 2018, 10:38
Hi hiba7rain,
It is not. You did not put the brackets.
@PanagiotisCharalampous
PanagiotisCharalampous
24 Jul 2018, 10:25
This is because you set _emailSent to true even if no email was sent. Change it to the following
if ( !_emailSent) { Notifications.SendEmail("XXX@XX.com", "XXX@XX.com", Symbol.Code + "Signal", "XXXXX"); _emailSent = true; }
@PanagiotisCharalampous
PanagiotisCharalampous
24 Jul 2018, 10:13
Hi hiba7rain,
What do you mean what you say it is not working? Is the email not sent? Is it sent multiple times? Alos note that I use a cBot and not an indicator,
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Jul 2018, 09:29
Hi flores.ernestoiii,
Thanks for posting in our forum. My advice would be not to send alerts from within the indicator but use a cBot instead that will read your indicator's value. Then you can use several cBots, one for each timeframe of interest that will send the relevant notifications.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Jul 2018, 09:24
Hi hiba7rain,
You could raise a flag as soon as you send a notification and check the flag in order not to send it again. See below an example
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 bool _notificationSent; protected override void OnStart() { } protected override void OnTick() { var sendNotification = false; // Make all your checks here and update sendNotification variable accordingly // . // . // . if (sendNotification && !_notificationSent) { Notifications.SendEmail("email", "email", "Subject", "Text"); _notificationSent = true; } } protected override void OnBar() { _notificationSent = false; } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Jul 2018, 09:14
Hi johnreygalax8,
See an example below
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; namespace cAlgo.Indicators { [Indicator(IsOverlay = true, AccessRights = AccessRights.None)] public class RoundNumbers : Indicator { [Parameter(DefaultValue = 100)] public int StepPips { get; set; } protected override void Initialize() { } public override void Calculate(int index) { ChartObjects.RemoveAllObjects(); double max = MarketSeries.High.Maximum(MarketSeries.High.Count); double min = MarketSeries.Low.Minimum(MarketSeries.Low.Count); double step = Symbol.PipSize * StepPips; double start = Math.Floor(min / step) * step; for (double level = start; level <= max + step; level += step) { ChartObjects.DrawText("text_" + level, level.ToString(), index, level); ChartObjects.DrawHorizontalLine("line_" + level, level, Colors.Gray); } } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Jul 2018, 14:22
Hi,
Thanks for posting in our forum. Regarding your question, see below
Positions.Count(x => x.SymbolCode == Symbol.Code)
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Jul 2018, 09:39
Hi johnreygalax8,
Unfortunately this is currently not possible. You could consider a workaround by printing labels on top of the lines.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Jul 2018, 09:36
Hi jmoises.hc@gmail.com,
Thanks for posting in our forum. If you wish to run code on the change of each tick you can use the OnTick() function.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Jul 2018, 16:50
Hi Vince,
Thanks for the indicator, I thought this was a cBot. I would not put all this logic in an indicator but in a cBot that reads the indication values. In the cBot I would sent a notification whenever the conditions are met and then raise a flag so that the notification is not sent again at least within the same bar. When the bar changes, I would reset the flag. See 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 int Periods { get; set; } private Supertrend _supertrend; private bool _notificationSent; protected override void OnStart() { _supertrend = Indicators.GetIndicator<Supertrend>(Periods); } protected override void OnTick() { var sendNotification = false; // Make all your indicator checks here // . // . // . if (sendNotification && !_notificationSent) { Notifications.SendEmail("email", "email", "Subject","Text"); _notificationSent = true; } } protected override void OnBar() { _notificationSent = false; } protected override void OnStop() { // Put your deinitialization logic here } } }
You can modify the above example accordingly.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Jul 2018, 14:48
Hi Vitore,
I would like to make some comments on the subject of communication and update process.
Regarding communication, we agree with you that efficient communication is a must in this business sector. First of all, I need to stress out that traders are not our direct clients but they are clients of their brokers. Not all brokers wish that we contact their clients directly neither we have the explicit authorization from traders to do so. Spotware communicates all changes in cTrader platform to brokers in an efficient and timely manner. Brokers are responsible to propagate all the relevant information to their clients.
However we understand that theory is one thing and practice is another. Therefore during the last year we have taken a lot of measures to allow traders to find the information they need regarding cTrader, at least in an indirect way. Some of them are
-
We created a full time community management team that responds to trader queries via all available channels in a very reasonable time.
-
We post all important information regarding cTrader in the forum announcements and what’s new sections.
-
We update our Spotware Public Beta applications at least a month before rolling out to brokers allowing traders to try them out and provide their feedback.
-
We are communicating all upcoming changes to all traders that have explicitly gave their consent to contact them and send them such information.
We are also open for any further suggestions that will allow you to receive all information in time.
Regarding our upgrade policy, I will agree with you that the latest upgrades of all applications have imposed drastic changes to the way users use cTrader. We have redesigned and re-architected all applications. But these were necessary changes that now allow us to bring the platform up to date and use latest technologies, build a new philosophy around trading and develop all these features that have been queued for years. From now and on, and for the years to come, updates will be more incremental and frequent, allowing you to adopt new features and changes gradually in your daily trading activities.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Jul 2018, 09:24
Hi Vince,
In this case, you can raise a flag when the email is sent and reset it on each bar change. If you post the full cBot code, I can show you how to do it.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Jul 2018, 15:42
Hi Symposium,
In the past cTrader allowed traders to sign in either with their trading account or with their cTID. Therefore you had the choice to unlink/remove an account from your cTID. From cTrader 3.0 and on, cTID will become the only choice for signing in. Therefore all trading accounts will need to be linked to a cTID and that is why the option has been removed. If you wish to get rid of the account, you need to contact your broker to unlink it for you.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Jul 2018, 14:34
Hi ctid362150,
Application version is available in Menu > Settings.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Jul 2018, 11:51
Hi swingfish,
You can use something like this
foreach (var position in Positions) { if (position.SymbolCode == Symbol.Code) { ModifyPosition(position, null, null); } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Jul 2018, 09:28
Hi Vitore,
Unfortunately older versions are not available.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Jul 2018, 09:26
Hi tt6052@gmail.com,
Drawing tools have not been implemented yet in the new mobile applications. They will be added in future versions.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Jul 2018, 17:47
Hi Patrick,
It is planned for version 3.02, hopefully sometime this autumn.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Jul 2018, 12:54
Hi Sasha,
I don't see an issue with the posted code. Could the problem be in another part? Maybe this part of the code is never reached to close the position.
Best Regards,
Panagiotis
@PanagiotisCharalampous