Topics

Forum Topics not found

Replies

ctid2407925
30 Jun 2021, 02:39 ( Updated at: 30 Jun 2021, 02:40 )

Please vote on this Older Request to add up, is in the link below

 


@ctid2407925

ctid2407925
10 Sep 2020, 21:41

RE:

Hi, thank you for the great work that you are making on your platform, it is very enjoyable to trade with a modern platform.

I like to ask if you have any update on the release of the Backtesting of renko charts, if there is any beta program i will join 

Thank you again.

Best Regards

 

PanagiotisCharalampous said:

Hi BullittTraders,

We do not have an ETA for this feature yet.

Best Regards,

Panagiotis

 


@ctid2407925

ctid2407925
06 Sep 2020, 04:16

RE:

Hi, is it possible to have the .dll, i was able to clone the repository but i was not able to build it i do not have visual studio. Thanks

afhacker said:

Hello,

I want to share the code that I use for backtesting Renko/Range bots on cTrader, follow the below instruction:

  1. Clone the "cAlgo.API.Extensions.Series" repo, and build it
  2. Reference the library on your Indicator/cBot
  3. Use the sample below to implement it on your cBot code. 
using cAlgo.API;
using cAlgo.API.Extensions.Enums;
using cAlgo.API.Extensions.Models;
using cAlgo.API.Extensions.Series;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class RenkoBot : Robot
    {
        // Use RangeMarketSeries for Range bars
        private RenkoMarketSeries _renkoSeries;

        private MovingAverage _ma;

        [Parameter("Size (Pips)", DefaultValue = 10)]
        public double RankoSizeInPips { get; set; }

        protected override void OnStart()
        {
            _renkoSeries = new RenkoMarketSeries(RankoSizeInPips, Symbol, this);

            _renkoSeries.OnBar += RenkoSeries_OnBar;

            // You can initialize cTrader indicators 
            _ma = Indicators.MovingAverage(_renkoSeries.Close, 10, MovingAverageType.Exponential);
        }

        protected override void OnTick()
        {
            // The Renko/Range market series OnTick method must be called on each new up coming ticks
            _renkoSeries.OnTick();
        }

        // This method is called on new Renko/Range bars, you should use this method instead of OnBar method of your Robot
        private void RenkoSeries_OnBar(object sender, OhlcBar newBar, OhlcBar oldBar)
        {
            if (newBar.Type == BarType.Bullish)
            {
                ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 1000, string.Empty, 10, 20);
            }
            else if (newBar.Type == BarType.Bearish)
            {
                ExecuteMarketOrder(TradeType.Sell, Symbol.Name, 1000, string.Empty, 10, 20);
            }
        }
    }
}

 

 


@ctid2407925