Topics
Replies
ClickAlgo
24 Nov 2015, 21:59
Do you mean you set a price and over a 52 week period how many trades with the parameters you gave were successfull?
@ClickAlgo
ClickAlgo
24 Nov 2015, 21:56
Hi,
What would be the time for each calculation, 1 per hour? every tick? what is your entry point. You may as well create a cBot that trades with the parameters you gave and back-test it with cAlgo to display the results which will give you all the calculations you need.
If I do not understand your question, maybe you can explain in more detail.
Paul
@ClickAlgo
ClickAlgo
21 Nov 2015, 07:18
RE:
// sorry i put too many parenthesis in there, this is a better example positionExists = Positions.Where(x => x.Comment == order.comment).Count() > 0 ? true : false; positionExists = PendingOrders.Where(x => x.Comment == order.comment).Count() > 0 ? true : false; positionExists = History.Where(x => x.Comment == order.comment).Count() > 0 ? true : false;
@ClickAlgo
ClickAlgo
21 Nov 2015, 07:14
Hi,
Use a Boolean operator and name it to something meaningful like positionExists, than before you do your for-each loops set it to false, replace allowtrade with positionExists = true
This will assume no position exists from the start and anyone of your conditions will set it to true.
Investigate LINQ and LAMDA expressions for cleaner and more powerful coding, all the for-each loops could be replaced with 3 lines of code:-
positionsExist = Positions.Where(x => (x.Comment == order.comment)).Count() > 0 ? true : false; positionsExist = PendingOrders.Where(x => (x.Comment == order.comment)).Count() > 0 ? true : false; positionsExist = History.Where(x => (x.Comment == order.comment)).Count() > 0 ? true : false;
Paul.
@ClickAlgo
ClickAlgo
20 Nov 2015, 17:20
I have a web interface where I can access on any device's web browser showing the status of my robots running on a VPS. I can then pause, stop or re-start them from a smart phone, tablet or desktop.
You can implement a simpler solution by storing the state of the robot somewhere on the local machine and reading this state from your robots.
In the future I maybe Spotware will build this functionality into the platform so that non-programmers have more control, but it may need a 3rd party plug-in to be used until they do.
Is there only a few people interested in this feature or is there many?
@ClickAlgo
ClickAlgo
17 Nov 2015, 08:04
Press F10 to step through the code and F11 for method calls, you will work it out.
@ClickAlgo
ClickAlgo
17 Nov 2015, 07:59
( Updated at: 21 Dec 2023, 09:20 )
Hi Sim,
If you want to fix this easy and future projects then I would advise that you download Visual Studio 2013 Community Edition from here, make sure you use 2013 and not 2015
https://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx
Then from cAlgo right click your robot and choose edit with visual studio, when it opens visual studio put a break point in the OnStart method as shown below:-
Then build the project from Visual Studio, when it has built, choose from the drop-down Tools->Attach to process, as shown below:-
When you have attached the process you can now run the robot from cAlgo the code running will stop at your break-point and allow you to step through the code and debug it line by line, if you hover your mouse over variables you will see the values they contain, you should be able to easily identify your problem this way.
read more about debugging with Visual Studio here:-
https://www.visualstudio.com/en-us/get-started/code/debug-your-app-vs
It is better you learn this now to save you a lot of time later trying to work out why your robot is not working.
good luck.
Paul.
@ClickAlgo
ClickAlgo
05 Nov 2015, 13:07
( Updated at: 21 Dec 2023, 09:20 )
when you look at the references in your project do you see the following assembly cAlgo.API?
@ClickAlgo
ClickAlgo
05 Nov 2015, 08:03
Hi,
That is strange as I use VS 2013 all the time with cAlgo, What I would do to help Spotware investigate your problem is supply more information:-
- What operating system are you using and the version
- What version of Visual Studio are you using
- What version of cAlgo are you using and which broker
- Have you ever had integration with Visual Studio
- Have you ever had it working before or is this the first time you are attempting to use VS with cAlgo
Paul.
@ClickAlgo
ClickAlgo
06 Oct 2015, 21:20
To reference custom indicators on ctdn look at this:-
The link below shows an example of how to use the generic in-built indicators in cAlgo.
/forum/calgo-reference-samples/56
@ClickAlgo
ClickAlgo
02 Oct 2015, 21:02
How often does your server go down?
A VPS should have a good track record of up-time, most are 99.5% on an annual basis, if it ever does go down, which would be rare, you can get notified via SMS.
If you not using a Cloud Server for your automated trading and your using real money then I would highly recommend you start using one.
@ClickAlgo
ClickAlgo
29 Sep 2015, 22:25
Hey no worries, I hope you get it sorted, if this doesn't help then maybe the OnCalculate() method doesn't get called every second..
http://stackoverflow.com/questions/16032451/get-datetime-now-with-milliseconds-precision
@ClickAlgo
ClickAlgo
29 Sep 2015, 11:09
( Updated at: 21 Dec 2023, 09:20 )
I forgot to mention, you do not need to write the GUI (presentation) code, just create your form with the controls and open the Form.Designer.cs file and copy and paste into your Indicator, you can can then create nice and clean complex forms in a very short time.
@ClickAlgo
ClickAlgo
29 Sep 2015, 09:56
Also look at the TimeSpan object.
http://stackoverflow.com/questions/12521366/getting-time-span-between-two-times-in-c
@ClickAlgo
ClickAlgo
29 Sep 2015, 08:53
Take a closer look at the Market Clock indicator for date time comparisons, you may be missing something, if you still stuck post a snippet of your code here, we need to see code to help you.
@ClickAlgo
ClickAlgo
28 Sep 2015, 22:05
Hi Stevie,
Just a quick response as I am busy.
Try and update the chart text using OnTick and not OnBar
Read more about it here http://help.spotware.com/calgo/cbots/onbar-vs-ontick
To compare dates; look at:
DateTime dt1 = DateTime.Parse("07/12/2011"); DateTime dt2 = DateTime.Now; if(dt1.Date > dt2.Date) { //It's a later date } else { //It's an earlier or equal date }
@ClickAlgo
ClickAlgo
28 Sep 2015, 14:34
Just with a quick look you have removed: an IndicatorDataSeries
private IndicatorDataSeries _filt; private IndicatorDataSeries _wn; private IndicatorDataSeries _pk; private double a1; private double b1; private double c1; private double c2; private double c3;
I would put the original code back and start again or let us know what the exact problem is.
@ClickAlgo
ClickAlgo
30 Nov 2015, 15:43
take a look here, see if it helps.
/forum/whats-new/1463
@ClickAlgo