
Topics
Replies
PanagiotisCharalampous
05 Mar 2018, 10:40
Hi Alexander,
I cannot advise if it is functioning right since I don't know what it is supposed to do :) If you describe what you are trying to achieve I might be able to tell if you have coded this right.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
05 Mar 2018, 10:36
Hi amsman,
If the account is a Spotware cTrader demo account then you can open it. If you login with your cTID to the new Spotware cTrader Beta, you should be able to see all your previous accounts listed.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
05 Mar 2018, 10:32
Hi itmfar,
The reason your cBot stops is because it is crashing on OnBar(). Check your log. You need to initialize the IndicatorDataSeries. My question is why do you need to transfer the values to new data series and don't just use the ihk data series directly?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Mar 2018, 17:50
Hi PapaGohan,
We are aware of this request but I will be frank with you, I don't see this coming in the short term. There are requests with bigger demand that are currently our priority like visual backtesting, chart objects and many more. After we deliver them we can start considering this.
We will keep you informed about plans to incorporate this in the future.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Mar 2018, 17:34
Hi marwaha1@gmail.com,
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(DefaultValue = 0.0)] public double Parameter { get; set; } private int _barCount; private bool _startCounting; protected override void OnStart() { Positions.Opened += OnPositionsOpened; } void OnPositionsOpened(PositionOpenedEventArgs obj) { _startCounting = true; } protected override void OnBar() { if (_startCounting) _barCount++; } protected override void OnStop() { // Put your deinitialization logic here } } }
Let me know if this helps,
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Mar 2018, 12:56
Hi marwaha1@gmail.com,
You can use DateTime.Now to set the current values. But then the condition will be always true.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Mar 2018, 12:48
Hi henry.tsui.1222,
Currently there is no such feature. However I would like to ask you to post some screenshots of the issue so that I can understand the problem better.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Mar 2018, 12:43
Hi Alexander,
Where do you define ADX?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Mar 2018, 12:40
( Updated at: 21 Dec 2023, 09:20 )
Hi MaRCHeW,
Use the + button
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
27 Feb 2018, 18:02
Hi MaRCHeW,
Thanks for pointing this out. cAlgo team is already working on a fix. We appreciate the involvement of the community into making cTrader 3.0 a stable product before rolling out to brokers.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
27 Feb 2018, 14:33
Hi BeardPower,
Indeed cTrader 3.0 Beta was released this morning. Renko charts are coming in v3.01. Range bars are coming later.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
27 Feb 2018, 12:45
Hi itmfar,
See below
protected override void OnTick() { double totalprofit = 0; double gainedPips = 0; int winningTrades = 0; foreach (HistoricalTrade trade in History) { if (trade.Label == "Your Label") { totalprofit += trade.NetProfit; gainedPips += trade.Pips; if (trade.NetProfit > 0) winningTrades++; } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
27 Feb 2018, 11:42
Hi itmfar,
A suggestion is to add a label to the trades placed by the cBot and then trace them by label instead by date.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
27 Feb 2018, 11:11
Hi marwaha1@gmail.com,
Thanks for posting in our forum. See below an example that might be helpful
using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class NewcBot : Robot { [Parameter(DefaultValue = 0)] public int Minute { get; set; } [Parameter(DefaultValue = 12)] public int Hour { get; set; } [Parameter(DefaultValue = 1)] public int Day { get; set; } [Parameter(DefaultValue = 1)] public int Month { get; set; } [Parameter(DefaultValue = 2018)] public int Year { get; set; } private DateTime _closeDateTime; protected override void OnStart() { _closeDateTime = new DateTime(Year, Month, Day, Hour, Minute, 0); } protected override void OnTick() { if (DateTime.Now > _closeDateTime) { foreach (var position in Positions) { ClosePosition(position); } } } protected override void OnStop() { // Put your deinitialization logic here } } }
You can adjust accordingly based on your needs.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
27 Feb 2018, 09:17
Hi abhishek,
Do you mean bid/ask prices? You can get them using Symbol.Bid and Symbol.Ask properties.
Let me know if this is what you were looking for
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Feb 2018, 14:56
Hi jjwes76@gmail.com,
You can find a guide on how to use a custom indicator in a cbot here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Feb 2018, 14:40
Hi Ochosama,
Thanks for clarifying. In order to use FIX then you will need to develop your own application using FIX API.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Feb 2018, 14:38
Hi nguyenbaocuong,
You can use the following formula
Math.Log10(Symbol.PipSize / Math.Pow(10, -Symbol.Digits))
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Feb 2018, 14:21
Hi abhishek,
See below
- Not Available.
- Not Available. Will be added in next release.
- Not possible currently. Will be covered with point 2.
- Use Account.IsLive
- If you mean the Account's margin then use Account.Margin
Let me know if the above answer your questions,
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
05 Mar 2018, 10:47
Hi burakbirer,
Thanks for your feedback. All the features you request will be a part of cTrader Copy, the successor of cMirror, which will be released soon. You can read more in the cTrader Copy section of our website.
Best Regards,
Panagiotis
@PanagiotisCharalampous