Topics
Replies
PanagiotisCharalampous
19 Mar 2019, 12:52
Hi El Antonio,
Can you please post the complete cBot code?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Mar 2019, 11:26
Hi erikvb,
Try placing your logic inside OnBar() instead of inside OnTick().
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Mar 2019, 11:09
Hi noppanon,
I think I misunderstood what you are trying to do. The workaround below is closer to what you need, even though not perfect. It detects when an object is hovered.
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("Distance 1", DefaultValue = 10.0, MinValue = 1.0, Step = 1.0)] public double Distance1Param { get; set; } ChartHorizontalLine TargetLine1; ChartObject _selectedObject; // Chart decoration information when alert is triggered private string ChartID1; private readonly Color AlertColor1 = Color.Khaki; private readonly LineStyle AlertLineStyle = LineStyle.LinesDots; private readonly int AlertLineThick = 2; protected override void OnStart() { ChartID1 = "Target1"; double distance1; distance1 = (Symbol.Bid + Symbol.Ask) / 2 + (Distance1Param * Symbol.PipSize); TargetLine1 = Chart.DrawHorizontalLine(ChartID1, distance1, AlertColor1, AlertLineThick, AlertLineStyle); TargetLine1.IsInteractive = true; TargetLine1.Comment = "line 1"; Chart.ObjectHoverChanged += OnChartObjectHoverChanged; } void OnChartObjectHoverChanged(ChartObjectHoverChangedEventArgs obj) { if (obj.IsObjectHovered) _selectedObject = obj.ChartObject; else _selectedObject = null; } protected override void OnTick() { if (_selectedObject != null) { Print(_selectedObject.Name + " is selected"); } } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Mar 2019, 09:42
Hi Mario,
Thanks for posting in our forum. Are there any specific steps we can follow to reproduce this behavior?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 17:53
Hi erikvb,
Try these conditions
if (_hmaSignal.IsBearish && Positions.Count(x => x.Label == Label && x.TradeType == TradeType.Buy) == 0) { close(TradeType.Sell); trade(TradeType.Buy); } // BULLISH if (_hmaSignal.IsBullish && Positions.Count(x => x.Label == Label && x.TradeType == TradeType.Sell) == 0) { close(TradeType.Buy); trade(TradeType.Sell); }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 16:21
Hi Erik,
If you can create a cBot that reproduces the exception without using all these components then it will be easier for us to assist you. In order for us to help you, we need to be able to reproduce the problem.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 15:10
( Updated at: 21 Dec 2023, 09:21 )
RE: RE:
GlenHendriks said:
hmozahem said:
Why is my EURUSD 4h timeframe looking like that? the other timeframes are normal but every time i switch to the 4h it shows just these candles, i tried zooming in and out, i tried another EURUSD on another workplace and still the same issue, this is one of my favourite pairs to trade so if someone can help it would be much appreciated
This was happening to mee with weekly charts on Friday.
Hi Glen,
The issue seems to be fixed when you clean your browser's cache. Can you please try a hard refresh (Ctrl+F5) and let us know if it resolves the issue?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 14:27
Hi Lukas,
See below the answers to your questions
- Backtesting does not take into consideration swaps.
- Position merging is not possible. If you want to have only one position per symbol, you can use a netting account
- You cannot use Spotware cTrader Beta with Live accounts.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 12:22
Hi lec0456,
myfxbook.com is an independent third party product so maybe it is worth it contacting them directly.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 12:15
Hi anjan babu,
Yes you can. Option for backtesting will come in an upcoming release.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 12:13
Hi anjan babu,
See below an example
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 { SimpleMovingAverage _sma; protected override void OnStart() { _sma = Indicators.SimpleMovingAverage(MarketSeries.Close, 14); } protected override void OnTick() { if (_sma.Result.LastValue > Symbol.Bid && MarketSeries.Open.Last(1) > _sma.Result.LastValue && MarketSeries.Open.Last(2) > _sma.Result.LastValue) { // Do something } } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 12:08
Hi Lukas,
Thanks for your suggestions, we have forwarded them to the product team. v3.5 will be released to the brokers as soon as we feel is stable enough to be moved to production environments.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 12:05
Please download it and check if the behavior you reported is still reproduced or has been fixed. This version will be pushed to brokers soon. If the problem is fixed there, there is no reason to investigate further.
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 11:58
Hi Andrii,
Yes you can download cTrader Beta version from https://spotware.com/beta/
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 11:52
RE:
komposter said:
Another issue with renko chart.
I've launched cTrader, started my bot... but chart didn't draw new bars till restart!
I've recorded the video — https://youtu.be/1gD1KNniXDQ
Hi Andrii,
We will have a look at this. Can you reproduce this issue on Spotware cTrader Beta as well?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 11:24
Hi hmozahem,
I am still expecting from you an email for a TeamViewer connection. We need to connect to your computer to inspect the issue.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 11:20
Hi Erik,
Since there are may components and references in this cBot, please send me the compressed solution folder at community@spotware.com.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 10:58
Hi fxwisdom1@gmail.com,
The order will go to our datacenter in London.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Mar 2019, 10:53
Hi a.fernandez.martinez,
Can you explain what are you trying to do in the following lines of code?
int marketSeriesCloseLength = MarketSeries.Close.Count; for (int i = marketSeriesCloseLength - 1; i >= 1; i--) {
Since the length of each timeframe is different, you will get different results. It is also not clear to me what are you trying to achieve here therefore I cannot advise futher.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Mar 2019, 14:25
Hi El Antonio,
DataSeries type does not feature a setter, see interface definition below
Which indicator are you trying to feed?
Best Regards,
Panagiotis
@PanagiotisCharalampous