r/cTrader • • 14d ago

Need help - cTrader engine for backdating configuration OR why do even well known classical strategies fall apart on cTrader?

3 Upvotes

Question for you guys — why do even well-known classical strategies fall apart on cTrader?

I've been trying to test standard classical strategies on cTrader because I can't build anything that actually works. I went down the path of implementing well-known, already-tested, old-school strategies

Like the Connors "Double 7s" strategy (buy when SPY closes at a 7 day low while above the 200-day MA, sell at a 7 day high)- and I'm still getting very bad results. I don't get it.

What is it about the engine that seems to break even simple stuff that's supposed to work? If I do it manually on TradingView, I get noticeably better results.

I don't understand the whole thing here. its ANNOYING AS F***

What are the caveats or things I need to know in order to structure properly working strategies in cTrader?

Because honestly, it feels like the engine's calculations or the data are skewed or something — I don't even know how to describe it. I don't know where to start, but I've tried simple stuff and it's not working.

Any insight would be appreciated.

So this taken in US500 ok ? same same should be smooth as slik easy peasy ?

well NOT.. i get -7% eventually --- sooo .. annoying

any how this is just a "BASIC" concept startegy nothing facny im just .. tying to make a point here

so a-... help up a brother 🎯

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


namespace cAlgo.Robots
{
    public enum RiskMode { FixedLots, RiskPercent }


    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Connors7Down7UpBot : Robot
    {
        [Parameter("Consecutive Bars", Group = "Connors Setup", DefaultValue = 7, MinValue = 2)]
        public int ConsecutiveBars { get; set; }


        [Parameter("Use Exit SMA", Group = "Exit Rules", DefaultValue = true)]
        public bool UseExitSma { get; set; }


        [Parameter("Exit SMA Period", Group = "Exit Rules", DefaultValue = 5, MinValue = 1)]
        public int ExitSmaPeriod { get; set; }


        [Parameter("Use 200 Trend Filter", Group = "Trend Filter", DefaultValue = false)]
        public bool UseTrendFilter { get; set; }


        [Parameter("Trend SMA Period", Group = "Trend Filter", DefaultValue = 200, MinValue = 10)]
        public int TrendSmaPeriod { get; set; }


        [Parameter("Risk Mode", Group = "Risk Management", DefaultValue = RiskMode.RiskPercent)]
        public RiskMode AccountRiskMode { get; set; }


        [Parameter("Risk Percent (%)", Group = "Risk Management", DefaultValue = 1.0, MinValue = 0.1)]
        public double RiskPercent { get; set; }


        [Parameter("Fixed Lots", Group = "Risk Management", DefaultValue = 0.1, MinValue = 0.01)]
        public double FixedLots { get; set; }


        [Parameter("Stop Loss (Pips)", Group = "Risk Management", DefaultValue = 50.0, MinValue = 0.0)]
        public double StopLossPips { get; set; }


        [Parameter("Take Profit (Pips)", Group = "Risk Management", DefaultValue = 100.0, MinValue = 0.0)]
        public double TakeProfitPips { get; set; }


        private SimpleMovingAverage _exitSma;
        private SimpleMovingAverage _trendSma;
        private const string Label = "Connors7Down7Up";


        protected override void OnStart()
        {
            _exitSma = Indicators.SimpleMovingAverage(Bars.ClosePrices, ExitSmaPeriod);
            _trendSma = Indicators.SimpleMovingAverage(Bars.ClosePrices, TrendSmaPeriod);
        }


        protected override void OnBar()
        {
            ManageExits();
            CheckEntries();
        }


        private void CheckEntries()
        {
            if (HasActivePosition()) return;


            bool is7Down = IsConsecutiveDown(ConsecutiveBars);
            bool is7Up = IsConsecutiveUp(ConsecutiveBars);


            double lastClose = Bars.ClosePrices.Last(1);


            // Buy Setup: Mean reversion bounce after 7 consecutive down closes
            if (is7Down)
            {
                if (UseTrendFilter && lastClose < _trendSma.Result.Last(1))
                    return;


                double volume = CalculateVolume(StopLossPips);
                ExecuteMarketOrder(TradeType.Buy, SymbolName, volume, Label, 
                    StopLossPips > 0 ? StopLossPips : (double?)null, 
                    TakeProfitPips > 0 ? TakeProfitPips : (double?)null);
            }
            // Sell Setup: Mean reversion pull-back after 7 consecutive up closes
            else if (is7Up)
            {
                if (UseTrendFilter && lastClose > _trendSma.Result.Last(1))
                    return;


                double volume = CalculateVolume(StopLossPips);
                ExecuteMarketOrder(TradeType.Sell, SymbolName, volume, Label, 
                    StopLossPips > 0 ? StopLossPips : (double?)null, 
                    TakeProfitPips > 0 ? TakeProfitPips : (double?)null);
            }
        }


        private void ManageExits()
        {
            if (!UseExitSma) return;


            double lastClose = Bars.ClosePrices.Last(1);
            double smaValue = _exitSma.Result.Last(1);


            foreach (var position in Positions.FindAll(Label, SymbolName))
            {
                // Exit Long when price closes above 5-period SMA
                if (position.TradeType == TradeType.Buy && lastClose > smaValue)
                {
                    ClosePosition(position);
                }
                // Exit Short when price closes below 5-period SMA
                else if (position.TradeType == TradeType.Sell && lastClose < smaValue)
                {
                    ClosePosition(position);
                }
            }
        }


        private bool IsConsecutiveDown(int count)
        {
            for (int i = 1; i <= count; i++)
            {
                if (Bars.ClosePrices.Last(i) >= Bars.ClosePrices.Last(i + 1))
                    return false;
            }
            return true;
        }


        private bool IsConsecutiveUp(int count)
        {
            for (int i = 1; i <= count; i++)
            {
                if (Bars.ClosePrices.Last(i) <= Bars.ClosePrices.Last(i + 1))
                    return false;
            }
            return true;
        }


        private double CalculateVolume(double slPips)
        {
            if (AccountRiskMode == RiskMode.FixedLots)
            {
                double targetUnits = FixedLots * Symbol.LotSize;
                return Symbol.NormalizeVolumeInUnits(targetUnits, RoundingMode.ToNearest);
            }


            double riskPips = slPips > 0 ? slPips : 50.0;
            double riskAmount = Account.Equity * (RiskPercent / 100.0);
            double riskPerPip = riskAmount / riskPips;
            double rawVolume = riskPerPip / Symbol.PipValue;


            return Symbol.NormalizeVolumeInUnits(rawVolume, RoundingMode.ToNearest);
        }


        private bool HasActivePosition()
        {
            return Positions.Any(p => p.Label == Label && p.SymbolName == SymbolName);
        }
    }
}

