1000%/year BOLLINGER BANDS EUR-USD H8 free

by nghiand.amz in category Trend at 11/09/2020
Description

This bot use Bollinger bands to trade, After many time backtest I have  good parameters to take profit on this trading system.

The following show the result on Free Version And Pro version (Now pro version is free and and post on these now)

Donation via Paypal

Email: nghiand.amz@gmail.com

Facebook: https://www.facebook.com/nghiand.amz

Telegram: +84 969228100

Free version:

Parameter:

-Source, BandPeriods,Std,MAType: Is Bollinger Bands parameters,

-Initial Volume Percent: % money you trade (default 1% balance)

-Stop Loss: Stop Loss on Pip

-Take Profit: Take Profit by Pip


 

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 DragonBollingerBandsPro : Robot
    {
        [Parameter("Source")]
        public DataSeries Source { get; set; }
        [Parameter("BandPeriods", DefaultValue = 19)]
        public int BandPeriod { get; set; }
        [Parameter("Std", DefaultValue = 1.6)]
        public double std { get; set; }
        [Parameter("MAType")]
        public MovingAverageType MAType { get; set; }
        [Parameter("Initial Volume Percent", DefaultValue = 1, MinValue = 0)]
        public double InitialVolumePercent { get; set; }
        [Parameter("Stop Loss", DefaultValue = 80)]
        public int StopLoss { get; set; }
        [Parameter("Take Profit", DefaultValue = 60)]
        public int TakeProfit { get; set; }
        [Parameter("MaxFail", DefaultValue = 1)]
        public int MaxFail { get; set; }
        [Parameter(DefaultValue = 1)]
        public int MaxPosition { get; set; }
        [Parameter("Trailing Stop", DefaultValue = false)]
        public bool TrailingStop { get; set; }

        private Position lastPosition;

        private int countFalse = 0;

        private BollingerBands boll;
        private double lastVolume;

        private string _label;

        protected override void OnStart()
        {
            // Put your initialization logic here
            boll = Indicators.BollingerBands(Source, BandPeriod, std, MAType);
            _label = string.Format("DragonBollingerPro{0}", Guid.NewGuid());
        }

        protected override void OnBar()
        {

            if (Positions.FindAll(_label).Length >= MaxPosition)
            {
                return;
            }



            if (Bars.Last(2).Close > boll.Top.Last(2))
            {
                if (Bars.Last(1).Close > boll.Top.Last(1))
                {
                    CreateOrder(TradeType.Buy);

                }
                else
                {
                    CreateOrder(TradeType.Sell);

                }
            }
            else if (Bars.Last(2).Close < boll.Bottom.Last(2))
            {
                if (Bars.Last(1).Close < boll.Bottom.Last(1))
                {
                    CreateOrder(TradeType.Sell);
                }
                else
                {

                    CreateOrder(TradeType.Buy);
                }
            }


        }

        private void CreateOrder(TradeType type)
        {
            var volumne = Math.Floor(Account.Balance * 10 * InitialVolumePercent / 1000) * 1000;


            if (lastPosition != null)
            {
                Print("countFalse: {0}", countFalse);
                if (lastPosition.NetProfit < 0 && countFalse < MaxFail)
                {
                    volumne = lastVolume * 2;
                    countFalse = countFalse + 1;
                }
                else
                {
                    countFalse = 0;
                }
            }

            var result = ExecuteMarketOrder(type, Symbol.Name, volumne, _label, StopLoss, TakeProfit, "new Order", TrailingStop);
            if (result.IsSuccessful)
            {
                lastPosition = result.Position;
                lastVolume = volumne;
                Print("volume:" + volumne);
            }
        }

        protected override void OnTick()
        {
            // Put your core logic here
        }

        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }
    }
}
Comments

trading.ternet - September 15, 2020 @ 11:17

Thank you  nghiand for cBot
Just a suggestion on this script :
On initialization : Chart.DrawStaticText ... crashes Optimization and backtest without visual mode test
Just add

if (RunningMode == RunningMode.RealTime || RunningMode == RunningMode.VisualBacktesting)
    Chart.DrawStaticText("download_PRO"...........
Without this, optimization gives all the line with zero result.
Have a good day
Michel

nghiand.amz - September 16, 2020 @ 19:26

Hi trading.ternet ,

I've just fixed it,

Thank you.

dm1988air - November 24, 2020 @ 13:09

Waste of time. At least free version and parameters from description. -99% of cash in my demo account disapeared :D

ahnmaak - December 09, 2020 @ 02:08

Is the Pro Version Still Available? Gumroad link is no longer up.

nghiand.amz - December 09, 2020 @ 02:31

I removed Proversion on GUMROAD and add it here. You can download it for free, if you like it  you can

Donate via Paypal

0