Page 2 of 2

Re: Weekly Journal Review: The Questions That Matter

Posted: Wed Sep 23, 2026 9:57 am
by PTScalper
cTrader Version (C# cBot)

1.) Open cTrader and go to the Automate tab (on the left menu).

2.) Click New cBot and name it WeeklyJournalDashboard.

3.) Replace all the default code in the editor with the following:

Code: Select all

using System;
using System.Linq;
using cAlgo.API;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class WeeklyJournalDashboard : Robot
    {
        // Use text Labels to identify your setups
        [Parameter("Setup A Label", DefaultValue = "Setup A")]
        public string SetupALabel { get; set; }

        [Parameter("Setup B Label", DefaultValue = "Setup B")]
        public string SetupBLabel { get; set; }

        protected override void OnStart()
        {
            // Set a 1-second timer to update the dashboard even when markets are closed
            Timer.Start(TimeSpan.FromSeconds(1));
            UpdateDashboard(); // Run it immediately once on startup
        }

        protected override void OnTimer()
        {
            UpdateDashboard();
        }

        private void UpdateDashboard()
        {
            int weekWins = 0, weekLosses = 0;
            double grossWin = 0, grossLoss = 0;
            
            int setupAWins = 0, setupALosses = 0;
            int setupBWins = 0, setupBLosses = 0;

            // Determine the start time of the current week (Assuming a Monday start)
            DateTime now = Server.Time;
            int diff = (7 + (now.DayOfWeek - DayOfWeek.Monday)) % 7;
            DateTime weekStart = now.Date.AddDays(-1 * diff).Date; // .Date strips the time to 00:00:00

            // Query cTrader's History API for trades closed this week
            var thisWeekTrades = History.Where(t => t.ClosingTime >= weekStart);

            foreach (var trade in thisWeekTrades)
            {
                // NetProfit automatically accounts for commissions and swaps in cTrader
                if (trade.NetProfit > 0)
                {
                    weekWins++;
                    grossWin += trade.NetProfit;

                    if (trade.Label == SetupALabel) setupAWins++;
                    else if (trade.Label == SetupBLabel) setupBWins++;
                }
                else if (trade.NetProfit < 0)
                {
                    weekLosses++;
                    grossLoss += Math.Abs(trade.NetProfit);

                    if (trade.Label == SetupALabel) setupALosses++;
                    else if (trade.Label == SetupBLabel) setupBLosses++;
                }
            }

            // 1. Calculate Overall Win Rate
            int totalTrades = weekWins + weekLosses;
            double winRate = totalTrades > 0 ? ((double)weekWins / totalTrades) * 100 : 0.0;

            // 2. Calculate Realized R:R Ratio
            double avgWin = weekWins > 0 ? grossWin / weekWins : 0.0;
            double avgLoss = weekLosses > 0 ? grossLoss / weekLosses : 0.0;
            double rrRatio = avgLoss > 0 ? avgWin / avgLoss : 0.0;

            // 3. Calculate Setup Win Rates
            int totalA = setupAWins + setupALosses;
            double winRateA = totalA > 0 ? ((double)setupAWins / totalA) * 100 : 0.0;

            int totalB = setupBWins + setupBLosses;
            double winRateB = totalB > 0 ? ((double)setupBWins / totalB) * 100 : 0.0;

            // 4. Render the Dashboard text
            string dashboard = "========== WEEKLY REVIEW ==========\n\n";
            
            dashboard += "1. Win Rate This Week:\n";
            dashboard += $"   {totalTrades} Trades | {winRate:F2}%\n\n";
            
            dashboard += "2. Avg Realized R:R:\n";
            dashboard += $"   1 : {rrRatio:F2}\n\n";
            
            dashboard += "3. Setup Performance:\n";
            dashboard += $"   {SetupALabel}: {totalA} Trades | {winRateA:F2}%\n";
            dashboard += $"   {SetupBLabel}: {totalB} Trades | {winRateB:F2}%\n\n";
            
            dashboard += "4. Rule Deviations?\n";
            dashboard += "   [ Check journal for manual deviations ]\n";
            
            dashboard += "===================================";

            // Draw the dashboard directly to the top-left corner of the chart
            Chart.DrawStaticText("JournalDash", dashboard, VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);
        }

        protected override void OnStop()
        {
            // Remove the dashboard from the chart when the bot is stopped
            Chart.RemoveObject("JournalDash");
        }
    }
}

Re: Weekly Journal Review: The Questions That Matter

Posted: Wed Sep 23, 2026 9:58 am
by PTScalper
How to use this in cTrader:

1.) Click the Build button (the hammer icon) at the top of the Automate window.

2.) Go back to your regular chart view, find WeeklyJournalDashboard in the cBots list (left side panel), and drag it onto your chart.

3.) Important for tracking Setups: In cTrader, whenever you open a trade manually (via the "New Order" window) or via another automated bot, there is a field called "Label" (you may have to expand the Advanced settings to see it on manual trades).

4.) Type Setup A or Setup B into the Label field when you execute trades throughout the week. The cBot will read the History API, scan those text strings, and sort them into the correct categories automatically.

5.) The dashboard is rendered using Chart.DrawStaticText, meaning it will sit cleanly out of the way of your candlesticks and drawing tools.

Re: Weekly Journal Review: The Questions That Matter

Posted: Sat Oct 03, 2026 2:07 pm
by Fairman
Looks handy. My only worry with automating the review is it turns into staring at numbers. Whether I actually followed the plan still needs a human going through the screenshots.

Re: Weekly Journal Review: The Questions That Matter

Posted: Sat Oct 31, 2026 4:02 pm
by FXS Prop Desk
Weekly win rate and average R in one table is a good start. A third row that tends to be useful is the number of trades that broke a rule. Win rate and R describe the market's behaviour as much as the trader's, and a single week is too short to separate the two. Rule breaks are fully under the trader's control, and they can be counted precisely. A week with a poor win rate but zero rule breaks is a good week in process terms, and the table would make that visible.

Re: Weekly Journal Review: The Questions That Matter

Posted: Sat Oct 31, 2026 4:47 pm
by GrahamW1972
FXS Prop Desk wrote:Rule breaks are fully under the trader's control, and they can be counted precisely.
FXS Prop Desk, spot on, and a single week is bloody tiny for judging win rate anyway. I keep a tally of rule breaks in the margin and tag each one with why i did it (bored, chasing, tired), because after a month the "why" was far more useful than the count itself... cheers for the nudge though.

Re: Weekly Journal Review: The Questions That Matter

Posted: Thu Nov 05, 2026 8:47 pm
by FXS Prop Desk
GrahamW1972 wrote: I keep a tally of rule breaks in the margin and tag each one with why i did it (bored, chasing, tired)
Graham, the why column is the better half, agreed. Putting the clock time next to each reason squeezes a bit more out of it. Bored and chasing often sit in different parts of the day, boredom in the midday lull and chasing after an early move was missed, and once that shows up the fix becomes a schedule change instead of more willpower. Tired tends to be the easiest one to act on, because it gathers at the end of the session and a hard stop time handles most of it.