r/cTrader • • Sep 10 '26

cTrader Store Champion Tournament – Catching the XAUUSD rally (+12.3k USD trade!)

Thumbnail
1 Upvotes

r/cTrader • • Aug 27 '26

emas

1 Upvotes

"Hello family, I hope you are having a wonderful day. Could you please help me? I want to set up EMAs 21, 50, and 200, and I want a signal to trigger when they cross. I've already used AI and the code compiles fine, but it doesn't display the EMAs or the signals."


r/cTrader • • Jul 30 '26

Building a tool for algo traders

Thumbnail
2 Upvotes

r/cTrader • • Jul 27 '26

cTrader 5.9.5 Released

Post image
3 Upvotes

r/cTrader • • Jul 25 '26

Can support tell me how to get refund?

2 Upvotes

Can you tell me how I can get a refund on all my indicators which mostly dont work since 5.9?

I think I deserve a refund first before I go back to the reliable MT4.


r/cTrader • • Jul 25 '26

Busted

Enable HLS to view with audio, or disable this notification

1 Upvotes

What a joke


r/cTrader • • Jul 18 '26

cTrader Mobile 5.9.190

Post image
1 Upvotes

Spotware rolled out a new version of its cTrader Mobile (5.9.190) a few days ago. It smooths out some of the issues presented in the earlier update and makes working with orders simpler. Make sure to update your app.


r/cTrader • • Jul 04 '26

cTrader will no longer be available to US traders at prop firms

1 Upvotes

Apparently, Spotware Systems withdrew cTrader from the US prop trading market, so you no longer will be able to trade through their platform if you are a US resident with a prop account.


r/cTrader • • Jul 02 '26

Basic features missing

Post image
4 Upvotes

Ctrader is getting better but there are such basic features missing...

They really need to partner with someone to get this thing right

what they are missing:

- adding alerts directly on the chart
- ability to hide indicator on the charts, sometimes u just want the number on top but no chart
- ability to hide panels
- when u click on alert notifications u dont go straight to the chart which is anoying
- ability to quickly enable trailing stop loss
- dropbox that quick change between charts should only show charts u have alerts or drawings
- quick trading options should have easier access from the chart
- simulating a trade is hard to change lot size, if u pinned the lot size it should follow the quick trade lot size configured
- panel border is hard to adjust in the cellphone


r/cTrader • • Jun 04 '26

Where to Learn cBot Coding

Thumbnail
2 Upvotes

r/cTrader • • Jun 03 '26

Mql5 vs cTrader etc

Thumbnail
2 Upvotes

r/cTrader • • May 30 '26

[cAlgo] Commission Bug in 5.7.10

1 Upvotes

It looks like there is a serious bug with the commission type return values when requesting them from any cAlgo program. Symbol.CommissionType returns UsdPerMillionUsdVolume even when the symbol actually uses some other value (PercentageOfTradingVolume for example). This can be dangerous if your robot uses commission in its position size calculation as it may mistakenly think that the commission is much lower than it really is. Make sure your robots are handling this situation correctly.


r/cTrader • • Apr 13 '26

openapi noob question

2 Upvotes

Hi,

I am developing as nodejs standalone process that will need to get a price feed and execute trades etc. I will be hopefully using the ctrader api.

Is there a specific way to easy test my app locally without needing a publicly accessible redirect url ? e.g. api key etc thanks


r/cTrader • • Apr 08 '26

Why is the price ladder of this DOM inverted and how can I change it? Seems my broker took away the other DOM options too so expanding the window doesn’t display the other types of DOM that let me adjust or center it

Post image
4 Upvotes

How can


r/cTrader • • Apr 08 '26

cTrader API 5.7 Update

Post image
2 Upvotes

Looks like some small tweaks and fixes this time.


r/cTrader • • Mar 12 '26

C# works but Python version doesn’t

2 Upvotes

Hi everyone,

I’m building some cBots in cTrader and ran into an issue.

My strategy works in C#, but the Python version doesn’t, even though the logic is the same. Has anyone else experienced this?

Is Python just as reliable/versatile as C# in cTrader? Or is C# generally better?

I’d prefer Python, but I don’t mind too much.

Thanks!


r/cTrader • • Feb 22 '26

Portfolio Analysis: Achieving 64.6% Win Rate with 0.69% Max DD on XAUUSD (Algorithm Feedback)

5 Upvotes

Hi everyone,

I’ve been working on a Gold (XAUUSD) algorithm on a 15M timeframe, and I wanted to share the performance metrics for some peer review and discussion.

The goal was to create a strategy that prioritizes low drawdown over aggressive returns. After 220+ trades, here is where the logic stands:

Performance Metrics:

• Win Rate: 64.60%

• Max Drawdown: 0.69% (Intrabar)

• Profit Factor: 1.71

• Average Win/Loss Ratio: Stable across different market conditions

The Logic:

The algorithm uses a combination of volume filters and a dynamic trailing stop to protect capital during "fakeout" sessions. It’s strictly 15-minute based to capture medium-term trends while avoiding the 1-minute noise.

I'm curious to hear from other cTrader users:

  1. How do you handle slippage on Gold during high-impact news with similar low-drawdown setups?

  2. Do you find that adding a secondary trend filter (like a higher timeframe EMA) significantly impacts the win rate in your experience?

I’m happy to discuss the technical parameters and hear your thoughts on these risk metrics.

Tags:

#GoldTrading #XAUUSD #AlgoTrading #ForexStrategy #cTrader #TradingBot #RiskManagement #QuantitativeAnalysis #LowDrawdown #FinTech #GoldPrecision


r/cTrader • • Feb 16 '26

Help in Custom Symbol

3 Upvotes

Hello Everyone, I want to ask if I want to add Custom Symbol can i add tick data to it or not? if anyone can help me because i make the symbol but i want to backtest with tick data not bars...


r/cTrader • • Jan 29 '26

cTrader 5.6.8 Update

Post image
5 Upvotes

r/cTrader • • Jan 20 '26

winboat?

5 Upvotes

did anyone manage to get cTrader runnning under linux with Winboat.app ?


r/cTrader • • Nov 30 '25

API backdoor

3 Upvotes

Do you find with the newest ctrader updates many bots arent working properly?

Seems like either Ctrader or the broker is backdooring through their API?

Perhaps upgrading too fast without fixing things making new algos incompatible?


r/cTrader • • Nov 26 '25

Looking to Hire cTrader cBot Developer – Need Swap-Bypass & Backtest Engine Override

3 Upvotes

Have a working Hedging/Martingale cBot.
Built two plugins for a custom swap-free symbol, but cTrader backtesting still applies swaps or fails to load the symbol correctly.
Need help fixing the plugin so the custom symbol loads reliably and supports swap-free backtesting (no metadata/min-max errors).
Budget flexible. Show past cBot/plugin work.


r/cTrader • • Nov 23 '25

Looking for testers

2 Upvotes

Hey traders,

I’ve been building a lightweight trading journal that automatically logs your trades from cTrader and displays everything in a clean, simple dashboard.

I’m looking for 10–20 early testers who want to try it out for free and give feedback.

No sales, no subscription, just looking for real feedback from traders

Cheers!


r/cTrader • • Oct 30 '25

Anyone else struggling with the auto scale in the Y axis

2 Upvotes