Topics
Replies
Spotware
27 Jul 2015, 00:47
Dear Trader,
Could you please set your own time zone, by changing the User Time Offset at the bottom right of the platform?
Additionally we invite you to take a look at our cTrader support site.
@Spotware
Spotware
24 Jul 2015, 12:56
Dear Trader,
First you have to get the MarketSeries of the symbol and timeframe of your choice.
Then you will have to get the index of the bar that was build around the time you want to to find the open price.
Once you get the index of the Bar you will be able to retrieve the OpenPrice of that Bar.
The following code snippet illustrates it:
MarketSeries marketserie = MarketData.GetSeries(TimeFrame); int index = marketserie.OpenTime.GetIndexByTime(DateTime.Parse("24-Jul-15 03:20AM")); double openprice = marketserie.Open[index];
@Spotware
Spotware
24 Jul 2015, 12:19
Dear Trader,
When you execute a market order, place a limit/stop order you are able to insert a label and/or a comment.
Currently we do not provide users the ability to edit their comments/labels we will consider providing it in the future.
Additionally you can vote for it in:
@Spotware
Spotware
23 Jul 2015, 10:58
Dear Trader,
Thank you for your suggestion. We will consider it. Additionally you can vote for it in: http://vote.spotware.com/forums/229166-ideas-and-suggestions-for-ctrader-and-calgo/suggestions/5531167-spread-displayed-on-pairs-list-on-left-side
@Spotware
Spotware
22 Jul 2015, 11:06
Dear Trader,
Please take a look at the following article regarding NullReferenceExceptions: https://msdn.microsoft.com/en-us/library/system.nullreferenceexception(v=vs.110).aspx
Please note that we do not provide coding assistance services. We more than glad to assist you with specific questions about cAlgo.API. You also can contact one of our Partners or post a job in Development Jobs section for further coding assistance.
@Spotware
Spotware
21 Jul 2015, 17:33
Dear Trader,
Please take a look at the following indicator: /algos/indicators/show/253 and at the GetIndexByExactTime reference.
We hope this helps you.
@Spotware
Spotware
21 Jul 2015, 15:54
Dear Trader,
Please take a look at the following link: http://help.spotware.com/calgo/visual-studio/debug-cbots
@Spotware
Spotware
21 Jul 2015, 15:42
Dear Trader,
Sell positions are closing by the ask price and the charts are drawn based on the bid price.
We recommend you to enable the deal map in the chart options and clear your backtesting cache which is located in the following path:
C:\Users\%UserName%\AppData\Roaming\%Broker Name%\cAlgo\BacktestingCache
@Spotware
Spotware
21 Jul 2015, 14:04
( Updated at: 21 Dec 2023, 09:20 )
Dear Trader,
Regarding the code that you also send to troubleshooting@spotware.com.
In this code snippet you have some conditions to call the method PingPongExit() in the OnTick()
When you backtest, your cBot opens the position and in a certain period through the first PingPongExit(); shown in the picture below.
Within the PingPongExit() method you initialize variables based on the first position. Then you do some calculations and then you close all positions using the CloseAllPositionsThisBotAndSymbol() method if your if statement is valid, which is in your case. This method closes all positions and then it updates the “allPositions” array. So allPositions array contains null positions.
Then your code reaches to the third PingPongExit() method.
You try to access the allPositions[0], which is null.That's why you get the exception:
Crashed in OnTick with IndexOutOfRangeException: Index was outside the bounds of the array.
Please note that we do not provide coding assistance services. We more than glad to assist you with specific questions about cAlgo.API. You also can contact one of our Partners or post a job in Development Jobs section for further coding assistance.
@Spotware
Spotware
21 Jul 2015, 11:27
Dear Trader,
The TimeFrame object does not contain a TryParse(...) method.
MarketData.GetSeries(...) gets the MarketSeries of market data for the symbol and timeframe.
If we understand correctly you are trying to create a DataSeries using your own data from a database. We recommend you to take a look at the following articles: cAlgo and MySQL thread, at the IndicatorDataSeries reference and at Why is DataSeries read only? thread to get an idea how to create your own DataSeries.
Please note that we do not provide coding assistance services. We more than glad to assist you with specific questions about cAlgo.API. You also can contact one of our Partners or post a job in Development Jobs section for further coding assistance.
@Spotware
Spotware
21 Jul 2015, 10:15
Dear Trader,
Please take a look at the following thread: /forum/calgo-support/4767
@Spotware
Spotware
20 Jul 2015, 06:30
Dear Trader,
Thank you for your suggestion. We will consider it. Additionally you can post your ideas/suggestions to http://vote.spotware.com/
@Spotware
Spotware
20 Jul 2015, 05:40
Dear Trader,
Currently we do not provide users the ability to set pending orders to automatically cancel if one other pending order gets triggered. We will consider providing such ability in the future.
We also would like to invite you to take a look at our tutorials to learn about the exciting features of cTrader.
@Spotware
Spotware
20 Jul 2015, 04:55
Dear Trader,
You cannot divide 2 indicators with each other in the way you described in your post.
You need to access the value of an indicator using the index at a certain period. The following example illustrates a division between two indicators.
protected override void Initialize() { sma = Indicators.GetIndicator<SampleSMA>(Source, 10); sma2 = Indicators.GetIndicator<SampleSMA>(Source, 15); } public override void Calculate(int index) { refSMA[index] = sma.Result[index] / sma2.Result[index]; }
Additionally please take a look at the following link: /api/guides/indicators
We hope this helps you.
@Spotware
Spotware
20 Jul 2015, 04:20
Dear Trader,
You could write two objects and use the “\n” new line in the text to move the second Object down to a separate line so that it does not overlap the first. The following code snippet illustrates it:
ChartObjects.DrawText("text1", "TEXT", StaticPosition.TopRight, Colors.Yellow); ChartObjects.DrawText("text2", "\nTEXT", StaticPosition.TopRight, Colors.Yellow);
We hope this helps you.
@Spotware
Spotware
27 Jul 2015, 06:09
Dear Trader,
Could you please refresh your charts and send us a full screenshot?
@Spotware