MeanReversioncBotBull free

by srm_bcn in category Trend at 01/04/2020

Only for backtest

To buy euros or pounds is not a sin (when uptrend)
Sin is always nagging old mom Europe where many Americans have their roots and their ancestors
It is not good for any tree to cut its roots, its food comes from its roots sunk in the mud so that your new leaves shine at the sun

Run the robot

Buying on each candle and closing positions when the indicator gives the signal

It works very well until the market goes downtrend

There is a lot of risk in the market, be careful

Let me insist that there is great danger in playing reversion, even large banks have ended up completely ruined.
The set of indicators and bots that I have published only serve to study the market and map possible non-automatic strategies to search entry and exit points with high probability of succes and nothing else



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.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 MeanReversioncBotBull : Robot
        private MeanReversion mr;

        protected override void OnStart()
            mr = Indicators.GetIndicator<MeanReversion>();

        protected override void OnBar()
            if (mr.Result3.Last(1) == mr.Result2.Last(1))
                foreach (var position in Positions)

            ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 1000, "Buy");

        protected override void OnStop()