
Topics
Replies
PanagiotisCharalampous
16 Jun 2020, 17:00
Hi paymanz,
Developers can name custom indicators as they wish so there is always the possibility to have the same name for different indicators.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 16:48
Hi paymanz,
The indicator is installed with the name VWAP and this is how it appears in the search results
It seems fine to me.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 15:14
Hi Adam,
Can you provide more information about this issue like cBot source code and steps to reproduce it?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 14:18
Hi ericsson,
You can send me the cBot with source code and the csv file at community@spotware.com and we will have a look.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 14:13
Hi TakeProfit.
See an example below on how you can subscribe to ticks and bar changes from Bar collections coming from other symbols and timeframes
using System;
using System.Linq;
using System.Text;
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 MultisymbolBacktesting : Robot
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { get; set; }
public Symbol[] MySymbols;
protected override void OnStart()
{
// We get a symbol array for the following for symbols
MySymbols = Symbols.GetSymbols("EURUSD", "GBPUSD", "USDJPY", "USDCHF");
// We subscribe to the tick event for each symbol
foreach (var symbol in MySymbols)
{
symbol.Tick += Symbol_Tick;
}
// We subscribe to the bar event for each symbol for the current timeframe
foreach (var symbol in MySymbols)
{
var bars = MarketData.GetBars(TimeFrame, symbol.Name);
bars.BarOpened += Bars_BarOpened;
}
}
private void Bars_BarOpened(BarOpenedEventArgs obj)
{
// When a bar opens we check the previous bar. If the bar is bullish, we send a buy order, else we send a sell order.
if (obj.Bars.Last(1).Close > obj.Bars.Last(1).Open)
{
ExecuteMarketOrder(TradeType.Buy, obj.Bars.SymbolName, 1000, "", 2, 2);
}
else
{
ExecuteMarketOrder(TradeType.Sell, obj.Bars.SymbolName, 1000, "", 2, 2);
}
}
private void Symbol_Tick(SymbolTickEventArgs obj)
{
// On each symbol tick, we print the symbol's bid/ask prices on the chart
var sb = new StringBuilder();
foreach (var symbol in MySymbols)
{
var textLine = string.Format("{0} {1} {2}", symbol.Name, symbol.Bid, symbol.Ask);
sb.AppendLine(textLine);
}
Chart.DrawStaticText("symbols", sb.ToString(), VerticalAlignment.Top, HorizontalAlignment.Left, Chart.ColorSettings.ForegroundColor);
}
protected override void OnTick()
{
// Put your core logic here
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 14:09
Hi paymanz,
I cannot reproduce such a behavior. Any chance you can record a video demonstrating this?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 12:54
Hi paymanz,
Can you provide more information about this issue like exact steps to reproduce it?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 10:07
Hi Yuval,
We do not plan to change this behavior at the moment. The points you raised will not be solved if we load the bars instead of you. It will still take time to load and you will still need to recalculate as you don't know at which point the reconnection takes place and how many bars were missed in the meanwhile.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 09:59
Hi Yuval,
Market orders are not pending. They are sent immediately to the LP. The time gets to be filled is measured in ms.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 09:57
Hi olddirtypipster,
It seems you have a space in tag 56. Can you remove it and try again?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 09:52
Hi Yuval,
You can subscribe to the Bars.Reloaded event.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 09:48
Hi applez,
Can we arrange a TeamViewer session so that our QA team checks this on your computer? If yes, then please email me at community@spotware.com to arrange this.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 09:46
Hi Yuval,
Yes we did. This can happen when cTrader is disconnected and reconnected. In this case Bars are reloaded. You will need to write some code to anticipate for such cases and load more bars if necessary.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 08:44
Hi olddirtypipster,
Can you still reproduce this issue or was it something temporary? If yes, can you confirm that your credentials are correct?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 08:37
Hi dynamites,
Please send us some troubleshooting information (Tap seven times on the application logo inside the main menu) the next time this happens.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 08:35
Hi Al1nuX,
You can post your suggestion in the Suggestions section. In the meanwhile, you can consider disabling Single-Tap option in Settings > Quick Trade to avoid such issues.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 08:30
Hi tgjobscv,
We cannot reproduce such a behavior. To investigate further please provide the information we requested above.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 08:28
Hi pvandenberg99,
This usually happens when your strategy provider account receives a deposit or makes a withdrawal. In this case your positions are readjusted to the new equity to equity ratio.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Jun 2020, 08:26
Hi Yuval,
No it cannot.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Jun 2020, 08:39
Hi MZen,
No that project is not necessary. I removed it from there.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous