Topics
Replies
PanagiotisCharalampous
24 Oct 2017, 17:31
Dear Zjhehe,
Could you please let us know which indicator you are using?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Oct 2017, 16:07
Something I forgot to mention is that you can export the history of backtesting and optimization results, if you right click inside the History tab and select "Export to Excel". I hope this helps!
@PanagiotisCharalampous
PanagiotisCharalampous
24 Oct 2017, 15:45
Hi obaum1@gmail.com,
You should send heartbeats to maintain the communication active between a client and a server. Read more here.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Oct 2017, 14:57
Hi irmscher9,
We are planning to add the ability to export a report of backtesting and optimization results in the future. For now, if you have access to the cBot code, you can add some code to save positions to a csv file. E.g. use Positions.Closed event to append text to a file.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Oct 2017, 14:47
Hi ycomp,
There should be a limit but I don't think it will affect you. If you keep your identifiers in reasonable sizes e.g. less than 50 characters, you should be fine.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Oct 2017, 14:11
Hi bdepadey,
The quantity should be saved based on your last order. It should not reset to another value. We tried this for both cTrader Desktop and cTrader Web for Create Order form as well as QuickTrade settings and it works fine. Could you please give us more information where does this happen to you to investigate further?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Oct 2017, 11:04
Hi ycomp,
Order IDs are strings therefore there is no practical limit. Why do you need this information?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
24 Oct 2017, 09:18
Hi obaum1@gmail.com,
orderID is generated by cTrader and reported in Execution Report messages. You can use it to cancel pending orders.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Oct 2017, 11:54
Hi arismac,
Thanks for posting in our forum! It is possible to program a cBot that will alert you on ema crossovers. The following resources might be helpful for you.
/api/reference/functions/hascrossedabove
/api/reference/functions/hascrossedbelow
/api/reference/internals/inotifications
Let me know if you need any additional help.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Oct 2017, 11:49
Hi hungtonydang,
I am happy that you have resolved the issue. Indeed, when switching between languages, these confusions happen. cAlgo is just an API built using C# and .Net framework. So any C# code should work inside a cBot. If something is not working, it might be that you are missing a reference. However, if you mean that cAlgo.API should use additional features of C# that would make your life easier, feel free to post your suggestions in the Suggestions section.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Oct 2017, 09:16
Hi richard_alcaide,
Both PlaceLimitOrder() and PlaceStopOrder() have feature a label parameter which can be used to add a label to the order. Let me know if this helps.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Oct 2017, 16:20
Hi amsman,
Apologies, i thought you just wanted to resolve the build errors. See below a properly working Parabolic SAR custom indicator
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; namespace cAlgo { [Indicator(IsOverlay = true, TimeZone = TimeZones.EAustraliaStandardTime, AccessRights = AccessRights.None)] public class ParabolicSAR : Indicator { [Parameter("Min AF", DefaultValue = 0.02, MinValue = 0)] public double minaf { get; set; } [Parameter("Max AF", DefaultValue = 0.2, MinValue = 0)] public double maxaf { get; set; } public API.Indicators.ParabolicSAR _parabolic { get; set; } [Output("PSAR", PlotType = PlotType.Points, Color = Colors.White, Thickness = 3)] public IndicatorDataSeries Result { get; set; } protected override void Initialize() { _parabolic = Indicators.ParabolicSAR(minaf, maxaf); } public override void Calculate(int index) { Result[index] = _parabolic.Result[index]; } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Oct 2017, 12:33
Hi hungtonydang,
Positions.FindAll() does not return null. It returns an array. See documentation here. Maybe it is better to hire a professional programmer to help you with this.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Oct 2017, 12:19
Hi amsman,
The reason you cannot build your indicator is that you define _parabolic twice and you do not use the correct type in your indicator declaration. See a corrected version below
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; namespace cAlgo { [Indicator(IsOverlay = false, TimeZone = TimeZones.EAustraliaStandardTime, AccessRights = AccessRights.None)] public class ParabolicSAR : Indicator { [Parameter("Min AF", DefaultValue = 0.02, MinValue = 0)] public double minaf { get; set; } [Parameter("Max AF", DefaultValue = 0.2, MinValue = 0)] public double maxaf { get; set; } [Output("PSAR", PlotType = PlotType.Points, Color = Colors.White, Thickness = 3)] public API.Indicators.ParabolicSAR _parabolic { get; set; } protected override void Initialize() { _parabolic = Indicators.ParabolicSAR(minaf, maxaf); } public override void Calculate(int index) { double parabolic = _parabolic.Result[index]; } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Oct 2017, 10:33
Hi dordkash@gmail.com,
Oil symbols are not available in the Spotware Demo application. If you want to see oil prices in cTrader, you could download cTrader from a broker that offers oil.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Oct 2017, 09:30
Hi dordkash@gmail.com,
Symbol names vary ber broker. It would be better to advise with your broker about the name of oil symbol in the broker's cTrader.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Oct 2017, 10:24
Hi mto1995,
You can access the cBot's time through the Time property.
/api/reference/internals/algo/time
Let me know if this is what you were looking for.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Oct 2017, 09:46
Hi phernandophelix,
These icons appear when you move your mouse on top of the chart. If you move your mouse away, they will disappear.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Oct 2017, 17:20
Hi Sonar Trades,
I am not aware of something but it should be a pretty simple cBot to be implemented. You could contact our Consultants for help or post a job in the Jobs section.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Oct 2017, 09:02
Hi gagan.josan420@gmail.com,
Thanks for your suggestion. In the meanwhile, you could try using this cBot /forum/calgo-reference-samples/11677. It implements training stop loss an has a TriggerWhenGaining parameter, which is what you need.
Best Regards,
Panagiotis
@PanagiotisCharalampous