MeanReversioncBotBullAndBear free

by srm_bcn in category Trend at 01/04/2020
Description

Only for Backtest

Making money in both directions

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

¿High probability and low risk operations?:
In this chart you can see a strong bearish trend, each bullish candle is an opportunity to sell

But trends don't last forever
If we all push the euro down, there comes a time when savvy investors discover a great opportunity in the undervaluation
You can also see the divergence between the price movement and the indicator, they anticipate that the reversion is approaching or not
You have to know when to start and when to quit

 

It is the same whit strong bullish trends, to buy on every bearish candle is a good opportunity while the trend lasts because developed markets are continuously reversing to the mean

I hope the newbies find their chance ;-)

Peace in the markets and unity against the covid

This is so, if you are not greedy and you respect the market perhaps the market will respect you

And when the children of Israel saw it, they said one to another, It is manna: for they wist not what it was. And Moses said unto them, This is the bread which the LORD hath given you to eat. Ex. 16.15

You can lose your money
But what you can't lose your faith
You have to defend and protect faith at all costs

This is why it is necessary to look for a high probability strategy (the best you can get with your knowledge, study first, if it wins 51 times out of 100 it's  already a winner), and be faithful to your strategy

The supreme in the art of war is to subdue the enemy without giving him battle. (Sun Tzu, about the 5th century BC)

How to make money without a single trade, without paying commissions, spreads or swaps? With two accounts, one in dollars and one in yens for example. But don't think it's easy to know at what time

If you have get tired of looking for your strategy and you have not found it, don't worry relax and let the pairs fight for you

It's the monk's or the nun's strategy

For a more understanding world with finances
Should not to demonize the market, this power is an atributte that does not correspond to it, it is better to study it and understand it for the benefit of all. The devil is everything that we do not understand. Or rather, where science ends, religion or superstition begins, each one chooses. Maybe may never know everything but have to study. Many are losing their jobs and need help. (He made Balaam's donkey speak and can too with a useless servant like me) Looking for signs on charts when the answer is in the hearts

In the game of life you were born to win, always help those who lose and you will have closed a perfect circle

Definitively, to find the balance, the harmony, is the key, to find the thin line that separates benefits and losses

I still have a lot to learn, very thanks Akemi Sensei, Chōwa

If you want to know something, read it.
If you want to learn something, practice it.
If you want to master something, teach it.
Very thanks Yogi Bhajan.

What we do is what we believe in.

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 MeanReversioncBotBullAndBear : 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)
                {
                    if (position.Label == "Buy")
                        ClosePosition(position);
                }

            if (mr.Result3.Last(1) == mr.Result1.Last(1))
                foreach (var position in Positions)
                {
                    if (position.Label == "Sell")
                        ClosePosition(position);
                }

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

        protected override void OnStop()
        {
        }
    }
}
Comments
0