Topics
Replies
Spotware
17 Jul 2017, 10:58
This robot is intended to be used as a sample and does not guarantee any particular outcome or profit of any kind. Use it at your own risk.
// ------------------------------------------------------------------------------------------------- // // This robot is intended to be used as a sample and does not guarantee any particular outcome or // profit of any kind. Use it at your own risk // // The "Trailing Stop Loss Sample" Robot places a Buy or Sell Market order according to user input. // When the order is filled it implements trailing stop loss. // // ------------------------------------------------------------------------------------------------- using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class TrailingStopLossSample : Robot { [Parameter("Volume", DefaultValue = 1000)] public int Volume { get; set; } [Parameter("Buy")] public bool Buy { get; set; } [Parameter("Stop Loss", DefaultValue = 5)] public double StopLoss { get; set; } [Parameter("Trigger When Gaining", DefaultValue = 1)] public double TriggerWhenGaining { get; set; } [Parameter("Trailing Stop Loss Distance", DefaultValue = 1)] public double TrailingStopLossDistance { get; set; } private double _highestGain; private bool _isTrailing; protected override void OnStart() { //Execute a market order based on the direction parameter ExecuteMarketOrder(Buy ? TradeType.Buy : TradeType.Sell, Symbol, Volume, "SampleTrailing", StopLoss, null); //Set the position's highest gain in pips _highestGain = Positions[0].Pips; } protected override void OnTick() { var position = Positions.Find("SampleTrailing"); if (position == null) { Stop(); return; } //If the trigger is reached, the robot starts trailing if (!_isTrailing && position.Pips >= TriggerWhenGaining) { _isTrailing = true; } //If the cBot is trailing and the profit in pips is at the highest level, we need to readjust the stop loss if (_isTrailing && _highestGain < position.Pips) { //Based on the position's direction, we calculate the new stop loss price and we modify the position if (position.TradeType == TradeType.Buy) { var newSLprice = Symbol.Ask - (Symbol.PipSize * TrailingStopLossDistance); if (newSLprice > position.StopLoss) { ModifyPosition(position, newSLprice, null); } } else { var newSLprice = Symbol.Bid + (Symbol.PipSize * TrailingStopLossDistance); if (newSLprice < position.StopLoss) { ModifyPosition(position, newSLprice, null); } } //We reset the highest gain _highestGain = position.Pips; } } protected override void OnStop() { // Put your deinitialization logic here } } }
@Spotware
Spotware
17 Jul 2017, 10:13
Dear traders,
We plan to start working on officially supporting Visual Studio 2015 and 2017 soon. Until official support is released, you can use this workaround provided by the community /forum/calgo-support/8514 which exlpains how to update the .vsix file. We have tested it as well and it works fine on both VS2015 and VS2017.
Best Regards,
cTrader Team
@Spotware
Spotware
17 Jul 2017, 09:37
Dear trader,
A reply on this subject has been provided from Spotware in this thread /forum/ctrader-support/11620?page=1#5
Best Regards,
cTrader Team
@Spotware
Spotware
14 Jul 2017, 17:42
Dear traders,
Thanks for bringing this issue to our attention. We will be investigating this and work on improving the performace of cAlgo. In the meanwhile, any other information that would help us reproduce this behavior will be appreciated. We will keep you posted about this.
Best Regards,
cTrader Team
@Spotware
Spotware
14 Jul 2017, 15:58
( Updated at: 21 Dec 2023, 09:20 )
Dear vedatduz,
Thanks for your suggestions. Please be advised that we will add the horizontal line comment on a future release. We will also consider adding Risk to Reward ratio in the Create Order form. In the meanwhile, you can see information regarding risk when selecting Stop Loss. You can see your risk as an absolute amount as well as a percentage of your balance. You can also see information about reward when you check Take Profit. Again, you can see your reward as an absolute amount as well as a percentage of your balance. See screenshot below
Also you can see information about your risk when you mouse hover the Volume text box like the screenshot below
Best Regards,
cTrader Team
@Spotware
Spotware
14 Jul 2017, 13:01
Dear traders,
We would like to contribute to this conversation by sharing with you some preliminary plans that we have for cMirror. First of all we are planning to introduce a chat feature that will allow communication between strategy provider and followers. This way you will be able to communicate in private. Also we plan to improve the description editing tools and support videos. This will help strategy providers to explain better their strategies.
We also welcome any other suggestions that will improve communications between strategy providers and followers.
Best Regards,
cTrader Team
@Spotware
Spotware
14 Jul 2017, 12:39
Dear trader,
Thanks for your post. It is not clear if you refer to cTrader's built-in indicators or to a custom indicator developed by a community member. If the second case applies, it would be better to communicate with the developer directly or reference him to the post so that he can reply. If you are takling about a built-in indicator, please post some screenshots so we can investigate your problem.
Best Regards,
cTrader Team
@Spotware
Spotware
14 Jul 2017, 12:16
Hi xmforex9,
Thanks for providing additional information. Do you sign in with your cTID or your cTrader Account? Can you please give us the exact steps you are following and what the results are, so we can understand what do you mean when you say that nothing happens e.g. What happens after you fill the credentlans and press login? Do you see your cTID on the top right of the screen? Also, what browser are you using? Could we have some screenshots of what you see?
Best Regards,
cTrader Team
@Spotware
Spotware
14 Jul 2017, 11:37
Dear acrigney,
Many thanks for your nice words. We plan to start working on officially supporting Visual Studio 2015 and 2017 soon. Until official support is released, you can use this workaround provided by the community /forum/calgo-support/8514. We have tested it as well and it works fine.
Best Regards,
cTrader Team
@Spotware
Spotware
14 Jul 2017, 11:29
Dear Traders,
We have received many inquiries regarding US citizens being restricted from using our platform. Therefore, with this post we would like to address your questions and clarify why the situation is currently as is.
Spotware is a technology company and has no restrictions in offering its technology anywhere in the world. However, our technology is offered to you through brokers and not directly by us. As you all know, brokers and the services they offer are subject to regulations in different parts of the world. This is also the case in the United States, where very tight rules have been put in place surrounding the trading conditions that can be offered to retail investors. Most of these rules come from the Commodity Futures Trading Commision (CFTC) and the well known Dodd Frank Act.
Based on this regulatory environment, forex brokers that are not regulated in the United States are not allowed to offer their services to US citizens. Any such attempt would be considered fraudulent and legal action can be taken. In the past, offshore brokers that accepted or solicited US citizens as clients have been taken to the US courts. For this reason, even though Spotware are not directly liable for our clients actions, we do not want to be seen as a company that consented or enabled these brokers operate against clear guidelines.
Being a company that always puts Traders First, we want to make a clear statement to users for your protection, this is that our solution is not available to US citizens since, at present, none of the brokers offering cTrader is regulated in the United States. The restriction is not because the technology is prohibited or restricted in any way, but because there is no broker that can legitimately offer this service. As soon as a US regulated broker launches cTrader, we will inform you accordingly.
Best Regards,
cTrader Team
@Spotware
Spotware
13 Jul 2017, 17:32
Dear andi21,
Thanks for updating us about your conversation with your broker and their subsequent interaction with our support team. Indeed, it will be helpful for other traders to know possible issues that might be the reason for such messages.
Best Regards,
cTrader Team
@Spotware
Spotware
13 Jul 2017, 16:49
Dear cesareoruiz,
Thank you for bringing this to our attention.
We have investigated this issue thoroughly and it seems that is caused by a Safari bug. Please see the following references
https://discussions.apple.com/thread/7912678?start=0&tstart=0
Our engineers will monitor and if a workaround becomes available, we will resolve the problem. We will keep you posted.
Best Regards,
cTrader Team
@Spotware
Spotware
13 Jul 2017, 16:37
Dear trader,
There are a few different reasons that could cause tick volumes in cTrader and MT4 to be different e.g. the same broker's MT4 and cTrader receiving prices from a different price feed for their own business reason. However, in order for us to investigate this and clarify further, we will need to have additional information like the broker, the symbol, the timeframe and the time period (from/to) that this happened. Please send us some screenshots if possible.
Best Regards,
cTrader Team
@Spotware
Spotware
13 Jul 2017, 12:19
Hi xmforex9,
It is good to hear that your problem has been resolved. Redarding price alerts, they are availabe to demo accounts as well. Can you explain a little bit more what do you mean that you cannot sign in? Do you experience a problem during signing in?
Best Regards,
cTrader Team
@Spotware
Spotware
13 Jul 2017, 11:07
Feature was removed
Hello derek9639,
We are sorry to inform you that this feature was removed. We have been optimizing cMirror a lot recently, we have done a great job, however, during the process we did in fact remove this feature as part of the performance improvements.
Sorry for any confusion or inconvenience.
Regards,
cTrader Team
@Spotware
Spotware
17 Jul 2017, 11:18 ( Updated at: 21 Dec 2023, 09:20 )
Dear mjoosten97,
Thanks for your question. If you select the Fibonacci Retracement on your chart and right click. you will get a form that allows you to select which levels should be visible and which not.
Best Regards,
cTrader Team
@Spotware