Category Trend  Published on 06/05/2024

Monday Range Ctrader indicator

Description

The Monday Range Ctrader indicator  is a day range indicator, calculates and displays the high, low, open, close (OHLC) prices during a specified trading session, focusing on Mondays.
Monday Range Trading Strategy It is very simply based and you can easily combine it with other strategies and other indicators. 
Some features of CTrader's Monday range indicator:
The customizable days of the week : allow users to choose which days the indicator should consider for analysis.
In addition to the mentioned ranges, the user can also activate two Fibonacci ranges in the indicator.
Also, in addition to displaying the set day range, the indicator can be set to fill the candles of that range with the desired color.

Join our Telegram channel
 

There are many tutorial videos on YouTube that you can find with a simple search. Just search for "Monday range" to implement good trading strategies with this simple indicator


The user can also check the upper and lower range of other days with the indicator.
The user can change the color of the lines, their style and scars in the settings window.
It can also turn on or off the display mode of each of the lines.
Line name and price labels can also be enabled and disabled.

Range of Monday & ICT:
The trade strategy based on the trade range is actually introduced on the basis of ICT and it is suggested to increase the probability of success in orders from the Fair Value Gap and the data received from the market structure such as BOS and CHOCH and check liquidity. to be used.
In order to be able to effectively trade with the Monday range, I suggest two indicators: fair value gap finder and smart money concept ctrader.

Monday Range & Divergence:
Some trading strategies based on the range of Monday examine the divergence in the oscillators and use the divergences to confirm order entry.
If you are interested in carefully checking the divergences in RSI, I suggest you try the Rsi Alert Multi Timeframe Ctrader indicator.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using System.Globalization;

namespace cAlgo
{

    [Indicator(AccessRights = AccessRights.FullAccess, IsOverlay = true, TimeZone = TimeZones.UTC)]
    public class MondayRange : Indicator
    {
        [Parameter("Day", DefaultValue = DayOfWeek.Monday, Group = "Range")]
        public DayOfWeek Start_day { get; set; }
        [Parameter("Back weeks", DefaultValue = 3, Group = "Range")]
        public int Back_weeks { get; set; }
        [Parameter("Fill Bars", DefaultValue = false, Group = "Range")]
        public bool FillCandels { get; set; }
        [Parameter("Bar color", DefaultValue = "FFFFFFFF", Group = "Range")]
        public Color FillColor { get; set; }
        [Parameter("Show price label", DefaultValue = true, Group = "Range")]
        public bool Show_price_label { get; set; }
        [Parameter("Font size label", DefaultValue = 10, Group = "Range")]
        public int Font_size_label { get; set; }
        [Parameter("Line growth X days", DefaultValue = 0, Group = "Range", MinValue = 0)]
        public int Line_growth { get; set; }


        [Parameter("Show High", Group = "High Line Settings", DefaultValue = true)]
        public bool Show_high { get; set; }
        [Parameter("High line style", Group = "High Line Settings", DefaultValue = LineStyle.Solid)]
        public LineStyle HlineStyle { get; set; }
        [Parameter("High line Thickness", Group = "High Line Settings", DefaultValue = 3)]
        public int HThickness { get; set; }
        [Parameter("High line Color", Group = "High Line Settings", DefaultValue = "#FF007231")]
        public Color HColor { get; set; }

        [Parameter("Show Low", Group = "Low Line Settings", DefaultValue = true)]
        public bool Show_Low { get; set; }
        [Parameter("Low line style", Group = "Low Line Settings", DefaultValue = LineStyle.Solid)]
        public LineStyle LlineStyle { get; set; }
        [Parameter("Low line Thickness", Group = "Low Line Settings", DefaultValue = 3)]
        public int LThickness { get; set; }
        [Parameter("Low line Color", Group = "Low Line Settings", DefaultValue = "#FF007231")]
        public Color LColor { get; set; }

        [Parameter("Show Open", Group = "Open Line Settings", DefaultValue = true)]
        public bool Show_Open { get; set; }
        [Parameter("Open line style", Group = "Open Line Settings", DefaultValue = LineStyle.Lines)]
        public LineStyle OlineStyle { get; set; }
        [Parameter("Open line Thickness", Group = "Open Line Settings", DefaultValue = 2)]
        public int OThickness { get; set; }
        [Parameter("Open line Color", Group = "Open Line Settings", DefaultValue = "#FF922C72")]
        public Color OColor { get; set; }

