
Topics
Replies
PanagiotisCharalampous
10 Jul 2020, 08:31
Hi koktos632,
The reference point is the market's opening time, which is Sunday 21:00. For that time and on you should see a candle every four hours (21:00, 01:00, 05:00 etc).
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 Jul 2020, 16:40
Hi tperalta82,
Interesting... are you backtesting? haven't tried without backtesting though
No, you did not mention anywhere that this happens on backtesting. On backtesting this method is not supported at the moment. If you want to get more bars during backtesting, you need to start testing from an earlier date.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 Jul 2020, 15:18
Hi tperalta82,
Works fine for me
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 Jul 2020, 14:42
Hi cesafat,
You can do that in cTrader as well but not by using indices. You can consider using
DrawVerticalLine(string name, DateTime time, Color color)
which uses an exact date time instead
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 Jul 2020, 10:15
Hi Victor,
it is not so straight forward for the Source part. The current parameter will not work. You will need to declare your own enum
public enum SourceType
{
Open,
High,
Low,
Close
}
use it as a variable type
[Parameter("Source")]
public SourceType Source { get; set; }
and then have a method to return the appropriate source from the bars object
private DataSeries GetSeries(Bars bars, SourceType type)
{
// Getting the series based on the source type
switch (type)
{
case SourceType.Open:
return bars.OpenPrices;
case SourceType.High:
return bars.HighPrices;
case SourceType.Low:
return bars.LowPrices;
case SourceType.Close:
return bars.ClosePrices;
default:
return bars.ClosePrices;
}
}
You can then use it for your indicator as below
var rsi = Indicators.RelativeStrengthIndex(GetSeries(MarketData.GetBars(RSITimeFrame), Source), 14);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 Jul 2020, 08:37
Hi acrigney,
There are a lot of brokers currently offering cTrader that offer stocks as well.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 Jul 2020, 08:35
Hi Victor,
Here is an example
var rsi = Indicators.RelativeStrengthIndex(MarketData.GetBars(TimeFrame.Hour).ClosePrices, 14);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 Jul 2020, 08:28
Hi luciancastro89,
You can use the statement below to check the number of positions before executing your trading
if (Positions.Count < NoOfPositions)
{
// Execute your trading
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 Jul 2020, 08:24
Hi cesafat,
You cannot have an index as a decimal. It just doesn't make sense.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 Jul 2020, 08:20
Hi Mark,
The code does not seem complete. Can you please provide the complete cBot code?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 Jul 2020, 08:18
Hi luciancastro89,
These are the lines you have to change
if (stochasticOscillator.PercentK.Last(2) < stochasticOscillator.PercentD.Last(2))
{
if (stochasticOscillator.PercentK.LastValue > stochasticOscillator.PercentD.LastValue)
{
if (stochasticOscillator.PercentK.Last(2) > stochasticOscillator.PercentD.Last(2))
{
if (stochasticOscillator.PercentK.LastValue < stochasticOscillator.PercentD.LastValue)
{
Instead of making these checks which actually check if the two lines have crossed each other, you need to check if PercentK has crossed a specific value. e.g.
if (stochasticOscillator.PercentK.Last(2) > 20)
{
if (stochasticOscillator.PercentK.LastValue < 20)
{
I hope this helps
Best Regards
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2020, 16:51
Hi tperalta82,
Can you please provide the symbol, timeframe and broker?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2020, 12:56
Hi quantumalgorithmics,
cTrader Copy does not allow 1:1 copying but only equity to equity based copying. Notifications for copied trades are not available at the moment.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2020, 12:30
Hi Ketu,
Change
private readonly ChartTrendLine _chartTrendLine;
to
public ChartTrendLine ChartTrendLine { get; }
and then order the collection accordingly as below
foreach (var signalLine in SignalLineRepository.GetLines().OrderByDescending(x => x.ChartTrendLine.Y1))
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2020, 12:11
Hi Ketu,
You need to post the complete code for us to be able to help you.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2020, 11:24
Hi niloytom,
If you need somebody to develop this for you, you can consider posting a Job or contacting a Consultant.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2020, 09:41
Hi francisang92,
You need to have a unique name for each object. Else when the DrawText() is called using the name of an existing object, the object will be replaced with the new one.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2020, 08:37
Hi cokeplus898,
Did you cross check the prices received with what you see in cTrader UI? Can you see differences? e.g.
If yes, can you provide more information e.g. a video showing the differences? Also let us know your broker.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Jul 2020, 08:33
Hi n2535904,
Optimization for mutlisymbol strategies is not supported at the moment.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jul 2020, 08:33
Hi andyb_trading,
You can use Linked Charts
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous