Topics
Replies
PanagiotisCharalampous
22 Oct 2018, 14:18
Ok, in this case you could consider using the comments. You can type a comment during order creation and then read it from the code and act accordingly
@PanagiotisCharalampous
PanagiotisCharalampous
22 Oct 2018, 11:19
Hi Sasha,
OrderBy will not sort the original list/dictionary. It will return a new sorted instance.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Oct 2018, 11:16
Hi Sasha,
You mean that your cBot should pick up on managing the order/position?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Oct 2018, 11:12
( Updated at: 23 Jan 2024, 13:16 )
Hi deanblackfx,
Thanks for posting in our forum. Please find below the answers to your questions.
1. No, the entire copying process is taking place on our servers.
2. Performance fee (if it is set by the provider) are calculated based on profits of copied trades. Non copied trades are not considered. You can find more information here.
3. No, we do not have such plans.
4. Since cTrader Copy is an Equity to Equity model, there will not be such an option.
5. There is already an Equity Spot Loss feature. See more information [here].
6. cTrader Copy service offers strategies from various brokers. If you wish to white label cTrader Copy service and control which strategies will be provided in your service, then you should contact our sales department for more information about the available options.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Oct 2018, 10:38
Hi Sasha,
You can use the following tools
1. Dictionary. Add your entries as values and your index as keys.
2, Sort function. Sort your dictionary using the keys.
3. Take function. Take the top x entries of the sorted dictionary.
Let me know if the above helps.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Oct 2018, 10:28
Hi Sasha,
No there aren't such collections available.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Oct 2018, 10:25
Hi Sasha,
If you mean to execute an order manually while the cBot is running then yes, this is possible.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Oct 2018, 15:19
Hi freemangreat,
The Chart object is available in Spotware cTrader Beta 3.3. It will be rolled out to brokers soon.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Oct 2018, 14:41
Hi freemangreat,
Thanks, use the code below
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; namespace cAlgo { [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class Test : Indicator { [Parameter(DefaultValue = 0.0)] public double Parameter { get; set; } [Output("Main")] public IndicatorDataSeries Result { get; set; } protected override void Initialize() { // Initialize and create nested indicators } public override void Calculate(int index) { ChartObjects.DrawHorizontalLine("Test", Symbol.Bid, Colors.AliceBlue); } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Oct 2018, 14:18
Hi nh.zadeh,
See below
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; namespace cAlgo.Indicators { [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC)] public class NasserMFT : Indicator { [Parameter(DefaultValue = 15)] public int Period1 { get; set; } [Parameter(DefaultValue = 30)] public int Period2 { get; set; } [Parameter("EMAs Timeframe1", DefaultValue = "Minute15")] public TimeFrame EMATimeframe1 { get; set; } [Parameter("EMAs Timeframe2", DefaultValue = "Hour4")] public TimeFrame EMATimeframe2 { get; set; } [Output("EMA1", Color = Colors.Red)] public IndicatorDataSeries EMA1 { get; set; } [Output("EMA2", Color = Colors.ForestGreen)] public IndicatorDataSeries EMA2 { get; set; } [Output("EMA3", Color = Colors.BlueViolet)] public IndicatorDataSeries EMA3 { get; set; } [Output("EMA4", Color = Colors.Violet)] public IndicatorDataSeries EMA4 { get; set; } private MarketSeries seriesM15; private MarketSeries seriesH4; private ExponentialMovingAverage Ema1; private ExponentialMovingAverage Ema2; private ExponentialMovingAverage Ema3; private ExponentialMovingAverage Ema4; protected override void Initialize() { seriesM15 = MarketData.GetSeries(EMATimeframe1); seriesH4 = MarketData.GetSeries(EMATimeframe2); Ema1 = Indicators.ExponentialMovingAverage(seriesM15.Close, Period1); Ema2 = Indicators.ExponentialMovingAverage(seriesM15.Close, Period2); Ema3 = Indicators.ExponentialMovingAverage(seriesH4.Close, Period1); Ema4 = Indicators.ExponentialMovingAverage(seriesH4.Close, Period2); } public override void Calculate(int index) { if (!IsLastBar) { var index1 = GetIndexByDate(seriesM15, MarketSeries.OpenTime[index]); if (index1 != -1) { EMA1[index] = Ema1.Result[index1]; } var index2 = GetIndexByDate(seriesM15, MarketSeries.OpenTime[index]); if (index2 != -1) { EMA2[index] = Ema2.Result[index2]; } var index3 = GetIndexByDate(seriesH4, MarketSeries.OpenTime[index]); if (index3 != -1) { EMA3[index] = Ema3.Result[index3]; } var index4 = GetIndexByDate(seriesH4, MarketSeries.OpenTime[index]); if (index4 != -1) { EMA4[index] = Ema4.Result[index4]; } } else { EMA1[index] = Ema1.Result.LastValue; EMA2[index] = Ema2.Result.LastValue; EMA3[index] = Ema3.Result.LastValue; EMA4[index] = Ema4.Result.LastValue; } } private int GetIndexByDate(MarketSeries series, DateTime time) { for (int i = series.Close.Count - 1; i > 0; i--) { if (time == series.OpenTime[i]) return i; } return -1; } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Oct 2018, 14:09
Hi freemangreat,
Which version of cTrader do you use?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
19 Oct 2018, 10:49
( Updated at: 21 Dec 2023, 09:20 )
Ηι nh.zadeh,
Thanks for posting in our forum. Ι have tried your indicator and seems ok to me.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Oct 2018, 17:51
Hi tadas8891,
If you are trading more than the maximum volume allowed by the broker, then that would be the cause of the problem.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Oct 2018, 17:14
Hi Augustus,
cTrader just prompts you to restart whenever it is more convienient for you. Disabling updates completely is not possible due to the nature of our service.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Oct 2018, 17:08
Hi Augustus,
Thanks for posting in our forum. Please note that cTrader does not install updates without your consent. Could it be that the OS restarted instead?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Oct 2018, 15:08
Hi Sasha,
From the information provided it is not easy to me to understand what you are trying to do. Can you draw on the chart what would you expect to see and which lines of code do you expect to do that?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Oct 2018, 14:57
Hi tadas8891,
Can you please provide some more information about this? How do you try to open the position. Do you use a cBot? Please provide us with exact steps to reproduce what you see.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Oct 2018, 09:42
Hi tim_d2,
Yo get the pending limit orders. you can try the following
PendingOrders.Where(x => x.OrderType == PendingOrderType.Limit);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Oct 2018, 12:48
Hi Sasha,
This should work
MarketSeries.OpenTime.LastValue.AddMonths(-1);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Oct 2018, 14:24
If you will handle the form yourself and create the orders then you can still use the label.
@PanagiotisCharalampous