        [Parameter("Show Close", Group = "Close Line Settings", DefaultValue = true)]
        public bool Show_Close { get; set; }
        [Parameter("Close line style", Group = "Close Line Settings", DefaultValue = LineStyle.Lines)]
        public LineStyle ClineStyle { get; set; }
        [Parameter("Close line Thickness", Group = "Close Line Settings", DefaultValue = 2)]
        public int CThickness { get; set; }
        [Parameter("Close line Color", Group = "Close Line Settings", DefaultValue = "#FF3F3F3F")]
        public Color CColor { get; set; }

        [Parameter("Show Fibo level 1 ", Group = "Fibo 1 Settings", DefaultValue = true)]
        public bool Show_Fibo1 { get; set; }
        [Parameter("Fibo level (%) ", Group = "Fibo 1 Settings", DefaultValue = "50")]
        public double FiboLevel_1 { get; set; }
        [Parameter("Fibo 1 line style", Group = "Fibo 1 Settings", DefaultValue = LineStyle.Dots)]
        public LineStyle F1lineStyle { get; set; }
        [Parameter("Fibo 1 line Thickness", Group = "Fibo 1 Settings", DefaultValue = 2)]
        public int F1Thickness { get; set; }
        [Parameter("Fibo 1 line Color", Group = "Fibo 1 Settings", DefaultValue = "#FFFE0000")]
        public Color F1Color { get; set; }

        [Parameter("Show Fibo level 2 ", Group = "Fibo 2 Settings", DefaultValue = false)]
        public bool Show_Fibo2 { get; set; }
        [Parameter("Fibo level (%) ", Group = "Fibo 2 Settings", DefaultValue = "61.8")]
        public double FiboLevel_2 { get; set; }
        [Parameter("Fibo 2 line style", Group = "Fibo 2 Settings", DefaultValue = LineStyle.Dots)]
        public LineStyle F2lineStyle { get; set; }
        [Parameter("Fibo 2 line Thickness", Group = "Fibo 2 Settings", DefaultValue = 2)]
        public int F2Thickness { get; set; }
        [Parameter("Fibo 2 line Color", Group = "Fibo 2 Settings", DefaultValue = "#FFFFC000")]
        public Color F2Color { get; set; }


        public Bars Currentbars;

        public ChartTrendLine Tline;
        public DateTime StartTime;
        public DateTime EndTime;
        public DateTime newyorkTime;
        public Bars bars_D1;
        public struct CustomRangeHighLow
        {
            public double High;
            public double Low;
        }
        protected override void Initialize()
        {
            ShowLines();
            Currentbars = MarketData.GetBars(Bars.TimeFrame, Symbol.Name);
            Currentbars.BarOpened += Currentbars_BarOpened;
        }



        private void Currentbars_BarOpened(BarOpenedEventArgs obj)
        {
            ShowLines();
        }
        public void ShowLines()
        {
            bars_D1 = MarketData.GetBars(TimeFrame.Daily, Symbol.Name);
            for (int i = bars_D1.Count - 2; i > 0; i--)
            {
                if (bars_D1[i].OpenTime.DayOfWeek == Start_day)
                {
                    var StartDraw = Bars.OpenTimes.GetIndexByTime(bars_D1[i].OpenTime);
                    var EndDraw = Bars.OpenTimes.GetIndexByTime(bars_D1[i + 1].OpenTime);
                    if (Bars[EndDraw].OpenTime >= bars_D1[i + 1].OpenTime)
                        EndDraw--;
                    //EndDraw += Line_growth;
                    double fibo1, fibo2;
                    ChartTrendLine line;
                    if (bars_D1[i].Close < bars_D1[i].Open)
                    {
                        fibo1 = ((bars_D1[i].High - bars_D1[i].Low) * (FiboLevel_1 / 100)) + bars_D1[i].Low;
                        fibo2 = ((bars_D1[i].High - bars_D1[i].Low) * (FiboLevel_2 / 100)) + bars_D1[i].Low;
                    }
                    else
                    {
                        fibo1 = bars_D1[i].High - ((bars_D1[i].High - bars_D1[i].Low) * (FiboLevel_1 / 100));
                        fibo2 = bars_D1[i].High - ((bars_D1[i].High - bars_D1[i].Low) * (FiboLevel_2 / 100));

                    }
                    if (Show_high)
                    {
                        line = Chart.DrawTrendLine("HLine " + bars_D1[i].OpenTime + " " + this.ToString(), Bars[StartDraw].OpenTime, bars_D1[i].High, Bars[EndDraw].OpenTime.AddDays(Line_growth), bars_D1[i].High, HColor, HThickness, HlineStyle);
                        if (Show_price_label)
                            Draw_text("text " + line.Name, "High", bars_D1[i].OpenTime, bars_D1[i].High, HColor);
                    }
                    if (Show_Low)
                    {
                        line = Chart.DrawTrendLine("LLine" + bars_D1[i].OpenTime + this.ToString(), Bars[StartDraw].OpenTime, bars_D1[i].Low, Bars[EndDraw].OpenTime.AddDays(Line_growth), bars_D1[i].Low, LColor, LThickness, LlineStyle);
                        if (Show_price_label)
                            Draw_text("text " + line.Name, "Low", bars_D1[i].OpenTime, bars_D1[i].Low, LColor);
                    }
                    if (Show_Open)
                    {
                        line = Chart.DrawTrendLine("OLine" + bars_D1[i].OpenTime + this.ToString(), Bars[StartDraw].OpenTime, bars_D1[i].Open, Bars[EndDraw].OpenTime.AddDays(Line_growth), bars_D1[i].Open, OColor, OThickness, OlineStyle);
                        if (Show_price_label)
                            Draw_text("text " + line.Name, "Open", bars_D1[i].OpenTime, bars_D1[i].Open, OColor);
                    }
                    if (Show_Close)
                    {
                        line = Chart.DrawTrendLine("CLine" + bars_D1[i].OpenTime + this.ToString(), Bars[StartDraw].OpenTime, bars_D1[i].Close, Bars[EndDraw].OpenTime.AddDays(Line_growth), bars_D1[i].Close, CColor, CThickness, ClineStyle);
                        if (Show_price_label)
                            Draw_text("text " + line.Name, "Close", bars_D1[i].OpenTime, bars_D1[i].Close, CColor);
                    }
                    if (Show_Fibo1)
                    {
                        line = Chart.DrawTrendLine("F1Line" + bars_D1[i].OpenTime + this.ToString(), Bars[StartDraw].OpenTime, fibo1, Bars[EndDraw].OpenTime.AddDays(Line_growth), fibo1, F1Color, F1Thickness, F1lineStyle);
                        if (Show_price_label)
                        {
                            Draw_text("text " + line.Name, $"{FiboLevel_1}%", bars_D1[i].OpenTime, Math.Round(fibo1, Symbol.Digits), F1Color);
                        }
                    }
                    if (Show_Fibo2)
                    {
                        line = Chart.DrawTrendLine("F2Line" + bars_D1[i].OpenTime + this.ToString(), Bars[StartDraw].OpenTime, fibo2, Bars[EndDraw].OpenTime.AddDays(Line_growth), fibo2, F2Color, F2Thickness, F2lineStyle);
                        if (Show_price_label)
                        {
                            Draw_text("text " + line.Name, $"{FiboLevel_2}%", bars_D1[i].OpenTime, Math.Round(fibo2, Symbol.Digits), F2Color);
                        }
                    }
                    if (FillCandels)
                    {
                        for (int j = Bars.OpenTimes.GetIndexByTime(bars_D1[i].OpenTime); j <= Bars.OpenTimes.GetIndexByTime(bars_D1[i + 1].OpenTime); j++)
                        {
                            if (Bars[j].OpenTime < bars_D1[i + 1].OpenTime)
                                Chart.SetBarFillColor(j, FillColor);
                        }
                    }
                    Back_weeks--;
                    if (Back_weeks == 0) break;
                }
            }
            void Draw_text(string name, string label, DateTime dateTime, double Y, Color color)
            {
                var text = Chart.DrawText(name, $"{label}({Y})", dateTime, Y, color);
                text.FontSize = Font_size_label;
                text.VerticalAlignment = VerticalAlignment.Center;
                text.HorizontalAlignment = HorizontalAlignment.Left;
            }
        }
        public override void Calculate(int index)
        {

        }
    }
}

AlgoCreators's avatar
AlgoCreators

Joined on 16.01.2022

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Monday Range.algo
  • Rating: 5
  • Installs: 271
Comments
Log in to add a comment.
AlgoCreators's avatar
AlgoCreators · 1 month ago

RE: forexmoney22

Hello dear friend, thank you for your nice comment.  Your comments give me energy.

ForexMoney22's avatar
ForexMoney22 · 1 month ago

Great work mate! Love that you gave us the freedom to customize and experiment. I use it with your Smart money Assistant and FVG finder. For folks with not much time to trade, use h4 timeframe and enter small positions when it breaks and closes outside monday range and target 50% fib of mondayrange. Alternatively you can also use RSI Alert MTF Indicator and wait for mondayrange breakout and h1/h4 overbought/obersold notification. If you have any suggestions post it here or contact algocreator via telegram, his costumer support is exceptional. Cheers and Happy Trading!