Replies

PanagiotisCharalampous
09 Sep 2024, 06:34

Hi there,

You should talk to your broker regarding withdrawals.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 06:32

Hi there,

You can use the MouseDown event to achieve this.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 06:28

Hi there,

No, this option is not available at the moment on cTrader for Mac.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 06:22

Hi martins,

Thanks for your suggestions but we disagree with maintaining multiple versions of documentation. Old code does not need to be maintained but needs to be updated. Obsolete methods are only supported so that developers have enough time to update their obsolete code without service interruptions. New development is not supported. Therefore we do not plan to make it easy for people not to update their code.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 06:14

Hi all,

This should have been fixed now. Let us know if you still experience any issues.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 06:13

Hi all,

This should have been fixed now. Let us know if you still experience any issues.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 06:11

RE: RE: POOR SERVICE

firemyst said: 

PanagiotisCharalampous said: 

Hi there,

Telegram is not the place to report your issues. Your emails were not received. Your video has been forwarded to the product team for further investigation.

Best regards,

Panagiotis

@PanagiotisCharalampous:

Here's another report of your team not receiving emails people are sending to the “community” email address. 

I think this should warrant some kind of investigation on Spotware's side to see why as there's now at least 2 users who had sent emails through, but Spotware didn't receive them.

To refresh, here's the thread on an issue I reported where after sending the initial issue to the Community addresses, they didn't receive any further emails from me once I tried sending through my VPS information:

https://ctrader.com/forum/ctrader-algo/44559/#post-113028

 

 

Hi firemyst,

Thanks, we fixed the issue.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 06:06

RE: RE: RE: RE: Closing part of a position in backtesting

da.weber92 said: 

firemyst said: 

da.weber92 said: 

firemyst said: 

If you wrote your own bot, then you do it in your code by modifying the position and reducing the volume of your position when your criteria are met.

Sorry for being unprecise, but I meant manual backtesting without a bot or even indicators. Just looking at the chart and using a little bit of intuition.

 

I am using hedging for some time now and you can get out of bad trades by partly closing positions quite well. But I can not do that in replay mode or I did not find the option to do this.

Just double click on your order in the order window and the modify order window comes up.

Reduce the volume of your position and click to update your order.

I tried doing that before because I know this works in live trading, but in replay mode nothing happens when I double click. I am afraid that it is just not implemented yet :/

Hi there,

Indeed this is not implemented yet.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 06:02

Hi there,

Please let us know if you still experience this issue after the weekend's update.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 06:00

RE: RE: RE: RE: RE: RE: RE: RE: RE: RE: RE: RE: RE: RE: Backtesting - Incorrect TP / SL calculation

zytotoxiziteat said: 

 

PanagiotisCharalampous said: 

zytotoxiziteat said: 

zytotoxiziteat said: 

zytotoxiziteat said: 

PanagiotisCharalampous said: 

zytotoxiziteat said: 

PanagiotisCharalampous said: 

zytotoxiziteat said: 

PanagiotisCharalampous said: 

zytotoxiziteat said: 

zytotoxiziteat said: 

zytotoxiziteat said: 

PanagiotisCharalampous said: 

Hi there,

Please share your cBot code and make sure you are using tick data for your backtests.

Best regards,

Panagiotis

