
Topics
Replies
PanagiotisCharalampous
01 Mar 2021, 15:16
Hi xabbu,
What is the code you posted supposed to do?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 12:44
Hi xabbu,
The values are stored in UpFractal and DownFractal data series
var fractals = Indicators.Fractals(10);
Print(fractals.DownFractal.LastValue);
Print(fractals.UpFractal.LastValue);
The values are saved at the relevant index of the data series. If there is no value, then the value will be NaN. Therefore the last fractal is the one with a value at the highest index.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 12:05
Hi jiminparky,
You just need to login (MsgType(35)=A) and then subscribe to market data (MsgType(35)=V). Let me know if you have any further questions.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 11:28
Hi Shares4UsDevelopment,
At the moment Tick Volume is not supported for Renko and Range bars, therefore it will always be set to 1.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 11:27
( Updated at: 21 Dec 2023, 09:22 )
Hi maxalta,
This has been added in cTrader v4.0 so you should have it anytime soon if your broker does not have this already.
In the meanwhile, a workaround is to pass the timeframe as a parameter. This way you will be able to choose tick based timeframes from the UI. See below
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
{
[Parameter("Timeframe")]
public TimeFrame Timeframe { get; set; }
protected override void OnStart()
{
var bars = MarketData.GetBars(Timeframe, "GBPUSD");
bars.BarOpened += Bars_BarOpened;
}
private void Bars_BarOpened(BarOpenedEventArgs obj)
{
Print("New bar created for " + obj.Bars.SymbolName + " at " + obj.Bars.Last(0).OpenTime);
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 11:19
Hi linton.nkambule,
Thanks for bringing this to our attention. It seems to be a bug and it will be updated in an upcoming update.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 10:55
Hi xabbu,
It sounds correct to me!
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 10:52
Hi maxalta,
BarOpened should trigger for all types of charts.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 10:51
Hi Shares4UsDevelopment,
How can we reproduce this?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 10:47
Hi eelko14,
Can you share screenshots demonstrating this problem?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 10:45
Hi Shares4us,
There dots are part of the deal map and show entry and exit points. It's a trade closed in profit. Instead of a green triangle, which would not be distinguishable, you get these dots.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 10:37
Hi rizuntaki3,
This information is not directly accessible from the API. You will need to program a solution yourself e.g. find the bar that corresponds to the trading session open time and record the open price.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 10:21
( Updated at: 21 Dec 2023, 09:22 )
Hi Alphatrader,
You can drag the last candle to the center of the screen by dragging the time counter to the left. See below
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 10:08
Hi budda_dan2020,
One of the reasons that the server will close the connection is to avoid a buffer overflow, meaning that your application does not read data from the stream fast enough, therefore the stream fills up and the server has nowhere to write the new data. Check if this could be the reason.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 10:00
Hi ChannelTrader,
This is not supported at the moment.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 09:43
Hi glanzwurde,
Is it possible to report your issue in English? It is not clear from the translation what the problem is.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Feb 2021, 14:21
Hi Lisa,
We received the exception and we will investigate.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Feb 2021, 12:14
Hi ChannelTrader,
It's the same problem. You cannot call a position that does not exist.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Feb 2021, 11:44
Hi ChannelTrader,
Your problem is here
if (Positions.Count <= 1 && positions.Last().Pips >= TargetPips)
You cannot call Last() method if there are no elements in the collection.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Mar 2021, 15:20
Hi xabbu,
Yes it should adjust automatically.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous