
Topics
Replies
PanagiotisCharalampous
12 Jun 2019, 15:00
Ηι diegorcirelli,
If you run the cBot as is, it will not do anything as there are no open positions in the first place. When the cBot starts, from which position do you expect it to measure the distance since there is none open?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Jun 2019, 14:36
Hi diegorcirelli,
Can you provide enough information to reproduce what you are seeing? We need
- The full cBot code
- Backtesting parameters
- Date and time where you would expect the trade to happed but does not.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Jun 2019, 10:26
RE:
diegorcirelli said:
Good evening ... now a little developed this code, but also did not work, could you help me ??
protected override void OnTick() { var highestPriceBuy = Positions.FindAll(Label, Symbol, TradeType.Buy).Max(x => x.EntryPrice); if (highestPriceBuy + Pips <= Symbol.Bid) ExecuteMarketOrder(TradeType.Buy, Symbol, Vol, Label, SL, TP); }
Hi diegorcirelli,
I do not see any problem in this code. Can you please explain to us why you think it is not working? What do you expect it to do and what does it do instead?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Jun 2019, 09:35
Hi bitmext,
Thanks for posting in our forum and for your nice feedback about the platform. There is no feature in the interface that would allow you to do so but you can achieve this by running a simple cBot. See the source code 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 ReversePositions : Robot { protected override void OnStart() { foreach (var position in Positions) position.Reverse(); Stop(); } protected override void OnTick() { // Put your core logic here } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Jun 2019, 09:28
Hi zedodia,
Probably you are not passing the correct parameters to one of the indicators? Which is the VWAP indicator you are using?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2019, 09:49
Hi martin100181@gmail.com,
Thanks for posting in our forum. See below
var targetPrice = PendingOrders.First(x => x.Label == "Long_1").TargetPrice;
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2019, 09:42
Hi David,
You can always contact a Consultant to help you with your cBot.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2019, 09:40
Hi mo798ua,
Thanks for posting in our forum. The highlighed value is the distance from the entry price not from the spot price. Therefore it will not be constant.
Best Regards,
@PanagiotisCharalampous
PanagiotisCharalampous
11 Jun 2019, 09:24
Hi diegorcirelli,
What is not working?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2019, 14:38
Hi PureForm,
Any chance we can get the cBot code and your optimization parameters so that we can have a look?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2019, 10:32
Hi Astroke,
This is not a bug, this is how it was always working. However our product team can consider a setting for this behavior.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2019, 10:28
Hi PureForm,
From what I can see the specific set of parameters have a high Sortino Ratio. I assume that is the reason you have a high fitness value as well. Can you remove it from the criteria and try again?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2019, 10:22
Hi Gareth,
Thanks for your nice feedback. The step size for each symbol is a decision made by the broker, not by us.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2019, 10:21
Hi Matt,
This property tells you how many bars are on the chart. You cannot use it to dictate which bars will be shown.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2019, 10:11
Hi GoldnOil750,
To resolve point 2, just close all cTrader instances, go to Documents\cAlgo\API, delete the contects and reload cTrader v3.3 and rebuild your cBot.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 Jun 2019, 10:08
Hi aboukerker,
You should contact myfxbook.com regarding this issue.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Jun 2019, 12:53
Hi cysecsbin.01,
The displayed time is the candle's opening time which at each case is Thursday at 23:00. The closing time is Friday 23:00 and no new candle is created on Friday. This is why you think the candle is missing.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Jun 2019, 11:34
Hi gastaodm,
This is by design. Chart linking does not work when cBots are running on a chart since in this case you cannot change the chart's symbol and timeframe.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 Jun 2019, 10:07
Hi enrikeyo,
Thanks for posting in our forum. The reason you get this behavior is because the indices do not match. Here is the correct way to do it.
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; using System.Collections.Generic; namespace cAlgo { [Indicator(TimeZone = TimeZones.UTC, AutoRescale = false, AccessRights = AccessRights.None)] public class Incidencia : Indicator { [Output("Resultado", Color = Colors.Crimson, PlotType = PlotType.Line)] public IndicatorDataSeries Resultado { get; set; } private MarketSeries marketSeriesXAUUSD; protected override void Initialize() { // Serie del XAUUSD this.marketSeriesXAUUSD = MarketData.GetSeries(MarketData.GetSymbol("XAUUSD"), MarketSeries.TimeFrame); Print("Inicializado "); } public override void Calculate(int index) { // Print(this.marketSeriesXAUUSD.SymbolCode); Resultado[index] = this.marketSeriesXAUUSD.Close[marketSeriesXAUUSD.OpenTime.GetIndexByTime(MarketSeries.OpenTime[index])]; } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Jun 2019, 15:16
Hi diegorcirelli,
Here is an attempt to guess what you are trying to do
Best Regards,
Panagiotis
@PanagiotisCharalampous