Topics
Replies
PanagiotisCharalampous
26 Oct 2020, 08:46
Hi Jason,
Can you please provide more information about this issue?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 08:44
Hi Robert,
This is not possible at the moment but we plan adding this feature in a future update.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 08:42
Hi Emmanuel,
Unfortunately we do not have such an example at the moment.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 08:40
Hi Enammuel,
You should be able to do so.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 08:26
Hi joanne_llamado,
Here is an example
var sma = Indicators.SimpleMovingAverage(Bars.ClosePrices,14);
if(Bars.HighPrices.Last(1) < sma.Result.LastValue)
{
// do something
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 08:17
Hi chatcpe,
This happens because you use the genetic algorithm. Try the grid method instead.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 08:12
Hi ajbozdar,
If you hover your mouse over these buttons you will get an explanation of what each case does. You can find the explanation here as well.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 08:08
Hi Christian,
It is not clear to me what is the problem here. Can you provide steps to reproduce this behavior?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 08:05
Hi ajbozdar,
cTrader is backwards compatible, so all indicators should run without a problem.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 08:03
Hi YouFX,
See below
protected override void Initialize()
{
var daily = MarketData.GetSeries(TimeFrame.Daily);
var dailyHigh = daily.High.Last(1);
var TimeHIGH = daily.OpenTime.Last(1);
var dailyLow = daily.Low.Last(1);
var TimeLOW = daily.OpenTime.Last(1);
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 07:58
Hi m.mohammadreza.m.s,
The below lines of code do not make much sense. I am not sure what are you trying to do
public ChartRectangle DrawRectangle(string Fast, int index1, double minfast, int index2, double maxfast, Color = Color.BlueViolet, int thickness = 1, LineStyle = LineStyle.Lines);
public ChartRectangle DrawRectangle(string Medium, int index1, double minmedium, int index3, double maxmedium, Color = Color.BlueViolet, int thickness = 1, LineStyle = LineStyle.Lines);
public ChartRectangle DrawRectangle(string Slow, int index1, double minslow, int index4, double maxslow, Color = Color.BlueViolet, int thickness = 1, LineStyle = LineStyle.Lines);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 07:51
Hi duketv,
Thanks, I was correct then.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Oct 2020, 16:47
Hi duketv,
You are probably calling the method somewhere using 2 arguments. But I am just guessing since you haven't posted the complete cBot code.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Oct 2020, 16:02
Hi coship00,
At the moment default position size is the minimum position size.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Oct 2020, 08:57
Hi seetame,
See here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Oct 2020, 08:54
Hi heliodorstar,
You could consider preprocessing the Where query and save the results in a separate list to have the positions ready when the time to close them comes.
You can also consider using Parallel.ForEach
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Oct 2020, 08:49
Hi there,
Thanks for posting in our forum. However your post doesn't make much sense so I cannot understand what is the problem and how we can help. Could you try explaining better what is the issue?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Oct 2020, 08:39
Hi all,
Here you go
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
using System.Reflection;
using System.Linq;
namespace cAlgo
{
[Cloud("Fast MA", "Slow MA", FirstColor = "Green", 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
23 Oct 2020, 08:37
Hi duketv,
In my second I worked with OpenPosition, but this gives me problems in the method definition. It gives the error that no method has been found to override..
Then skip the override keyword :)
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2020, 08:48
Hi Jason,
Do you get any error messages? Did you try a clean installation?
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous