Topics
Replies
PanagiotisCharalampous
11 May 2020, 08:40
Hi 2bnnp,
When you get bars from other timeframes on indicator initialization, then the complete data until the current moment is loaded. So when you feed this data to an indicator, the indicator contains values up to the last candlestick. Therefore IsFalling() and IsRising() will always display the same value since indicator series data does not change. To fix this you should replace the IsFalling() and IsRising() with an actual comparison of the two previous values of the indicator at the current index.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 May 2020, 08:32
Hi Delphima,
You can access cMirror here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 May 2020, 08:29
Hi slmberglund,
No we do not have such plans as we do not have the right to redistribute this information.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 May 2020, 08:28
Hi Delphima,
There is no such option at the moment but when the strategy provider makes deposits to his/her account, cTrader Copy adjusts your positions so that the equity to equity ratio is restored.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 May 2020, 08:22
Hi there,
Neither of the two options is possible through code.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 May 2020, 08:21
Hi thienluan1110,
Please post your question in the correct section. This one is only for suggestions and your post will be soon deleted.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 May 2020, 08:19
Hi all,
Cross broker copying works only between brokers that offer the service. Pepperstone does not offer cTrader Copy at the moment.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 16:58
Hi,
Send it to community@spotware.com
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 16:11
Hi there,
It will help us because we cannot reproduce such a behavior and it is not clear which exact steps you follow to reproduce it. To record a video and share it with us you can use a tool like tinytake.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 12:27
Hi yuval.ein,
Make sure you build the project and attach VS to cTrader before you add and start a new instance of the cBot.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 12:15
Hi there,
Can you record a short video demonstrating this behavior so that we can see what steps you follow to reproduce such a behavior?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 12:12
Hi Abdul,
Thanks we received and inspected the information you have sent to us. Based on the received information this might be an issue with your graphics card. Hence we would advise you to start Windows in the Safe Mode, then start cTrader and close it. If no errors appear, it is probably a problem with your with nVidia drivers and you will need to reinstall them.
To start Windows in Safe Mode follow the instructions below
https://support.microsoft.com/en-us/help/12376/windows-10-start-your-pc-in-safe-mode
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 11:29
Hi yuval.ein,
Do you use OctaFX cTrader or Spotware cTrader? To see your OctaFX account, you need to use OctaFX cTrader.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 10:30
Hi yuval.ein,
You can only use the accounts of your broker using your broker's cTrader. If you are using OctaFX cTrader then you should be able to use your OctaFX account and OctaFX price feeds.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 10:27
Hi yuval.ein,
No, each indicator/cBot is a different Visual Studio solution.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 10:26
Hi yuval.ein,
Yes you can use Visual Studio to debug cBots/Indicators.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 08:51
Hi amirus.stark,
As I said above, we need cBot parameters, backtesting settings and exact dates where you expect your position to close but does not.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 08:49
Hi Tengu,
We pushed some fixes in the latest update which probably fixed this issue as well.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2020, 08:35
( Updated at: 21 Dec 2023, 09:22 )
Hi office3131,
I don't
here is my indicator code
using System;
using cAlgo.API;
using cAlgo.API.Indicators;
using Microsoft.Win32;
namespace cAlgo.Indicators
{
[Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
public class TEMA_triOLD : Indicator
{
[Parameter("Timeframe 1", DefaultValue = "Minute")]
public TimeFrame tf1 { get; set; }
public int Period = 14;
[Parameter("Timeframe 2", DefaultValue = "Minute5")]
public TimeFrame tf2 { get; set; }
public int Periodtf2 = 14;
[Parameter("Timeframe 3", DefaultValue = "Minute15")]
public TimeFrame tf3 { get; set; }
public int Periodtf3 = 14;
[Output("TF A", LineColor = "yellow")]
public IndicatorDataSeries temaA { get; set; }
[Output("TF B", LineColor = "red")]
public IndicatorDataSeries temaB { get; set; }
[Output("TF C", LineColor = "blue")]
public IndicatorDataSeries temaC { get; set; }
private ExponentialMovingAverage ema1;
private ExponentialMovingAverage ema2;
private ExponentialMovingAverage ema3;
private ExponentialMovingAverage ema1tf2;
private ExponentialMovingAverage ema2tf2;
private ExponentialMovingAverage ema3tf2;
private ExponentialMovingAverage ema1tf3;
private ExponentialMovingAverage ema2tf3;
private ExponentialMovingAverage ema3tf3;
public bool tfUp;
public bool tfDown;
public string tf2rez;
public string Reztf1;
public string Reztf2;
public string Reztf3;
public double PMA;
public double tf2diff;
public string tf2rezS;
public string tf3rezS;
public double tf1perc;
public double tf2perc;
public double tf3perc;
DataSeries stf1, stf2, stf3;
protected override void Initialize()
{
stf1 = MarketData.GetSeries(tf1).Close;
stf2 = MarketData.GetSeries(tf2).Close;
stf3 = MarketData.GetSeries(tf3).Close;
ema1 = Indicators.ExponentialMovingAverage(stf1, Period);
ema2 = Indicators.ExponentialMovingAverage(ema1.Result, Period);
ema3 = Indicators.ExponentialMovingAverage(ema2.Result, Period);
ema1tf2 = Indicators.ExponentialMovingAverage(stf2, Periodtf2);
ema2tf2 = Indicators.ExponentialMovingAverage(ema1tf2.Result, Periodtf2);
ema3tf2 = Indicators.ExponentialMovingAverage(ema2tf2.Result, Periodtf2);
ema1tf3 = Indicators.ExponentialMovingAverage(stf3, Periodtf3);
ema2tf3 = Indicators.ExponentialMovingAverage(ema1tf3.Result, Periodtf3);
ema3tf3 = Indicators.ExponentialMovingAverage(ema2tf3.Result, Periodtf3);
}
public override void Calculate(int index)
{
//------REGISTRY set-------------
//get time MarketSeries.TimeFrame.
var charttime = MarketSeries.OpenTime[index];
//var charttime = MarketSeries.TimeFrame.OpenTime[index];
//MarketSeries.
//get index
var idx1 = MarketData.GetSeries(tf1).OpenTime.GetIndexByTime(charttime);
//Print("idx1: " + idx1);
var idx2 = MarketData.GetSeries(tf2).OpenTime.GetIndexByTime(charttime);
var idx3 = MarketData.GetSeries(tf3).OpenTime.GetIndexByTime(charttime);
temaA[index] = 3 * ema1.Result[idx1] - 3 * ema2.Result[idx1] + ema3.Result[idx1];
// Print("Tema A " + temaA[index]);
temaB[index] = 3 * ema1tf2.Result[idx2] - 3 * ema2tf2.Result[idx2] + ema3tf2.Result[idx2];
// Print("Tema B " + temaA[index]);
temaC[index] = 3 * ema1tf3.Result[idx3] - 3 * ema2tf3.Result[idx3] + ema3tf3.Result[idx3];
// Print("Tema C " + temaA[index]);
//--------calc tf1-----------------
double tA0 = (Math.Round(temaA.Last(0), 2));
double tA1 = (Math.Round(temaA.Last(1), 2));
double tA2 = (Math.Round(temaA.Last(2), 2));
double tA3 = (Math.Round(temaA.Last(3), 2));
// /*
double tf1a1 = (Math.Round(temaA.Last(1), 2));
double tf1a6 = 0;
double tf1perc = 0;
string tf1rez = "" + tf1a1;
string tf1rezS = "";
for (int i = 1; i <= 15; i++)
{
tf1a6 = (Math.Round(temaA.Last(i), 2));
if (tf1a6 != tf1a1)
{
if (tf1a6 > tf1a1)
{
tf1perc = Math.Round(1 * (tf1a1 - tf1a6), 2);
tf1rez = "tf1 -DOWN---(" + i + ") " + tf1a6 + " (1) " + tf1a1 + " i=" + i + " %=" + tf1perc;
tf1rezS = "tf1 down";
Reztf1 = "down";
break;
}
if (tf1a6 < tf1a1)
{
tf1perc = Math.Round(1 * (tf1a1 - tf1a6), 2);
tf1rez = "tf1 -UP---(" + i + ") " + tf1a6 + " (1) " + tf1a1 + " i=" + i + " %=" + tf1perc;
tf1rezS = "tf1 up";
Reztf1 = "up";
break;
}
}
}
//-----calc tf2-------------------
double tB0 = (Math.Round(temaB.Last(0), 2));
double tB1 = (Math.Round(temaB.Last(1), 2));
double tB3 = (Math.Round(temaB.Last(3), 2));
double tB9 = (Math.Round(temaB.Last(9), 2));
// /*
double tf2a1 = (Math.Round(temaB.Last(1), 2));
double tf2a6 = 0;
double tf2perc = 0;
string tf2rez = "" + tf2a1;
string tf2rezS = "";
for (int i = 1; i <= 15; i++)
{
tf2a6 = (Math.Round(temaB.Last(i), 2));
if (tf2a6 != tf2a1)
{
if (tf2a6 > tf2a1)
{
tf2perc = Math.Round(1 * (tf2a1 - tf2a6), 2);
tf2rez = "tf2 -DO---(" + i + ") " + tf2a6 + " (1) " + tf2a1 + " i=" + i + " %=" + tf2perc;
tf2rezS = "tf2 down";
Reztf2 = "down";
break;
}
if (tf2a6 < tf2a1)
{
tf2perc = Math.Round(1 * (tf2a1 - tf2a6), 2);
tf2rez = "tf2 -UP---(" + i + ") " + tf2a6 + " (1) " + tf2a1 + " i=" + i + " %=" + tf2perc;
tf2rezS = "tf2 up";
Reztf2 = "up";
break;
}
}
}
//-----end tf2----------------------
//-----calc tf3-------------------
double tC0 = (Math.Round(temaC.Last(0), 2));
double tC1 = (Math.Round(temaC.Last(1), 2));
double tC5 = (Math.Round(temaC.Last(5), 2));
double tC15 = (Math.Round(temaC.Last(15), 2));
// double PMA = 1;
double tf3a6 = 0;
double tf3perc = 0;
double tf3a1 = (Math.Round(temaC.Last(1), 2));
string tf3rez = "" + tf3a1;
string tf3rezS = "";
for (int i = 1; i <= 15; i++)
{
tf3a6 = (Math.Round(temaC.Last(i), 2));
if (tf3a6 != tf3a1)
{
PMA = (tf1perc + tf2perc + tf3perc);
if (tf3a6 > tf3a1)
{
tf3perc = Math.Round(1 * (tf3a1 - tf3a6), 2);
PMA = (tf1perc + tf2perc + tf3perc);
tf3rez = "tf3 -DO---(" + i + ") " + tf3a6 + " (1) " + tf3a1 + " i=" + i + " %=" + tf3perc + "\n\t\t\t_triOLD PMA. =" + PMA;
tf3rezS = "tf3 down";
Reztf3 = "down";
break;
}
if (tf3a6 < tf3a1)
{
tf3perc = Math.Round(10 * (tf3a1 - tf3a6), 2);
PMA = (tf1perc + tf2perc + tf3perc);
tf3rez = "tf3 -UP---(" + i + ") " + tf3a6 + " (1) " + tf3a1 + " i=" + i + " %=" + tf3perc + "\n\t\t\t_triOLD PMA. =" + PMA;
tf3rezS = "tf3 up";
Reztf3 = "up";
break;
}
}
}
//--end tf3---------------------
//-----calc tema2 diff
var tf26 = Math.Round(temaB.Last(6), 2);
var tf20 = Math.Round(temaB.Last(0), 2);
var tf2diff = tf20 - tf26;
bool tfUp = tf2diff >= 9 ? true : false;
bool tfDown = tf2diff <= -9 ? true : false;
var diffPerc2FR = Math.Round(10000 * (tf2diff / tf20), 3);
var ColRSI = "Yellow";
if (RunningMode != RunningMode.Optimization)
{
// Chart.DrawStaticText("AlertBuy", "tf26 " + tf26 + " " + " tf20 " + tf20 + "\n\n\n\ntfDown " + tfDown + " tfUp" + tfUp, VerticalAlignment.Top, HorizontalAlignment.Center, Color.Yellow);
Chart.DrawStaticText("tf1", "IND " + tf1rez, VerticalAlignment.Top, HorizontalAlignment.Center, Color.Yellow);
Chart.DrawStaticText("tf2", "\nIND " + tf2rez, VerticalAlignment.Top, HorizontalAlignment.Center, Color.Red);
Chart.DrawStaticText("tf3", "\n\nIND " + tf3rez, VerticalAlignment.Top, HorizontalAlignment.Center, Color.Aqua);
}
//---end calc diff--------------
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 May 2020, 08:44
Hi luca,
There is no automatic way to restart a cBot.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous