
Topics
Replies
PanagiotisCharalampous
07 Feb 2020, 14:16
Hi FX28,
I tried this but I cannot reproduce such a problem. Can you make sure that the form does not pop up somewhere where it is not immediately visible e.g. another screen?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 12:01
Hi Tengu,
I tried to reproduce this behavior on Spotware Beta but I could not. Rescaling seems to work even after I close and open cTrader. Can you provide exact steps to reproduce this issue or record a video demonstrating this behavior?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 11:30
Hi again,
As a temporary workaround, please add the below code snippet to your cBots/Indicators
private MarketSeries _ms;
public new MarketSeries MarketSeries
{
get
{
if (_ms == null)
_ms = base.MarketSeries;
return _ms;
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 11:30
Hi again,
As a temporary workaround, please add the below code snippet to your cBots/Indicators
private MarketSeries _ms;
public new MarketSeries MarketSeries
{
get
{
if (_ms == null)
_ms = base.MarketSeries;
return _ms;
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 11:22
Hi w.b.z,
No what we are saying is that we have changed a lot of things and we cannot guess which one is affecting your code unless we know what caused the exception. We have already identified some issues reported by other users but we don't know if it is the same issue affecting you as well or something else.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 11:18
Hi firemyst,
See below
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
/// <summary>
/// HOW TO REPRODUCE THE ISSUE
///
/// Add this indicator to the US30 M1 chart.
/// The bug is it won't draw anything for the IndicatorDataSeries.
/// Prior to V3.7, this used to work.
/// Expected behavior: draw a solid green line along the value of zero.
/// </summary>
namespace cAlgo
{
[Levels(0)]
[Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class Test : Indicator
{
[Output("Main", LineColor = "Green", LineStyle = LineStyle.Solid, PlotType = PlotType.Line, Thickness = 3)]
public IndicatorDataSeries Result { get; set; }
bool _calculateCalled;
protected override void Initialize()
{
_calculateCalled = false;
Timer.Start(1);
Timer.TimerTick += _timer_TimerTick;
}
private void _timer_TimerTick()
{
if (_calculateCalled)
{
Print("Calculating index " + Bars.ClosePrices.Count + " in TimerTick()");
}
}
public override void Calculate(int index)
{
if (!_calculateCalled)
{
Print("Calculating index " + index + " in Calculate()");
}
if (IsLastBar)
_calculateCalled = true;
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 10:52
Hi all,
We have identified a performance issue in indicators. We will fix it and push a hotfix soon
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 10:52
Hi all,
We have identified a performance issue in indicators. We will fix it and push a hotfix soon
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 10:40
Hi koktos632,
We plan to add this function in a future release.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 10:17
Hi firemyst,
I would just use a boolean flag indicating if the Calculate() method has been executed.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 10:06
Hi koktos632,
Change your cBot access rights to FullAccess. See below
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 08:22
Hi firemyst,
1) Timer event should work as well.
2) We had to make this change to fix other issues with indicators not being updated after reconnections
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 08:05
Hi w.b.z,
Unfortunately without a code sample to reproduce the problem we cannot determine what is the reason of the exception.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 08:01
Hi all,
Can we have a code sample that reproduces this problem?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Feb 2020, 14:59
Hi there,
This parameter is not available in the API at the moment.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Feb 2020, 14:21
Hi ysdytk1973,
Your host is wrong. You can find the correct hosts here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Feb 2020, 12:35
Hi Tengu,
See an example below
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Cloud("Fast MA", "Slow MA", FirstColor = "Aqua", Opacity = 0.5, SecondColor = "Red")]
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class CloudExample : Indicator
{
[Parameter("Fast MA Period", DefaultValue = 21)]
public int FastMaPeriod { get; set; }
[Parameter("Slow MA Period", DefaultValue = 50)]
public int SlowMaPeriod { get; set; }
[Output("Fast MA", LineColor = "#FF6666")]
public IndicatorDataSeries FastMaResult { get; set; }
[Output("Slow MA", LineColor = "#0071C1")]
public IndicatorDataSeries SlowMaResult { get; set; }
SimpleMovingAverage FastMa;
SimpleMovingAverage SlowMa;
protected override void Initialize()
{
FastMa = Indicators.SimpleMovingAverage(Bars.ClosePrices, FastMaPeriod);
SlowMa = Indicators.SimpleMovingAverage(Bars.ClosePrices, SlowMaPeriod);
}
public override void Calculate(int index)
{
FastMaResult[index] = FastMa.Result[index];
SlowMaResult[index] = SlowMa.Result[index];
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Feb 2020, 10:43
Hi firemyst,
In 3.7 all output series are cleared after initialization. All value assignments in output series should take place inside Calculate method.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Feb 2020, 09:19
Hi 66281850,
It represents seconds. It is around 30 days.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Feb 2020, 16:34
Hi mbv4f,
There is no option to select to which proxy to connect. cTrader selects automatically the proxy with the best connection for you.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous