Category Trend  Published on 26/04/2024

FREE BOT 8 Years Profitability/ 6.6% per Month

Description

 

NOW YOU CAN GET THIS BOT FOR FREE

Download on this Website

The Bot is preset with the right optimization.

 

1 Trendrobot 8 Years Backtesting compatible with Prop Firms

Profitable algo which trades the EURUSD

6.6% return per Month in the last 8 Years

Backtesting from 11.05.2016-11.05.2024 with Tick Data and 0.1 Lot

 

 

In the last 8 years, it has generated an average of 40.10 Euros per Month with 600,- startcapital employed (6.6% return per Month), without the drawdown having been hit. (With 0.1 Lot)

 

With EURUSD trading, it is the largest and most liquid exchange: The Foreign Exchange. Thus, you can move larger sums of money in the market without any problems.

 

The Commissions now are only 30 per Million, not like in the backtest 35.

 

Time Horizon: Renko 5 Pips

The trades are held from one day to several weeks

Profitfactor: 1.94

Max Drawdown: 93% (by 600,- Euro)

average annual return: 79%

average Monthly return: 6.6%

Total Trades: 316

Winning Trades: 262

average Trades per Month: 3-4

No Martingale

Free to use for all Lotsizes and Assets

Just 1 Trade open always

100% automatic, runs 24h

recognizes open positions, so you can stopp in between

Ready to go immediately

100% made in Germany

 

 

I recommend starting with 0.1 Lot per 600,- Euro (last 8-Year max Drawdown 560,70/ by return of 40.10 per Month) of Capital on IC Markets. And you have to add the margin for 0.1 Lot, which depends on the leverage of your Broker.

If you want to use 0.2 lots, then use 1200,- Euro starting capital etc.

I strongly recommend using this bot with these parameter settings only for IC markets because I have optimized it only for this broker. With other brokers, the results can vary greatly in the Backtest. So test it for all other brokers beforehand.  

 

email: german.algotrading@gmail.com

 

Please contact me for any questions.

Best regards,

Luke

 

 

 


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 TrendAlgo : Robot
    {
        [Parameter(DefaultValue = "Trend Algo 3 Timeframe Re5")]
        public string cBotLabel { get; set; }

        [Parameter("Currency pair", DefaultValue = "EURUSD")]
        public string TradeSymbol { get; set; }

        [Parameter("Lot Size", DefaultValue = 0.1, MinValue = 0.01, Step = 0.01)]
        public double LotSize { get; set; }

        [Parameter("MA Type", DefaultValue = MovingAverageType.Hull)]
        public MovingAverageType MAType { get; set; }

        [Parameter("MA Period", DefaultValue = 132)]
        public int MAPeriod { get; set; }

        [Parameter("Signal candle,in bars", DefaultValue = 0, MinValue = 0)]
        public int SignalCandle { get; set; }

        [Parameter("Fixed TP", DefaultValue = true)]
        public bool UseTP { get; set; }

        [Parameter("TP Level", DefaultValue = 55.3)]
        public double TakeProfit { get; set; }

        [Parameter("TrailingStop", DefaultValue = true)]
        public bool UseTS { get; set; }

        [Parameter("Trailing Trigger", DefaultValue = 7.7)]
        public double TrailingTrigger { get; set; }

        [Parameter("Trailing Pips", DefaultValue = 26.1)]
        public double TrailingPips { get; set; }

        [Parameter("Reverse Trading", DefaultValue = true)]
        public bool ReverseTrading { get; set; }

        [Parameter("Nur Long Trades eröffnen", DefaultValue = false)]
        public bool OnlyLongTrades { get; set; }

        [Parameter("Nur Short Trades eröffnen", DefaultValue = false)]
        public bool OnlyShortTrades { get; set; }

        private MovingAverage MA;

        protected override void OnStart()
        {
            // Erkennung offener Positionen beim Start
            RecognizeOpenPositions();

            // Überprüfung des Symbols
            Symbol CurrentSymbol = Symbols.GetSymbol(TradeSymbol);

            if (CurrentSymbol == null)
            {
                Print("Currency pair is not supported, please check!");
                OnStop();
            }

            // Initialisiere den Moving Average
            MA = Indicators.MovingAverage(MarketSeries.Close, MAPeriod, MAType);
        }

        private void RecognizeOpenPositions()
        {
            // LINQ-Abfrage, um offene Positionen zu erkennen
            var openPositions = Positions.Where(position => position.SymbolCode == TradeSymbol);

            if (openPositions.Any())
            {
                foreach (var position in openPositions)
                {
                    Print($"Erkannte offene Position: {position.Label}, Volumen: {position.Volume}, Typ: {position.TradeType}");
                    // Hier kannst du weitere Logik hinzufügen, um auf die offenen Positionen zu reagieren
                }
            }
            else
            {
                Print("Keine offenen Positionen gefunden.");
            }
        }

        protected override void OnBar()
        {
            if (!ReverseTrading)
            {
                if (!OnlyShortTrades && MA.Result.Last(SignalCandle) < MarketSeries.Close.Last(SignalCandle) && MA.Result.Last(SignalCandle) > MarketSeries.Low.Last(SignalCandle) && Positions.FindAll(cBotLabel, TradeSymbol, TradeType.Buy).Length == 0)
                {
                    ClosePosition(TradeType.Sell);
                    OpenMarketOrder(TradeType.Buy, TradeSymbol, LotSize);
                }
                else if (!OnlyLongTrades && MA.Result.Last(SignalCandle) > MarketSeries.Close.Last(SignalCandle) && MA.Result.Last(SignalCandle) < MarketSeries.High.Last(SignalCandle) && Positions.FindAll(cBotLabel, TradeSymbol, TradeType.Sell).Length == 0)
                {
                    ClosePosition(TradeType.Buy);
                    OpenMarketOrder(TradeType.Sell, TradeSymbol, LotSize);
                }
            }
            else
            {
                if (!OnlyLongTrades && MA.Result.Last(SignalCandle) > MarketSeries.Close.Last(SignalCandle) && MA.Result.Last(SignalCandle) < MarketSeries.High.Last(SignalCandle) && Positions.FindAll(cBotLabel, TradeSymbol, TradeType.Buy).Length == 0)
                {
                    ClosePosition(TradeType.Sell);
                    OpenMarketOrder(TradeType.Buy, TradeSymbol, LotSize);
                }
                else if (!OnlyShortTrades && MA.Result.Last(SignalCandle) < MarketSeries.Close.Last(SignalCandle) && MA.Result.Last(SignalCandle) > MarketSeries.Low.Last(SignalCandle) && Positions.FindAll(cBotLabel, TradeSymbol, TradeType.Sell).Length == 0)
                {
                    ClosePosition(TradeType.Buy);
                    OpenMarketOrder(TradeType.Sell, TradeSymbol, LotSize);
                }
            }
        }

        protected override void OnTick()
        {
            if (UseTS == true && Positions.FindAll(cBotLabel, TradeSymbol).Length > 0)
                DoTrailingStop();
        }

        private void ClosePosition(TradeType tradeType)
        {
            foreach (var position in Positions.FindAll(cBotLabel, TradeSymbol, tradeType))
            {
                var result = ClosePosition(position);
                if (!result.IsSuccessful)
                {
                    Print("Closing market order error: {0}", result.Error);
                    OnStop();
                }
            }
        }

        private void OpenMarketOrder(TradeType tradeType, string strSymbol, double dLots)
        {
            var volumeInUnits = Symbol.QuantityToVolumeInUnits(dLots);
            volumeInUnits = Symbol.NormalizeVolumeInUnits(volumeInUnits, RoundingMode.Down);
            double TP_in_pips = 0.0;
            if (UseTP == true)
                TP_in_pips = TakeProfit;

            var result = ExecuteMarketOrder(tradeType, strSymbol, volumeInUnits, cBotLabel, 0, TP_in_pips);
            if (!result.IsSuccessful)
            {
                Print("Execute Market Order Error: {0}", result.Error.Value);
                OnStop();
            }
        }

        private void DoTrailingStop()
        {
            var cBotPositions = Positions.FindAll(cBotLabel, TradeSymbol);

            foreach (var position in cBotPositions)
            {
                if (position.TradeType == TradeType.Buy && position.Pips >= TrailingTrigger && !position.HasTrailingStop)
                {
                    var newSL = position.TradeType == TradeType.Buy ? (position.EntryPrice + (TrailingPips * Symbol.PipSize)) : (position.EntryPrice - (TrailingPips * Symbol.PipSize));
                    ModifyPosition(position, newSL, position.TakeProfit, true);
                }
            }
        }

        protected override void OnStop()
        {
            // Code zum Beenden des Bots
        }
    }
}


german.algotrading's avatar
german.algotrading

Joined on 22.04.2024

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Trend Algo 3 Renko Chart 5 Pips.algo
  • Rating: 0
  • Installs: 87
  • Modified: 23/10/2024 08:52
Comments
Log in to add a comment.
No comments found.