
Topics
Replies
PanagiotisCharalampous
02 Oct 2020, 08:17
Hi herofus,
This change needs to take place in the indicator, not in the cBot. The code you have written makes no sense at all.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Oct 2020, 08:14
Hi Luca,
You can use a flag that will stop more positions from being placed until the conditions are reset again.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Oct 2020, 08:11
Hi firemyst,
You can use Open API to retrieve the symbol information.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
30 Sep 2020, 16:23
Hi Luca,
Please post this in the correct topic.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
30 Sep 2020, 15:59
Hi herofus,
This indicator does not expose this information. The information is stored in the following private variables
private IndicatorDataSeries _highZigZags;
private IndicatorDataSeries _lowZigZags;
You need to make them public and read the information from there.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
30 Sep 2020, 12:33
Hi herofus,
It would be helpful if you could share the zig zag indicator you are using.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
30 Sep 2020, 11:11
Hi xabbu,
You problem is here
IndicatorArea.DrawStaticText("Symbols", _text, VerticalAlignment.Top, HorizontalAlignment.Right, _color);
When the indicator is referenced, the indicator area is not initialized. You can fix it by adding this condition
if (IndicatorArea != null)
IndicatorArea.DrawStaticText("Symbols", _text, VerticalAlignment.Top, HorizontalAlignment.Right, _color);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
30 Sep 2020, 08:53
Hi Luca,
You can use the Bars collection.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
30 Sep 2020, 08:52
Hi Luca,
Use Bars.ClosePrices.Last(1)
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
30 Sep 2020, 08:48
Hi kebbo,
If I understood your intentions correctly, then the correct solution is the 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 Testbot : Robot
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { get; set; }
Bars EURUSD_m5;
Bars GBPUSD_m5;
Bars AUDUSD_m5;
DateTime EURUSD_LastOpenTime;
DateTime GBPUSD_LastOpenTime;
DateTime AUDUSD_LastOpenTime;
protected override void OnStart()
{
EURUSD_m5 = MarketData.GetBars(TimeFrame.Minute5, "EURUSD");
GBPUSD_m5 = MarketData.GetBars(TimeFrame.Minute5, "GBPUSD");
AUDUSD_m5 = MarketData.GetBars(TimeFrame.Minute5, "AUDUSD");
}
protected override void OnBar()
{
}
protected override void OnTick()
{
if (EURUSD_m5.OpenTimes.LastValue != EURUSD_LastOpenTime)
{
Print(EURUSD_m5.ClosePrices.Last(1));
EURUSD_LastOpenTime = EURUSD_m5.OpenTimes.LastValue;
}
if (GBPUSD_m5.OpenTimes.LastValue != GBPUSD_LastOpenTime)
{
Print(GBPUSD_m5.ClosePrices.Last(1));
GBPUSD_LastOpenTime = GBPUSD_m5.OpenTimes.LastValue;
}
if (AUDUSD_m5.OpenTimes.LastValue != AUDUSD_LastOpenTime)
{
Print(AUDUSD_m5.ClosePrices.Last(1));
AUDUSD_LastOpenTime = AUDUSD_m5.OpenTimes.LastValue;
}
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
29 Sep 2020, 10:13
Hi equantfx,
There is no way to set the built-in advanced take profit programmatically. However the drag and drop functionality can be programmed.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
29 Sep 2020, 08:51
Hi firemyst,
Not it hasn't. At the moment you set the commissions yourself, through the backtesting settings.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
29 Sep 2020, 08:25
( Updated at: 21 Dec 2023, 09:22 )
Hi ctid2568413,
I tried the indicator and worked fine for me
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
29 Sep 2020, 07:50
Hi Christian,
You do not seem to follow the instructions in the documentation. Here is the generator and here is the command
ProtoGen.exe protofile.proto -output_directory=C:\output_folder --include_imports
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 15:54
Hi markyandrew,
It's in our backlog for future updates but we have not finalized the version in which it will be included yet.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 09:50
Hi cdyett,
We do not have such a list at the moment. You can check our featured brokers and I am sure you will find a lot.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 09:35
Hi phaethon,
The only possible explanation would be that you had more than one instances open, maybe from different brokers as well, using the same workspace and the one closed last has overwritten the workspace saved by the other. Could that be the case?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 09:04
Hi kebbo,
It would be easier for us to help you if you posted the complete cBot code and explained how we can reproduce the problem. With the information I have, I can only suggest that you check for a change in the last bar's open time, to detect when the bar has changed.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
28 Sep 2020, 08:55
Hi Christian,
The procedure explains how to compile C# files. this is what I use as well and works fine.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Oct 2020, 08:24
Hi there,
You can try something like this to count the number of consecutive losses.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous