
Topics
Replies
PanagiotisCharalampous
28 Sep 2020, 08:50
Hi there,
You can find more brokers here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 08:48
Hi ctid2568413,
We need the complete cBot code in order to provide further assistance.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 08:45
Hi Christian,
Both are very mature programming languages supported by an abundance of resources for any possible use. I would suggest C# since this is mostly a C# community and you will have access to more domain specific assistance.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 08:42
Hi ctid956028,
Can you please provide us with the complete cBot code?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 08:42
Hi Yuval,
Do you still experience this issue? Do you have active OctaFX accounts? Did you contact OctaFX about it?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 08:38
Hi markyandrew,
I am not sure how did you end up with so inaccurate conclusions but we do respond to almost all threads addressed to us in this forum and through our Telegram group. Regarding your question, this feature is not available at the moment.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 08:34
Hi FxOrDie,
The current behavior will not change as this is how it was designed to work. As written above, a future update of cTrader Copy will provide the option to receive your copying fees into a separate trading account so that this behavior is avoided.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 08:25
Hi Christian,
You can find instructions on how to compile the .proto files here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 08:23
Hi cdyett,
These features are enabled only after the broker requests for them.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 08:21
Hi deadletteropener,
We do not have immediate plans to add this in the near future.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Sep 2020, 14:47
Hi firemyst,
You cannot use Output IndicatorDataSeries to do this since they have a one to one correspondence with the chart timeframe's bar. You need to be more inventive. Here is a solution
using System;
using System.Collections.Generic;
using cAlgo.API;
using cAlgo.API.Indicators;
namespace cAlgo.Indicators
{
[Indicator(IsOverlay = true, AccessRights = AccessRights.None)]
public class Test : Indicator
{
[Parameter()]
public TimeFrame SourceTimeFrame { get; set; }
[Parameter("Min AF", DefaultValue = 0.02)]
public double MinAF { get; set; }
[Parameter("Max AF", DefaultValue = 0.2)]
public double MaxAF { get; set; }
[Output("Main", PlotType = PlotType.Points, LineStyle = LineStyle.Dots, LineColor = "White", Thickness = 2)]
public IndicatorDataSeries Result { get; set; }
private Bars _marketSeries;
private ParabolicSAR _psar;
int previousAltIndex = 0;
protected override void Initialize()
{
if (SourceTimeFrame != null)
_marketSeries = MarketData.GetBars(SourceTimeFrame, Symbol.Name);
else
_marketSeries = MarketData.GetBars(Bars.TimeFrame, Symbol.Name);
_psar = Indicators.ParabolicSAR(_marketSeries, MinAF, MaxAF);
}
public override void Calculate(int index)
{
int altIndex = index;
if (Bars.TimeFrame != _marketSeries.TimeFrame)
{
altIndex = _marketSeries.OpenTimes.GetIndexByTime(Bars.OpenTimes[index]);
}
if (Bars.TimeFrame != _marketSeries.TimeFrame)
{
altIndex = _marketSeries.OpenTimes.GetIndexByTime(Bars.OpenTimes[index]);
for (int i = previousAltIndex; i < altIndex; i++)
{
Chart.DrawIcon(_marketSeries.OpenTimes[i].ToString(), ChartIconType.Circle, _marketSeries.OpenTimes[i], _psar.Result[i], Color.Red);
}
altIndex = previousAltIndex;
}
// blah blah blah
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Sep 2020, 11:19
( Updated at: 21 Dec 2023, 09:22 )
Hi firemyst,
Did you try my code? It prints a line on the starting time of every bar for the lower timeframe
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Sep 2020, 11:07
Hi Luca,
You can use the OnBar() method. Else you can check if the Bars.OpenTimes.LastValue has changed.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Sep 2020, 10:43
Hi firemyst,
OnCalculate method is called once per bar when the indicator is calculated for past values. Having that in mind, if you want your indicator to display values from lower timeframes, you need to write the corresponding logic that will take this into consideration. Here is a starting point, an indicator drawing vertical lines on lower tiimeframe open times
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class NewIndicator : Indicator
{
[Parameter(DefaultValue = 0.0)]
public TimeFrame SourceTimeFrame { get; set; }
[Output("Main")]
public IndicatorDataSeries Result { get; set; }
private Bars _marketSeries;
int previousAltIndex = 0;
protected override void Initialize()
{
if (SourceTimeFrame != null)
_marketSeries = MarketData.GetBars(SourceTimeFrame, Symbol.Name);
else
_marketSeries = MarketData.GetBars(Bars.TimeFrame, Symbol.Name);
}
public override void Calculate(int index)
{
int altIndex = index;
if (Bars.TimeFrame != _marketSeries.TimeFrame)
{
altIndex = _marketSeries.OpenTimes.GetIndexByTime(Bars.OpenTimes[index]);
for(int i = previousAltIndex; i < altIndex; i++)
{
Chart.DrawVerticalLine(_marketSeries.OpenTimes[i].ToString(), _marketSeries.OpenTimes[i], Color.Red);
}
altIndex = previousAltIndex;
}
// blah blah blah
}
}
}
Note that for current values, OnCalculate() is called on every tick, in case you need to take that into consideration.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Sep 2020, 07:59
Hi firemyst,
You will need to program your own methods to calculate those times.
Regarding
Does cTrader have the ability to plot 3 smaller time frame bar values in the space of 1 bar on a higher time frame?
I did not understand the question. You are trying to do something here but I do not understand what it is. Maybe it would be better to explain what are you trying to do instead discussing about a solution you thought would work.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Sep 2020, 07:50
Hi ctid2568413,
Some solutions are proposed here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Sep 2020, 07:45
Hi Luca,
Check here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Sep 2020, 07:44
Hi maciel.rafael1,
You can send it at community@spotware.com
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Sep 2020, 17:08
Hi maciel.rafael1,
You need to be more specific. Please provide the cBot code and the exception you get.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 08:52
Hi Mason,
There is no way to automate this procedure. You need to do this manually.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous