
Topics
Replies
PanagiotisCharalampous
13 Feb 2020, 08:45
Hi,
You need to replace this line of code
ExecuteMarketOrder(type, this.Symbol, volume, InstanceName, StopLoss, null, marketRangePips, Comment);
with
ExecuteMarketRangeOrder(type, this.Symbol.Name, volume, marketRangePips, Symbol.Bid, InstanceName, StopLoss, null, Comment);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Feb 2020, 08:40
Hi Vladimiros,
It seems I did not read your question well :) There is no built in function for this, you will need to write it yourself. Here is an example for finding the index for the maximum
private int IndexOfMax(DataSeries series, int noOfBars)
{
double maximum = series[0];
int maxIndex = 0;
for (int i = 1; i < noOfBars; i++)
{
if (series[i] > maximum)
{
maximum = series[i];
maxIndex = i;
}
}
return maxIndex;
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Feb 2020, 08:30
Hi royj1995,
See an example using two SMAs below
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Cloud("Fast MA", "Slow MA", FirstColor = "Aqua", Opacity = 0.5, SecondColor = "Red")]
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class CloudExample : Indicator
{
[Parameter("Fast MA Period", DefaultValue = 21)]
public int FastMaPeriod { get; set; }
[Parameter("Slow MA Period", DefaultValue = 50)]
public int SlowMaPeriod { get; set; }
[Output("Fast MA", LineColor = "#FF6666")]
public IndicatorDataSeries FastMaResult { get; set; }
[Output("Slow MA", LineColor = "#0071C1")]
public IndicatorDataSeries SlowMaResult { get; set; }
SimpleMovingAverage FastMa;
SimpleMovingAverage SlowMa;
protected override void Initialize()
{
FastMa = Indicators.SimpleMovingAverage(Bars.ClosePrices, FastMaPeriod);
SlowMa = Indicators.SimpleMovingAverage(Bars.ClosePrices, SlowMaPeriod);
}
public override void Calculate(int index)
{
FastMaResult[index] = FastMa.Result[index];
SlowMaResult[index] = SlowMa.Result[index];
}
}
}
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Feb 2020, 08:24
Hi Ivan,
We have restored this option in Spotware cTrader Beta. It will be pushed to brokers soon.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Feb 2020, 08:19
Hi TzvetomirTerziysky,
I tried the source code you provided in this thread and seems to be working fine. Can you please confirm that you are using Spotware cTrader Beta? If yes, can you please provide the source code that causes the problem?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Feb 2020, 16:48
Hi Takis,
Just use the code you posted and enable/disable your network adapter. You should see the events registering in the log.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Feb 2020, 16:17
Hi Takis,
Your code works fine for me. How do you test it?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Feb 2020, 14:56
Hi Nobody,
You should have received the hotfix by now. Please let us know if it has resolved the issue.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Feb 2020, 14:41
Hi vladimiroskyrkimtzis
Try Minimum and Maximum functions. See below an example
Bars.HighPrices.Maximum(100);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Feb 2020, 08:46
Hi Vipin,
The StopTriggerMethod is for stop losses so it will have no effect when a stop loss is not set. Can you tell me which documentation part led you to this conclusion?
and open a new order when the direction of the movement changes
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Feb 2020, 08:34
Hi Alistair,
Please send me clientID, clientSecret and a valid token at community@spotware.com and I will have a look at what is going on.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Feb 2020, 08:31
Hi lithast,
The hotfix should be released on Beta sometime this week.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Feb 2020, 08:30
Hi Rob,
Thanks for your suggestion, Please note that suggestions should be posted in the Suggestions section of the forum.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Feb 2020, 16:58
Hi Nobody,
We will release a hotfix for this issue soon.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Feb 2020, 16:50
Hi emiogbolu,
If it has a Spotware logo then it is probably not your broker's cTrader. You can check which cTrader you use by checking the title of your cTrader application . Please contact your broker for the correct link for their cTrader installation file.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Feb 2020, 16:37
Hi emiogbolu,
Please make sure you are using your broker's cTrader. If you still cannot see your trading account, contact your broker directly.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Feb 2020, 15:08
Hi Takis,
Weird, here is what I do and it behaves differently. I will continue trying to reproduce this.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Feb 2020, 14:19
Hi Takis,
I am still missing something
Double click on the file name and change it.
Which filename? I renamed a cBot in Automate but the instance is not removed.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
11 Feb 2020, 13:59
Hi Takis,
Renaming a running robot correctly removes it's instance
I could not reproduce this. Can you provide exact steps? Where does it happen? In Trade or Automate?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Feb 2020, 08:46
Hi Mparama,
We have released a hotfix on Spotware Beta. Can you please check?
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous