MACD Market Timer v2 free

by carneiroads in category Trend at 01/10/2022

Bot MACD opens positions at the close of bars, macd signal in favor of the trend. 
Just turn on the robot on buy or sell sentiment

50% Automatic

If you turn the robot in favor of the trend, and the market goes against it, normally the robot will not open orders.


Símbolo EUR/GBP M30,


Trend analysis required when turning on the robot.





Neste exemplo abaixo temos uma tendência de baixa, o teste de resistência acontece nas regiões marcadas com a seta, o ideal é ligar o robô logo após o preço ficar abaixo da média móvel de 50 períodos no setor de venda. 


no momento o preço está em uma região de suporte o alvo é a mídia de 50 periudos para iniciar a venda do sentimento do 








Warning! Executing the following cBot may result in loss of funds. Use it at your own risk.
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgo
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;

namespace cAlgo.Robots
    [Robot(AccessRights = AccessRights.None)]
    public class MACDMarketTimerV2 : Robot
     [Parameter("Sentiment: Buy", DefaultValue = true)]
        public bool Buy { get; set; }

        [Parameter("Sentiment: Sell", DefaultValue = true)]
        public bool Sell { get; set; }
        [Parameter("MME Slow", Group = "MA", DefaultValue = 16)]
        public int mmeSlow { get; set; }

        [Parameter("MME Fast", Group = "MA", DefaultValue = 12)]
        public int mmeFast { get; set; }
        [Parameter("Source", Group = "RSI")]
        public DataSeries Source { get; set; }

        [Parameter("Periods", Group = "RSI", DefaultValue = 19)]
        public int Periods { get; set; }

        [Parameter("Start Hour", DefaultValue = 10.0)]
        public double StartTime { get; set; }

        [Parameter("Stop Hour", DefaultValue = 12.0)]
        public double StopTime { get; set; }
        [Parameter(" Period", Group="MACD",DefaultValue = 9)]
        public int Period { get; set; }

        [Parameter(" Long Cycle",Group="MACD", DefaultValue = 26)]
        public int LongCycle { get; set; }

        [Parameter(" Short Cycle",Group="MACD", DefaultValue = 12)]
        public int ShortCycle { get; set; }
        [Parameter("Quantity (Lots)", Group = "Volume", DefaultValue = 0.01, MinValue = 0.01, Step = 0.01)]
        public double Quantity { get; set; }
        [Parameter("Stop Loss ", DefaultValue = 100)]
        public int StopLoss { get; set; }

        [Parameter("Take Profit", DefaultValue = 100)]
        public int TakeProfit { get; set; }
        private MovingAverage i_MA_slow;
        private MovingAverage i_MA_fast;
        private RelativeStrengthIndex rsi;
        private DateTime _startTime;
        private DateTime _stopTime;               
        private MacdCrossOver macd;
        private double volumeInUnits;
        protected override void OnStart()
            i_MA_slow = Indicators.MovingAverage(Bars.ClosePrices, mmeSlow, MovingAverageType.Exponential);
            i_MA_fast = Indicators.MovingAverage(Bars.ClosePrices, mmeFast, MovingAverageType.Exponential);
            rsi = Indicators.RelativeStrengthIndex(Source, Periods);
            macd=Indicators.MacdCrossOver(LongCycle, ShortCycle, Period);
            volumeInUnits = Symbol.QuantityToVolumeInUnits(Quantity);
            _startTime = Server.Time.Date.AddHours(StartTime);
            _stopTime = Server.Time.Date.AddHours(StopTime);

            Print("Start Time {0},", _startTime);
            Print("Stop Time {0},", _stopTime);
        protected override void OnBar()
        var MACDLine  = macd.MACD.Last(1);
        var PrevMACDLine = macd.MACD.Last(2);
        var Signal  = macd.Signal.Last(1);
        var PrevSignal= macd.Signal.Last(2);
        if (Trade.IsExecuting) return;

            var currentHours = Server.Time.TimeOfDay.TotalHours;
            bool tradeTime = StartTime < StopTime
                ? currentHours > StartTime && currentHours < StopTime
                : currentHours < StopTime || currentHours > StartTime;

            if (!tradeTime)
           if (rsi.Result.LastValue > 25 && rsi.Result.LastValue < 70)
               if   ((MACDLine > Signal & PrevMACDLine <PrevSignal & default==Sell) & (i_MA_fast.Result.LastValue > i_MA_slow.Result.LastValue))
                     ExecuteMarketOrder( TradeType.Buy  ,SymbolName,volumeInUnits, "MACDMarketTimerV2,RSI,MACD",StopLoss,TakeProfit);
                            else if ( (MACDLine < Signal & PrevMACDLine >PrevSignal && default== Buy)&(i_MA_fast.Result.LastValue < i_MA_slow.Result.LastValue))
                     ExecuteMarketOrder( TradeType.Sell ,SymbolName,volumeInUnits, " MACDMarketTimerV2,RSI,MACD",StopLoss,TakeProfit);
           protected override void OnStop()



pomofe4534 - October 08, 2022 @ 21:33

Is it really working? Can we make it work on Stumble Guys Mod APk? As it is the best-modified version of Fall Guys, also it has few features of Fall Guys too. 

darrenbell006 - October 19, 2022 @ 00:48

I was looking for top-grade economic essay examples for several hours. Fortunately, I stopped searching when reached the site. The examples there match the highest quality.

vorcy1942 - December 01, 2022 @ 07:44

I'm surprised to see that my thesis will even contain some findings, although no research has been done by me/my writer. I would never be able to create and submit the dissertation I'll submit using expert research paper help. And the most surprising thing is pricing. I thought ordering a thesis would cost me a fortune, but it turned out that I was wrong.

VEI5S6C4OUNT0 - December 06, 2022 @ 11:52

I found this very useful but it has a problem of trading when the RSI is flat in the middle range. Is there a way to tell it NOT to execute for example RSI 45-55 range ?

marniery01 - January 17, 2023 @ 10:03

Anyone try that code? Is it works on GetModNow?