PanagiotisCharalampous's avatar
PanagiotisCharalampous
26 follower(s) 0 following 1006 subscription(s)
Replies

PanagiotisCharalampous
07 Feb 2024, 07:28

RE: RE: RE: RE: Candle Stick Appearance

fufu369 said: 

 

 

PanagiotisCharalampous said: 

fufu369 said: 

PanagiotisCharalampous said: 

You can choose your outline here

 

sure,

 i know how to colorize the outline. but it only colors the wicks instead the outlines of the Candle-body. Like you see in my example: i colored the outlines in black, but the candel-body is still blue.

on other platformes  it colors the wicks AND the candle outlines.

Hi there,

I tried it and works fine for me

 

my problem is half solved.. :D

i just updated my macOS. installed ctrader 100x new .  version of ctrader is 4.8.900. is this correct?

 

 

Hi there, 

We will investigate this further and come back to you.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
07 Feb 2024, 07:11

Hi there,

Plugins will be available in the upcoming major update.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
07 Feb 2024, 07:09

RE: RE: RE: Cant get Trailing StopLoss Working

jmenotts said: 

Thankyou for your reply buddy but ….. im still unable to get it running heres my code it must be something so simple im sure lol.

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class ADXCrossingBot : Robot
    {
        private bool isTradeOpen = false;

        [Parameter("Quantity (Lots)", Group = "Volume", DefaultValue = 0.01, MinValue = 0.01, Step = 0.01)]
        public double Quantity { get; set; }

        [Parameter("ADX Periods", Group = "ADX", DefaultValue = 20, MinValue = 6, Step = 1, MaxValue = 1000)]
        public int AdxPeriods { get; set; }

        [Parameter("MA", Group = "ADX", DefaultValue = 21, MinValue = 6, Step = 1, MaxValue = 1000)]
        public int TrendMME { get; set; }

        [Parameter("Take Profit", Group = "Risk", DefaultValue = 150, MinValue = 0, Step = 1, MaxValue = 1000)]
        public int TakeProfit { get; set; }

        [Parameter("Stop Loss", Group = "Risk", DefaultValue = 150, MinValue = 0, Step = 1, MaxValue = 1000)]
        public int StopLoss { get; set; }

        [Parameter("Trade Label", DefaultValue = "ADX Crossing")]
        public string TradeLabel { get; set; }

        [Parameter("Use Trailing Stop", DefaultValue = false, Group = "Trailing Stop Loss")]
        public bool UseTSL { get; set; }

        [Parameter("Trigger (pips)", DefaultValue = 20, Group = "Trailing Stop Loss")]
        public int TSLTrigger { get; set; }

        [Parameter("Distance (pips)", DefaultValue = 10, Group = "Trailing Stop Loss")]
        public int TSLDistance { get; set; }

        private DirectionalMovementSystem adx;
        private double volumeInUnits;
        private ExponentialMovingAverage mme;
        private RelativeStrengthIndex rsi;
        

        protected override void OnStart()
        {
            volumeInUnits = Symbol.QuantityToVolumeInUnits(Quantity);
            adx = Indicators.DirectionalMovementSystem(AdxPeriods);
            mme = Indicators.ExponentialMovingAverage(Bars.ClosePrices, TrendMME);
            rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);

            Positions.Closed += OnPositionClosed;
        }

        protected override void OnTick()
        {
            // Check if a trade is already open
            if (isTradeOpen)
                return;

            if (adx.DIMinus.Last(3) < adx.DIPlus.Last(3) && adx.DIMinus.Last(1) > adx.DIPlus.Last(1) && adx.DIMinus.LastValue > adx.DIPlus.LastValue)
            {
                if (Symbol.Bid < mme.Result.Last(2))
                    if (rsi.Result.LastValue <= 70)
                    {
                        ExecuteMarketOrder(TradeType.Sell,  Symbol.Name, volumeInUnits, TradeLabel, StopLoss, TakeProfit);
                        isTradeOpen = true;
                    }
            }
            else if (adx.DIPlus.Last(3) < adx.DIMinus.Last(3) && adx.DIPlus.Last(1) > adx.DIMinus.Last(1) && adx.DIPlus.LastValue > adx.DIMinus.LastValue)
            {
                if (Symbol.Bid > mme.Result.Last(2))
                    if (rsi.Result.LastValue >= 30)
                    {
                        ExecuteMarketOrder(TradeType.Buy, Symbol.Name, volumeInUnits, TradeLabel, StopLoss, TakeProfit);
                        isTradeOpen = true;
                    }
            }

{
            // If Trailing Stop Loss is set to true, then we execute the following code block
            if (UseTSL)
            {
                // we iterate through all the instance's positions
                foreach (var position in Positions.Where(x => x.Label == TradeLabel))
                {
                    // If position's pips is above the trailing stop loss pips and the position has not trailing stop loss set
                    if (position.Pips > TSLTrigger && !position.HasTrailingStop)
                    {
                        // We check the position's trade type and excute the relevant code block
                        if (position.TradeType == TradeType.Buy)
                        {
                            // We calculate the stop loss based on the TSL Distance To Add parameter
                            var stopLoss = Symbol.Bid - (TSLDistance * Symbol.PipSize);

                            // We modify the stop loss price
                            position.ModifyStopLossPrice(stopLoss);

                            // We set the trailing stop loss to true
                            position.ModifyTrailingStop(true);

                            Print("Trailing Stop Loss Triggered");
                        }
                        else
                        {
                            // We calculate the stop loss based on the TSL Distance To Add parameter
                            var sl = Symbol.Ask + (TSLDistance * Symbol.PipSize);

                            // We modify the stop loss price
                            position.ModifyStopLossPrice(sl);
                            position.ModifyTrailingStop(true);

                            Print("Trailing Stop Loss Triggered");
                        }
                    }
                }
            }
        }}
        private void OnPositionClosed(PositionClosedEventArgs args)
        {
            // Reset the flag when a position is closed
            isTradeOpen = false;
        }
    }
}

This condition does not allow the TSL code to be executed. Place the TSL code above it

            // Check if a trade is already open
            if (isTradeOpen)
                return;

@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 14:21

RE: Cant get Trailing StopLoss Working

jmenotts said: 

Hi im still unable to get it working even with the tried and tested code am i being silly? lol  i pasted the exact code im using, im altering parameters and he results are no different when running back test im lost now any further help will be much appreciated thank you once again.

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class ADXCrossingBot : Robot
    {
        private bool isTradeOpen = false;

        [Parameter("Quantity (Lots)", Group = "Volume", DefaultValue = 0.01, MinValue = 0.01, Step = 0.01)]
        public double Quantity { get; set; }

        [Parameter("ADX Periods", Group = "ADX", DefaultValue = 20, MinValue = 6, Step = 1, MaxValue = 1000)]
        public int AdxPeriods { get; set; }

        [Parameter("MA", Group = "ADX", DefaultValue = 21, MinValue = 6, Step = 1, MaxValue = 1000)]
        public int TrendMME { get; set; }

        [Parameter("Take Profit", Group = "Risk", DefaultValue = 150, MinValue = 0, Step = 1, MaxValue = 1000)]
        public int TakeProfit { get; set; }

        [Parameter("Stop Loss", Group = "Risk", DefaultValue = 150, MinValue = 0, Step = 1, MaxValue = 1000)]
        public int StopLoss { get; set; }

        [Parameter("Trade Label", DefaultValue = "ADX Crossing")]
        public string TradeLabel { get; set; }

        [Parameter("Use Trailing Stop", DefaultValue = false, Group = "Trailing Stop Loss")]
        public bool UseTSL { get; set; }

        [Parameter("Trigger (pips)", DefaultValue = 20, Group = "Trailing Stop Loss")]
        public int TSLTrigger { get; set; }

        [Parameter("Distance (pips)", DefaultValue = 10, Group = "Trailing Stop Loss")]
        public int TSLDistance { get; set; }

        private DirectionalMovementSystem adx;
        private double volumeInUnits;
        private ExponentialMovingAverage mme;
        private RelativeStrengthIndex rsi;

        protected override void OnStart()
        {
            volumeInUnits = Symbol.QuantityToVolumeInUnits(Quantity);
            adx = Indicators.DirectionalMovementSystem(AdxPeriods);
            mme = Indicators.ExponentialMovingAverage(Bars.ClosePrices, TrendMME);
            rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);

            Positions.Closed += OnPositionClosed;
        }

        protected override void OnTick()
        {
            // Check if a trade is already open
            if (isTradeOpen)
                return;

            if (adx.DIMinus.Last(3) < adx.DIPlus.Last(3) && adx.DIMinus.Last(1) > adx.DIPlus.Last(1) && adx.DIMinus.LastValue > adx.DIPlus.LastValue)
            {
                if (Symbol.Bid < mme.Result.Last(2))
                    if (rsi.Result.LastValue <= 70)
                    {
                        ExecuteMarketOrder(TradeType.Sell, Symbol.Name, volumeInUnits, "ADX Sell", StopLoss, TakeProfit);
                        isTradeOpen = true;
                    }
            }
            else if (adx.DIPlus.Last(3) < adx.DIMinus.Last(3) && adx.DIPlus.Last(1) > adx.DIMinus.Last(1) && adx.DIPlus.LastValue > adx.DIMinus.LastValue)
            {
                if (Symbol.Bid > mme.Result.Last(2))
                    if (rsi.Result.LastValue >= 30)
                    {
                        ExecuteMarketOrder(TradeType.Buy, Symbol.Name, volumeInUnits, "ADX Buy", StopLoss, TakeProfit);
                        isTradeOpen = true;
                    }
            }

{
            // If Trailing Stop Loss is set to true, then we execute the following code block
            if (UseTSL)
            {
                // we iterate through all the instance's positions
                foreach (var position in Positions.Where(x => x.Label == TradeLabel))
                {
                    // If position's pips is above the trailing stop loss pips and the position has not trailing stop loss set
                    if (position.Pips > TSLTrigger && !position.HasTrailingStop)
                    {
                        // We check the position's trade type and excute the relevant code block
                        if (position.TradeType == TradeType.Buy)
                        {
                            // We calculate the stop loss based on the TSL Distance To Add parameter
                            var stopLoss = Symbol.Bid - (TSLDistance * Symbol.PipSize);

                            // We modify the stop loss price
                            position.ModifyStopLossPrice(stopLoss);

                            // We set the trailing stop loss to true
                            position.ModifyTrailingStop(true);

                            Print("Trailing Stop Loss Triggered");
                        }
                        else
                        {
                            // We calculate the stop loss based on the TSL Distance To Add parameter
                            var sl = Symbol.Ask + (TSLDistance * Symbol.PipSize);

                            // We modify the stop loss price
                            position.ModifyStopLossPrice(sl);
                            position.ModifyTrailingStop(true);

                            Print("Trailing Stop Loss Triggered");
                        }
                    }
                }
            }
        }}
        private void OnPositionClosed(PositionClosedEventArgs args)
        {
            // Reset the flag when a position is closed
            isTradeOpen = false;
        }
    }
}

Try passing TradeLabel to your orders as well :)


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 13:19

RE: RE: RE: RE: RE: RE: Backtest swaps are still missing in some cases

ncel01 said: 

PanagiotisCharalampous said: 

ncel01 said: 

PanagiotisCharalampous said: 

ncel01 said: 

PanagiotisCharalampous said: 

Hi ncel01,

Can you please provide more information?

Best regards,

Panagiotis

Hi Panagiotis,

Yes, of course. Just let know what exact information you need.

Account, broker and how we can see what you are looking at (cBot, screenshots etc)

Panagiotis,

Try to run a backtest on indices with Pepperstone or Varianse and let me know what the outcome is.

In my case the swaps are zero for all my accounts with these brokers.

Looks good here

Panagiotis,

That's forex. Please try an index, as requested.

Note: My accounts are with Pepperstone Group Limited (ASIC) and not Pepperstone Europe.

Thanks ncel01,

I managed to reproduce this and reported it to the product team. Hopefully it will be resolved soon.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 12:02

Hi Virtuose,

We have checked your followers accounts and the trades have been rejected due to low margin in their accounts. This was clearly described in the points I have shared above. If your followers thing this should not be the case, they should contact their broker.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 08:27

RE: RE: RE: RE: Positions didn’t copy to others.

Virtuose said: 

PanagiotisCharalampous said: 

Virtuose said: 

PanagiotisCharalampous said: 

Hi there,

cTrader Copy results are not guaranteed and may vary compared to those of the strategy provider due to the following reasons:

  • Differences between your positions' entry and closing prices and those of the strategy provider
  • Differences in the size of your positions compared to those of the strategy provider
  • Variations in the commissions you pay to your broker compared to those of the strategy provider
  • The possibility that your broker does not offer the same trading symbols used in the strategy
  • Insufficient margin in your account to copy some of the orders executed in the strategy
  • Differences in the stop out levels, which might cause your account to be stopped out, while the strategy provider continues to trade

Best regards,

Panagiotis

If your company does not guarantee 100% copying of positions, why do you still run and offer such a business?

cTrader is not a broker and does not handle trade execution. The platform only facilitated the trade copying process. It cannot guarantee any execution.

man so the fault is from broker side? 

There is no fault. This is how markets work and it is expected. The points above are taken from the EULA which describes the conditions of this service.


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 08:01

RE: RE: Positions didn’t copy to others.

Virtuose said: 

PanagiotisCharalampous said: 

Hi there,

cTrader Copy results are not guaranteed and may vary compared to those of the strategy provider due to the following reasons:

  • Differences between your positions' entry and closing prices and those of the strategy provider
  • Differences in the size of your positions compared to those of the strategy provider
  • Variations in the commissions you pay to your broker compared to those of the strategy provider
  • The possibility that your broker does not offer the same trading symbols used in the strategy
  • Insufficient margin in your account to copy some of the orders executed in the strategy
  • Differences in the stop out levels, which might cause your account to be stopped out, while the strategy provider continues to trade

Best regards,

Panagiotis

If your company does not guarantee 100% copying of positions, why do you still run and offer such a business?

cTrader is not a broker and does not handle trade execution. The platform only facilitated the trade copying process. It cannot guarantee any execution.


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 07:46

Hi there,

You can achieve this using a cBot. Here is an example you could use

https://clickalgo.com/data-export-tool

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 07:38

RE: RE: RE: RE: RE: Meet cTrader for Mac

Dantr said: 

How long will it take until the new version is released, with which MAC users can also access 'Backtesting' and 'Optimization' in the 'Automate' application?

PanagiotisCharalampous said: 

brandonjames0754 said: 

PanagiotisCharalampous said: 

brandonjames0754 said: 

hello, I have downloaded this on my Mac, but I can not find the backtesting tab its non existent. I've even deleted the application and downloaded a new one. can you help me please?

Hi there,

These features will come in a later version.

Best regards,

Panagiotis

thank you for the reply, will this also include being able to add c bots from the download site

 

Hi there,

You should be able to run cBots in real time mode with the current version.

Best regards,

Panagiotis

 

Hi there,

There is no ETA at the moment but the team is currently working on these features.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 07:37

RE: RE: RE: RE: RE: cTrader tick data or m bars not working!

codex_oli said: 

PanagiotisCharalampous said: 

codex_oli said: 

codex_oli said: 

PanagiotisCharalampous said: 

Hi there,

Please send us some troubleshooting info and quote the link to this discussion by pasting a link to this discussion inside the text box before you submit it.

Best Regards,

Panagiotis 


 

OK I sent! 

I wait for a response!

Tks!

I think it's a problem related to the new accounts (DEMO (possibly?!?!?!)). 

No matter if I have newly opened account on spotware, topfx, icmarkets... The problem is the same... I cannot do backtesting tests without checking the VISUAL box, or in the optimization tab. 

I asked a friend to log in into my computer with his older account and everything seems to be working normally. (So, it is not a computer problem !!!) 

If I log in, with my account (which is a newer account than his) backtesting and optimization no longer work. 

Do you have a solution to this problem? Please if you have to post it, I am bored of writing... monologue! 

Thanks!

Hi,

As explained above, this issue will be resolved in an upcoming update. We do not have any other solution at the moment. If you have found a workaround i.e. using a different account, then you could use it.

Best regards,

Panagiotis

Any new updates?

Hi there,

No updates have been released yet.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 07:36

Responded here

https://ctrader.com/forum/ctrader-copy/42838#post-107277


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 07:35

Hi there,

Please provide us with the following information

  • Screenshots of the received messages
  • Broker
  • Account number
  • The exact time the withdrawal was attempted

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 07:34

Responded here

https://ctrader.com/forum/ctrader-copy/42836#post-107261


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 07:33

Hi there,

cTrader Copy results are not guaranteed and may vary compared to those of the strategy provider due to the following reasons:

  • Differences between your positions' entry and closing prices and those of the strategy provider
  • Differences in the size of your positions compared to those of the strategy provider
  • Variations in the commissions you pay to your broker compared to those of the strategy provider
  • The possibility that your broker does not offer the same trading symbols used in the strategy
  • Insufficient margin in your account to copy some of the orders executed in the strategy
  • Differences in the stop out levels, which might cause your account to be stopped out, while the strategy provider continues to trade

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
06 Feb 2024, 07:24

RE: RE: Candle Stick Appearance

fufu369 said: 

PanagiotisCharalampous said: 

You can choose your outline here

sure,

 i know how to colorize the outline. but it only colors the wicks instead the outlines of the Candle-body. Like you see in my example: i colored the outlines in black, but the candel-body is still blue.

on other platformes  it colors the wicks AND the candle outlines.

Hi there,

I tried it and works fine for me

 


@PanagiotisCharalampous

PanagiotisCharalampous
05 Feb 2024, 11:59

RE: RE: Backtest (visual vs non-visual mode): different results

alexandre.abconcept said: 

ncel01 said: 

Dear cTrader Team,

There is no “my case”.

As you might have noticed, the code sample provided above was only intended to report an issue.

My question was obviously generic.

Thanks for clarifying the community on this by providing an effective answer. It would be also of value to see documentation on this available.

 

 

Hello is there news on this ? I have the same issue.. When I backtest in Visual mode it is not the same results than in not visual..

Hi there,

The above issue is resolved. If you still face such an issue, please create a separate thread and provide information and exact steps to reproduce.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
05 Feb 2024, 11:56

RE: RE: RE: RE: Backtest swaps are still missing in some cases

ncel01 said: 

PanagiotisCharalampous said: 

ncel01 said: 

PanagiotisCharalampous said: 

Hi ncel01,

Can you please provide more information?

Best regards,

Panagiotis

Hi Panagiotis,

Yes, of course. Just let know what exact information you need.

Account, broker and how we can see what you are looking at (cBot, screenshots etc)

Panagiotis,

Try to run a backtest on indices with Pepperstone or Varianse and let me know what the outcome is.

In my case the swaps are zero for all my accounts with these brokers.

Looks good here


@PanagiotisCharalampous

PanagiotisCharalampous
05 Feb 2024, 11:49

You can choose your outline here


@PanagiotisCharalampous

PanagiotisCharalampous
05 Feb 2024, 08:17

RE: RE: The trades dont copy

mere.pere1010 said: 

PanagiotisCharalampous said: 

Hi there,

Please provide us with the following information

  • Your account number.
  • Screenshots of the open positions that should be closed.
  • Screenshots of the strategy provider's showing that the positions have been closed.

Best regards,

Panagiotis

 

My account number is 2009788.

 

There are trades that he opened but didnt open on my account not trades that he closed but didnt close on my account!

 

Hi there,

Can you please provide the screenshots I requested?

Best regards,

Panagiotis


@PanagiotisCharalampous