Topics
Forum Topics not found
Replies
cAlgo_Fanatic
11 Jun 2013, 12:31
You can implement this with the ChartObjects.DrawLine methods.
See more examples here.
@cAlgo_Fanatic
cAlgo_Fanatic
11 Jun 2013, 12:10
The cAlgo.API.dll may be referenced within your Vistual Studio solution. It is located in the same folder as the cAlgo.exe file.
See also: /forum/cbot-support/211
@cAlgo_Fanatic
cAlgo_Fanatic
11 Jun 2013, 11:49
Access to historical orders will be added in the future. Thank you for your feedback.
@cAlgo_Fanatic
cAlgo_Fanatic
07 Jun 2013, 15:27
In the OnTick event use this instead:
if(Trade.IsExecuting) return;
So, if you set a bool field (global scope) to true on the OnPositionClosed event and in the OnTick event within your other conditional statements where you open a trade check this field as well? The field would also need to be reset to false somewhere depending on the logic.
I'm not quite sure if I understand the full logic here to be able to say that this is indeed your solution.
If you do not want to share the logic on the forum please send an email to engage@spotware.com with more details or code.
@cAlgo_Fanatic
cAlgo_Fanatic
07 Jun 2013, 14:18
If you create a new trade in the OnPositionClosed event wouldn't that serve the purpose?
@cAlgo_Fanatic
cAlgo_Fanatic
07 Jun 2013, 12:54
You may like to look at the samples included in the cAlgo platform (Sample Trailing, Sample Buy Trailing, Sample Sell Trailing) for Trailing Stop which increase the Stop Loss to learn how to code this and modify your robot. You can give it a try and if it does not work post your code so that we can correct it if it does not work as intended.
Also, please clarify this statement:
"Please valuation prepared by costs"
@cAlgo_Fanatic
cAlgo_Fanatic
07 Jun 2013, 12:42
You already modified it earlier when you changed the filename :). Just copy the indicator (so you always have the original).
Try to modify the code according to the earlier post which explains how to make the filename an input parameter.
Once again:
Add this code:
[Parameter(DefaultValue = "filename.wav")] public string Filename { get; set; }
The above should be added outside of any method, e.g. where the other [Parameter] attributes are, for instance right before this:
[Parameter()] public double Price { get; set; }
Then just like you modified to use a different filename
Notifications.PlaySound(Path.Combine(windowsFolder, "Media", "kereslek.wav"));
Do the same but instead of "kereslek.wav" type Filename (without any quotes, Filename is a variable name)
So it should look like this:
Notifications.PlaySound(Path.Combine(windowsFolder, "Media", Filename));
Then when you add an instance you can provide the filename (which should be within the Media folder).
To start learning c# visit the following sites:
http://www.csharp-station.com/Tutorial.aspx
http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx
@cAlgo_Fanatic
cAlgo_Fanatic
07 Jun 2013, 12:27
Unfortunately we cannot provide estimates for new features.
@cAlgo_Fanatic
cAlgo_Fanatic
07 Jun 2013, 11:39
You probably need to modify your code to this:
foreach(var position in Account.Positions) { if (position.NetProfit <= -20) { Trade.Close(position); } }
in the foreach loop you are looping through each open position in the account and refering to it with the variable name "position" (bold).
So, using another method ClosePosition(), you would have to pass this variable as a parameter like so:
ClosePosition(position);
In order to refer to the same variable which to close. Otherwise, you will be closing which position? In the ClosePosition() method you are probably refering to another global field which you gave the same name to (position).
You may want to change the name of the variables so that you can differentiate between them, i.e. latestPosition, pos, etc. You may give them any name for as long as it is not a c# or cAlgo reserved identifier.
Read more on c#.
@cAlgo_Fanatic
cAlgo_Fanatic
07 Jun 2013, 11:14
Multi time and multi currency frames will be implemented in the future. You may however access other currency prices and volumes via the MarketDepth.
@cAlgo_Fanatic
cAlgo_Fanatic
06 Jun 2013, 13:01
Thank you for the suggestion. We will consider adding the functionality to make the samples optional.
@cAlgo_Fanatic
cAlgo_Fanatic
05 Jun 2013, 14:33
The indicator has been tested and does play the sound. Are you adding a price level in the input parameters? If so, please send us all the parameters you are using with it so that we can test it again. Also, please make sure your speakers are working properly and the platform sound is ON.
In order to modify the code so that you can add the filename as an input parameter add the following code:
// ... const Colors BidColor = Colors.Red; // Add New Input Variable "Filename" [Parameter(DefaultValue = "tada.wav")] public string Filename { get; set; } [Parameter()] public double Price { get; set; } // ...
and modify the code that plays the soundfile to this:
Notifications.PlaySound(Path.Combine(windowsFolder, "Media", Filename));
@cAlgo_Fanatic
cAlgo_Fanatic
05 Jun 2013, 10:42
Can you please send us your code to engage@spotware.com.
@cAlgo_Fanatic
cAlgo_Fanatic
05 Jun 2013, 10:11
It uses the windows file tada.wav which is located in the C:\Windows\Media folder. You can try increasing the volume or changing to any of the other files within this folder, since the sound of this file is very subtle.
If you need help with the code let us know.
We do have price alarms in our future plans.
@cAlgo_Fanatic
cAlgo_Fanatic
05 Jun 2013, 09:53
Start by changing the lines where you are adding to the index to subtract instead and see if this is the desired outcome of the indicator like so:
double dblSum = MarketSeries.Close[ index - 1] * 21; //... dblSum += MarketSeries.Close[index - 1 - jnx] * knx; //... double atr = _averageTrueRange.Result[index - 10] / 10;
@cAlgo_Fanatic
cAlgo_Fanatic
04 Jun 2013, 18:09
In the Calculate method index is the last index of the series at the moment. Therefore any value such as:
MarketSeries.Close[index + 1 + jnx ]
does not exist yet.
You want to calculate backwards by subtracting from the last index instead of adding.
@cAlgo_Fanatic
cAlgo_Fanatic
04 Jun 2013, 17:47
We are buiding a new section for jobs where you will be able to post your requests for development of robots and indicators. Please stay tuned.
@cAlgo_Fanatic
cAlgo_Fanatic
04 Jun 2013, 17:03
Maybe you can provide an algorithm or some definition for this breakeven robot.
@cAlgo_Fanatic
cAlgo_Fanatic
04 Jun 2013, 17:02
We are just developing Spotware Connect. It will appear in the future.
@cAlgo_Fanatic
cAlgo_Fanatic
11 Jun 2013, 16:17
If you want to give it a try we will help you with any coding errors that you might have.
@cAlgo_Fanatic