using System;using System.Collections.Generic;using cAlgo.API;using cAlgo.API.Indicators;using cAlgo.API.Internals;namespace cAlgo.Robots{    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]    public class TradingBot : Robot    {        [Parameter("Risk Percentage", DefaultValue = 1, MinValue = 0.1, MaxValue = 10)]        public double RiskPercentage { get; set; }        [Parameter("Stop Loss (Pips)", DefaultValue = 40, MinValue = 0, MaxValue = 100)]        public double StopLossPips { get; set; }        [Parameter("Take Profit (Pips)", DefaultValue = 20, MinValue = 0, MaxValue = 200)]        public double TakeProfitPips { get; set; }        private AI_101.ML101.ModelInput _modelInput;        private double _lastPrediction;        protected override void OnStart()        {            _modelInput = new AI_101.ML101.ModelInput();        }        protected override void OnTick()        {            // Ensure only one open position per currency pair            if (Positions.FindAll("ML Prediction", Symbol.Name).Length > 0)                return;            // Update model input with the latest close price            _modelInput.ClosePrice = (float)Symbol.Bid;  // Use Symbol.Bid instead of Symbol.LastTick.Bid            // Get prediction            var prediction = AI_101.ML101.Predict(_modelInput);            // Calculate the predicted price change            double predictedChange = prediction.ClosePrice[0] - _modelInput.ClosePrice;            // Determine if we should open a position            if (Math.Abs(predictedChange) > Symbol.PipSize)            {                if (predictedChange > 0 && _lastPrediction <= 0)                {                    OpenPosition(TradeType.Buy);                }                else if (predictedChange < 0 && _lastPrediction >= 0)                {                    OpenPosition(TradeType.Sell);                }            }            _lastPrediction = predictedChange;        }        private void OpenPosition(TradeType tradeType)        {            // Calculate position size based on risk            double riskAmount = Account.Balance * (RiskPercentage / 100);            double volumeInUnits = riskAmount / (StopLossPips * Symbol.PipValue);            // Ensure volume is within acceptable range and increments            volumeInUnits = Symbol.NormalizeVolumeInUnits(volumeInUnits, RoundingMode.ToNearest);            // Check if the volume is valid            if (volumeInUnits < Symbol.VolumeInUnitsMin || volumeInUnits > Symbol.VolumeInUnitsMax)            {                Print("Volume is out of range: " + volumeInUnits);                return;            }            // Open the position            ExecuteMarketOrder(tradeType, Symbol.Name, volumeInUnits, "ML Prediction", StopLossPips, TakeProfitPips);        }    }}

My thought was:

Since I collected only m5 candle data for my Machine learning module I changed the “Data” in settings to “m5 bars from server” for backtesting 

and I was considering to change “protected override void OnTick()” to "protected override void OnBar()".
 

Is that wrong?

What is the best solution?

Thank you

Hi there, 

If you are using fixed SL and TP, you need to use tick data to ensure accurate results in backtesting.

Best regards,

Panagiotis

Okay, my cbot code uses

protected override void OnTick()

I still get wrong TP.

You need to use tick data on your backtesting settings. OnTick() is irrelevant.

 

Where does the option “m5 bars from server” come from?

 

 I thought the system provided the best possible set-up because of my csv file, which contains only m5 bars data. 

 

I don't understand what you mean. It's just an option in a dropdown list

My friend,

I created a csv file with m5 bars only to train my module. I thought that is why I the option “M5” is available.

Can you please explain why in any of the options in Backtesting drop-down list is not triggering my predefined TP or SL . 

What is the point of predefining it?

I thought the Backtesting process should prepare for the real environment. But when there are options which are not correctly executed by the system makes no sense to me.

 

The options have nothing to do with the data you used to generate the model. The backtesting module has no clue what your cBot is doing. Those options are there to choose the data source to be used for the backtesting. If you don't use tick data but you use SP and TP at specific price levels, your execution will be inaccurate, since m5 bars data source only uses open prices for the execution 

Hi, ok I tried the optimizer with tick data from server.
 
The Optimizers choice of parameters : SL = 82; TP = 20

 

 

And this was the result. Again the TP was not correct: way more than 20 pips TP

 

I dont know mate. It seems to me there is no point of “testing” if the system doesnt TP/SL properly.

Hi there,

I cannot provide an explanation of what you are looking at since I do not have your cBot's code. If you can help me reproduce what you are looking at, I will explain what happens. But I am 100% sure that this is not related with inaccurate executions. I am using cTrader for the last 8 years, I backtest several cBots every day and I can confirm that the execution with tick data is exact.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 05:53

RE: Push notifications not working

MobileTrader said: 

Hello,

I have the same issue again, I'm not receiving notification. Using ctrader crossbroker app for android.

Can you please check?

Thank you!

Hi there,

Please let me know if you still experience this issue after the weekend's update.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 05:50

Hi swingfish,

You can use Open API to achieve this.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 05:47

RE: RE: RE: RE: RE: Downloadable Trading Statement in Excel / CSV format Please

theopellegrini said: 

PanagiotisCharalampous said: 

theopellegrini said: 

ctd8172 said: 

firemyst said: 

Just choose to export your history as an Excel file and then save that file as a CSV.

Hi I don't see the down arrow (to select export format) by Statement in either cTrader Web or Mac, would you know if it's been disabled, or if it's Windows Desktop only?

Clicking it brings up this URL in a new tab, visually blank with some bare Javascript in the source. 



Thanks

Hi ctd8172,

I have been having the exact same problem with trying to access an excel version of my statement on cTrader. Have you found or been offered a solution for this yet? My Ctrader looks the same as yours, no arrow drop down on the Statement button allowing you to select an excel version, only a blank URL. 

Thanks very much.

These options are only available on cTrader Desktop at the moment

When you say, ‘cTrader Desktop’, does that mean the drop down arrow option to access Statements as excel files s only available on the Desktop version of cTrader PCs/Windows?

Thanks. 

Yes that is what I mean


@PanagiotisCharalampous

PanagiotisCharalampous
09 Sep 2024, 05:46

RE: RE: RE: Indicator have a bug

magomanitr said: 

magomanitr said: 

PanagiotisCharalampous said: 

Hi there,

Please provide a clear description of what the problem is.

Best regards,

Panagiotis

 

I am coding for Telegram notification when there is cross over on Moving Averages.
When I Build the indicator is says ‘Telegram.Bot is not supported’

Even the following it gives a red underline
using Telegram.Bot; 

Make sure you are using the .Net Compiler


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2024, 11:50

Hi there,

Please provide a clear description of what the problem is.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2024, 11:48

RE: RE: RE: RE: RE: RE: RE: RE: using Bar collection and indicators (eg DMS) in background job.

Shares4us said: 

No there isn't

may I ask why?  ctrader itself uses headless indicators and bots in back testing and optimisation . Would be nice if we could use this to!

There is no specific reason. Such a feature is just not implemented. Also you asked about accessing plugins and backtesting, not cBots and indicators


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2024, 10:53

Hi there,

This option is only available on cTrader Desktop at the moment.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2024, 10:50

RE: RE: RE: Downloadable Trading Statement in Excel / CSV format Please

theopellegrini said: 

ctd8172 said: 

firemyst said: 

Just choose to export your history as an Excel file and then save that file as a CSV.

Hi I don't see the down arrow (to select export format) by Statement in either cTrader Web or Mac, would you know if it's been disabled, or if it's Windows Desktop only?

Clicking it brings up this URL in a new tab, visually blank with some bare Javascript in the source. 



Thanks

Hi ctd8172,

I have been having the exact same problem with trying to access an excel version of my statement on cTrader. Have you found or been offered a solution for this yet? My Ctrader looks the same as yours, no arrow drop down on the Statement button allowing you to select an excel version, only a blank URL. 

Thanks very much.

These options are only available on cTrader Desktop at the moment


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2024, 05:25

Hi there,

Unfortunately I did not understand what you are looking for. Can you please rephrase?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2024, 05:23

RE: RE: RE: RE: Training Stop loss

siddasaiganesh said: 

PanagiotisCharalampous said: 

siddasaiganesh said: 

PanagiotisCharalampous said: 

Hi there, 

You cannot set a trailing stop loss using FIX API. If you need to set a trailing stop loss, you should use Open API instead.

Best regards,

Panagiotis

Hi Can I get any samples of code having trailing stop loss using this Open API.

You can find Python samples of Open API in the link below

https://github.com/spotware/OpenApiPy

Trailing stop loss is set in ProtoOANewOrderReq.trailingStopLoss property

I tried using trailing stop loss using open API..even I'm setting true for trailing stop loss in a function to place order..it is by default setting to False. What to do? Isn't there a way to use trailing stop loss. I have also seen some online posts about open API that it has a bug for trailing stop loss which is set to by default False even we're assigning it to true. 

Hi there,

Can you share the posts you are referring too?

Best regards,

Panagiotis


@PanagiotisCharalampous