
Topics
Replies
PanagiotisCharalampous
18 Feb 2020, 11:00
Hi ctid1006205,
I still do not have all the information I need. I asked for the position ID for which you expected the TP to be triggered but was not. I was expecting the follower's position ID but you have provided your strategy provider's DID. Can you please provide the follower's position ID as well as a screenshot showing that this trade was not copied correctly?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Feb 2020, 10:51
Hi reza h,
Here is a general example on how to raise/lower a flag based on conditions
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
{
bool _hammerDetected;
protected override void OnStart()
{
// Put your initialization logic here
}
protected override void OnBar()
{
if (LowerFlag())
{
_hammerDetected = false;
}
if (!_hammerDetected && HammerDetected())
{
_hammerDetected = true;
}
}
private bool LowerFlag()
{
// put here the conditions to lower your flag
return true;
}
private bool HammerDetected()
{
// detect your hammer
return true;
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Feb 2020, 10:43
Hi traderfxmaster007,
It is not clear what is the issue. Can you please post the complete cBot code so that we can reproduce the error messages you are receiving?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Feb 2020, 09:28
Hi stakhurlov,
Thanks for reporting your issues. If possible, please use English language in this forum. We have released a hotfit on Spotware Beta that should resolve the performance issue. Please test your cBot there and let us know if the performance is improved. The hotfix will be pushed to brokers soon.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Feb 2020, 08:23
Hi ctid1006205,
I cannot find such a strategy in cTrader Copy. Can you send me a link to the strategy? Also you have not provided the relevant deal from the strategy that was supposed to be copied.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Feb 2020, 08:18
Hi lithast,
We do not have an ETA. As soon as we finish testing and the build is stable.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Feb 2020, 08:17
Hi miloscicmil,
You can use DrawIcon() method and draw a circle or another icon of your choice.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Feb 2020, 08:09
RE: Market Sentiment via API?
19621o12@gmail.com said:
Will the market Sentiment become accessible in bots, perhaps via the API?
We do not have such plans at the moment.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Feb 2020, 08:08
Hi NE539,
I do not have an exhaustive list of all the differences but the major one is that you cannot use custom indicators and cBots on cTrader Web. Furthermore, from time to time some features might be available on one platform because they have not been delivered on the other, but in general we are trying to keep both applications on par. In terms of performance, you should expect a better performance from the desktop application since it is native compared to cTrader Web that needs to run within a browser.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Feb 2020, 16:29
Hi team500,
This indicator can switch a chart's timeframe and symbol but not open a new chart or close the existing one. The functions it uses are the following
https://ctrader.com/api/reference/chart/trychangetimeframe
https://ctrader.com/api/reference/chart/trychangetimeframeandsymbol
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Feb 2020, 16:19
Hi team500,
There is no such function.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Feb 2020, 16:19
Hi A.R.,
Can you post the indicator code?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Feb 2020, 16:17
Hi there,
To fix this issue you need to add a dummy to the indicator and call it from the cBot. See below
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class Chickens : Indicator
{
[Parameter("Source")]
public DataSeries Source { get; set; }
[Output("Main")]
public IndicatorDataSeries Result { get; set; }
public int counter = 1;
protected override void Initialize()
{
// Initialize and create nested indicators
Print("INDICATOR PRINT | calculate | initial value for \"counter\" " + counter);
}
public override void Calculate(int index)
{
counter = counter > 100 ? 0 : ++counter;
ChartObjects.DrawText("max100", "counter " + counter, StaticPosition.BottomRight, Colors.Plum);
}
}
}
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 ChickenCounter : Robot
{
[Parameter(" Source")]
public DataSeries Source { get; set; }
private Chickens chick;
protected override void OnStart()
{
// Put your initialization logic here
chick = Indicators.GetIndicator<Chickens>(Source);
}
protected override void OnTick()
{
// Put your core logic here
Print(chick.Result.LastValue);
Print("OnTick | counter " + chick.counter);
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Feb 2020, 15:18
Hi silvanaskocic75,
Did you do anything else than just installing cTrader on desktop e.g. placed orders or opened any positions?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Feb 2020, 15:16
Hi TzvetomirTerziysky,
I will raise this issue to the development team to check again.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Feb 2020, 14:02
Hi bienve.pf,
Please provide the cBot code and screenshots of the errors.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Feb 2020, 14:00
Hi TzvetomirTerziysky,
As explained above the exception was added in 3.7. After receiving a lot of complaints from users, we have reverted to how it was working in v3.6. It was never working in optimization.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Feb 2020, 12:46
Hi bienve.pf,
We can consider this for future updates.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Feb 2020, 12:13
Hi TzvetomirTerziysky,
We put nothing under the carpet. This was never working in optimization. It was just not throwing an exception in v3.6. We restored this functionality in v3.7.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Feb 2020, 08:11
Hi firemyst,
No that is not possible.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous