Topics
Replies
nh.zadeh
03 Feb 2023, 14:12
( Updated at: 21 Dec 2023, 09:23 )
RE:
PanagiotisCharalampous said:
Hi bb1902,
Go to Settings > Advanced and make sure your email is configured properly.
Best Regards,
Panagiotis
Dear Panagiotis
I set the email as above but I receive 03/02/2023 15:32:47.921 | Failed to send email "Notification". Connection to SMTP server failed
Please advise
@nh.zadeh
nh.zadeh
27 Jan 2021, 12:08
RE:
irmscher9 said:
Hey guys,
anyone made Open API work with Python?
If you find someone please inform me as well, I found that a package named spotware_connect but I have problem to work with it. please look at that in github and if you can communicate with it inform me.
I works on an ML project with make trading decisions but I have problem to send to spotware API through python.
@nh.zadeh
nh.zadeh
17 Nov 2020, 11:58
( Updated at: 21 Dec 2023, 09:22 )
RE:
PanagiotisCharalampous said:
Hi Nasser,
It looks fine to me. Make sure that you wait for the history to be retrieved.
Best Regards,
Panagiotis
Dear Panagiotis
Thanks for your feedback. You are right and it needs time for uploading. It works for me too.
Best regards,
Nasser
@nh.zadeh
nh.zadeh
16 Nov 2020, 18:15
RE:
PanagiotisCharalampous said:
Hi Nasser,
I did not understand what is the problem. Please explain.
Best Regards,
Panagiotis
Dear Panagiotis
Thanks for your feedback.
In the first stage, for the getting candle information I use GetBars() and it worked properly for almost 261 days in chart backing. before 261 days there were not EMA for H4 (lbigger time frame).
Then I added
seriesH4.LoadMoreHistory();
After adding it not shows even current H4 EMAs.
The updated code is as below:
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
namespace cAlgo.Indicators
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC)]
public class NasserMTFnewnew : Indicator
{
[Parameter(DefaultValue = 15)]
public int Period1 { get; set; }
[Parameter(DefaultValue = 30)]
public int Period2 { get; set; }
[Parameter("EMAs Timeframe1", DefaultValue = "Minute15")]
public TimeFrame EMATimeframe1 { get; set; }
[Parameter("EMAs Timeframe2", DefaultValue = "Hour4")]
public TimeFrame EMATimeframe2 { get; set; }
[Output("EMA1", Color = Colors.Red)]
public IndicatorDataSeries EMA1 { get; set; }
[Output("EMA2", Color = Colors.ForestGreen)]
public IndicatorDataSeries EMA2 { get; set; }
[Output("EMA3", Color = Colors.BlueViolet)]
public IndicatorDataSeries EMA3 { get; set; }
[Output("EMA4", Color = Colors.Violet)]
public IndicatorDataSeries EMA4 { get; set; }
private Bars seriesM15;
private Bars seriesH4;
private ExponentialMovingAverage Ema1;
private ExponentialMovingAverage Ema2;
private ExponentialMovingAverage Ema3;
private ExponentialMovingAverage Ema4;
protected override void Initialize()
{
seriesM15 = MarketData.GetBars(EMATimeframe1);
seriesH4 = MarketData.GetBars(EMATimeframe2);
//seriesM15.LoadMoreHistory()
seriesH4.LoadMoreHistory();
Ema1 = Indicators.ExponentialMovingAverage(seriesM15.ClosePrices, Period1);
Ema2 = Indicators.ExponentialMovingAverage(seriesM15.ClosePrices, Period2);
Ema3 = Indicators.ExponentialMovingAverage(seriesH4.ClosePrices, Period1);
Ema4 = Indicators.ExponentialMovingAverage(seriesH4.ClosePrices, Period2);
}
public override void Calculate(int index)
{
if (!IsLastBar)
{
var index1 = GetIndexByDate(seriesM15, MarketSeries.OpenTime[index]);
if (index1 != -1)
{
EMA1[index] = Ema1.Result[index1];
}
var index2 = GetIndexByDate(seriesM15, MarketSeries.OpenTime[index]);
if (index2 != -1)
{
EMA2[index] = Ema2.Result[index2];
}
var index3 = GetIndexByDate(seriesH4, Bars.OpenTimes[index]);
if (index3 != -1)
{
EMA3[index] = Ema3.Result[index3];
}
var index4 = GetIndexByDate(seriesH4, Bars.OpenTimes[index]);
if (index4 != -1)
{
EMA4[index] = Ema4.Result[index4];
}
}
else
{
EMA1[index] = Ema1.Result.LastValue;
EMA2[index] = Ema2.Result.LastValue;
EMA3[index] = Ema3.Result.LastValue;
EMA4[index] = Ema4.Result.LastValue;
}
}
private int GetIndexByDate(Bars series, DateTime time)
{
for (int i = series.ClosePrices.Count - 1; i > 0; i--)
{
if (time == series.OpenTimes[i])
return i;
}
return -1;
}
}
}
@nh.zadeh
nh.zadeh
16 Nov 2020, 15:52
RE:
PanagiotisCharalampous said:
Hi Nasser,
To get more data you should use GetBars() instead of GetSeries() which is obsolete and then LoadMoreHistory() to retrieve more bars.
Best Regards,
Panagiotis
Dear Panagiotis
Many thanks for your feedback. I changed GetBars() and add LoadMoreHistory() method. When I delete LoadMoreHistory(), it works well with almost 261 days. But whenever I add LoadMoreHistory() it face the problem. Please find my codes as below:
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
namespace cAlgo.Indicators
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC)]
public class NasserMTFnewnew : Indicator
{
[Parameter(DefaultValue = 15)]
public int Period1 { get; set; }
[Parameter(DefaultValue = 30)]
public int Period2 { get; set; }
[Parameter("EMAs Timeframe1", DefaultValue = "Minute15")]
public TimeFrame EMATimeframe1 { get; set; }
[Parameter("EMAs Timeframe2", DefaultValue = "Hour4")]
public TimeFrame EMATimeframe2 { get; set; }
[Output("EMA1", Color = Colors.Red)]
public IndicatorDataSeries EMA1 { get; set; }
[Output("EMA2", Color = Colors.ForestGreen)]
public IndicatorDataSeries EMA2 { get; set; }
[Output("EMA3", Color = Colors.BlueViolet)]
public IndicatorDataSeries EMA3 { get; set; }
[Output("EMA4", Color = Colors.Violet)]
public IndicatorDataSeries EMA4 { get; set; }
private Bars seriesM15;
private Bars seriesH4;
private ExponentialMovingAverage Ema1;
private ExponentialMovingAverage Ema2;
private ExponentialMovingAverage Ema3;
private ExponentialMovingAverage Ema4;
protected override void Initialize()
{
seriesM15 = MarketData.GetBars(EMATimeframe1);
seriesH4 = MarketData.GetBars(EMATimeframe2);
//seriesM15.LoadMoreHistory()
seriesH4.LoadMoreHistory();
Ema1 = Indicators.ExponentialMovingAverage(seriesM15.ClosePrices, Period1);
Ema2 = Indicators.ExponentialMovingAverage(seriesM15.ClosePrices, Period2);
Ema3 = Indicators.ExponentialMovingAverage(seriesH4.ClosePrices, Period1);
Ema4 = Indicators.ExponentialMovingAverage(seriesH4.ClosePrices, Period2);
}
public override void Calculate(int index)
{
if (!IsLastBar)
{
var index1 = GetIndexByDate(seriesM15, MarketSeries.OpenTime[index]);
if (index1 != -1)
{
EMA1[index] = Ema1.Result[index1];
}
var index2 = GetIndexByDate(seriesM15, MarketSeries.OpenTime[index]);
if (index2 != -1)
{
EMA2[index] = Ema2.Result[index2];
}
var index3 = GetIndexByDate(seriesH4, Bars.OpenTimes[index]);
if (index3 != -1)
{
EMA3[index] = Ema3.Result[index3];
}
var index4 = GetIndexByDate(seriesH4, Bars.OpenTimes[index]);
if (index4 != -1)
{
EMA4[index] = Ema4.Result[index4];
}
}
else
{
EMA1[index] = Ema1.Result.LastValue;
EMA2[index] = Ema2.Result.LastValue;
EMA3[index] = Ema3.Result.LastValue;
EMA4[index] = Ema4.Result.LastValue;
}
}
private int GetIndexByDate(Bars series, DateTime time)
{
for (int i = series.ClosePrices.Count - 1; i > 0; i--)
{
if (time == series.OpenTimes[i])
return i;
}
return -1;
}
}
}
@nh.zadeh
nh.zadeh
08 Jul 2020, 08:16
RE:
harpreetslater said:
Roboforex looks like a scam. Does it has a platform on cTrader?
Dear harpresstslater
As far as I am living in Iran and based on sanction I have no access to top brokers so I have few choices to select. I just chose this broker based on available brokers who offer services for Iran residents.
I am working with Roboforex for many years (almost 5 years) and I did not see any wrong behaviour.
@nh.zadeh
nh.zadeh
12 Mar 2019, 17:32
RE:
Panagiotis Charalampous said:
Hi Nasser,
The information is not enough for somebody to help you. Please provide us with the following
1) The complete cBot code.
2) The parameters you use to run the code.
3) The parameters you use for the displayed indicators.
Best Regards,
Panagiotis
Dear Panagiotis
Thanks for your reply, I solved the problem with using normal coding such as 2 previous SMA value to compare with previous vaule rather than using HasCrossedBelow. It seems that HasCrossedBelow has some bug, Please ask your technical department to check that is it return the right values or not.
Thanks for your support.
Best regards
Nasser
@nh.zadeh
nh.zadeh
06 Mar 2019, 15:15
RE:
Panagiotis Charalampous said:
Hi tmfd,
It is in our immediate plans to start development of the multisymbol backtesting feature. Without any commitments on ETA I am confident that we will have this feature sometime next year.
Best Regards,
Panagiotis
Hi Dear Panagiotis
Is it implemented on not yet?
Best regards
Nasser
@nh.zadeh
nh.zadeh
30 Jan 2019, 11:41
RE:
Spotware said:
Hello.
Presently we do not support push notifcation, so it is not possible to send custom notifications from cAlgo to the mobile application. It's a nice idea and we will investigate the possibility of having this in the future.
Thanks.
Hello, Is there any news on this topic issue?
Thanks in advance.
Best Regards
Nasser
@nh.zadeh
nh.zadeh
01 Nov 2018, 12:57
Dear Panagiotis
Many thanks for your comment. Please send me the list of brokers who use Spotware Ctrader Public Beta. It seems that RoboForex do not offer this service.
As far as I am living in Iran the brokers who were registered in TAX free islands works with us.
Please advise.
Best regards
Nasser
@nh.zadeh
nh.zadeh
19 Oct 2018, 11:22
Dear Panagiotis
Thanks for your prompt reply.
As you see in the photo which your shared, the H4 EMAs current value did not draw, in the H4 candle which is not closed yet, we have EMA value at the current situation, I want the indicator draw the line till now. It is obvious that the value of the EMA could be changed in every tick.
Please advise
@nh.zadeh
nh.zadeh
04 Mar 2023, 18:31 ( Updated at: 04 Mar 2023, 18:32 )
RE:
wmclennan77 said:
just add @ in following:
readonly string SoundFilePath = @"C:/Users/username/Documents/cTrader/Sounds/EntryNotification.mp3";\
or use double / (//) rathar than one /
@nh.zadeh