Replies

Mia999
08 Jan 2022, 06:34

So I was able to find the solution myself.

For future reference (it might help others), what I have done is: I modified references to be "public" instead of "private" where possible, both in the indicator and in the cBot. And in the cBot, I added { get; set; } to these references where possible.

So the indicator introduction now looks like this (see last section cited herein):

using System;
using cAlgo.API;
using System.Linq;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class WeisWavesTraderExperto : Indicator
    {
        public enum Multi
        {
            Pips = 10,
            Unit = 100,
            Point = 1
        }

        public enum devi
        {
            Price = 1,
            ATR = 2
        }
        [Parameter("Deviation Size", Group = "Deviations Settings", DefaultValue = Multi.Unit)]
        public Multi Multiplier { get; set; }

        [Parameter("Deviation", Group = "Deviations Settings", DefaultValue = 50, MinValue = 1)]
        public int Deviation { get; set; }

        [Parameter("Sell Histogram Negative", Group = "Histogram Settings", DefaultValue = false)]
        public bool change { get; set; }

        [Output("UpVolume", LineColor = "DarkViolet", PlotType = PlotType.Histogram, Thickness = 5)]
        public IndicatorDataSeries UpVolume { get; set; }

        [Output("DownVolume", LineColor = "White", PlotType = PlotType.Histogram, Thickness = 5)]
        public IndicatorDataSeries DownVolume { get; set; }

        [Parameter("Atr Multiplier", Group = "ATR Settings", DefaultValue = 1.5, MinValue = 0, MaxValue = 10)]
        public double atrMultiplier { get; set; }

        [Parameter("Atr Period", Group = "ATR Settings", DefaultValue = 13, MinValue = 1)]
        public int atrPeriod { get; set; }

        [Parameter("Deviation Type", Group = "Deviations Settings", DefaultValue = devi.ATR)]
        public devi deviationType { get; set; }


        public int lastHighIndex = 0;
        public int lastLowIndex = 0;
        public double _point;
        public DataSeries CurrentClose;
        public IndicatorDataSeries Direction;
        public IndicatorDataSeries DownBuffer;
        private AverageTrueRange _averageTrueRange;
        public double DeviationAtr;
        public bool deviationPrice = true;
        public double deviationValue;


        protected override void Initialize()
        {

[...]

 

And the cBot introduction now looks like this (see last section cited herein):

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Bot3_1 : Robot
    {

        [Parameter("Quantity (Lots)", Group = "Volume", DefaultValue = 0.1, MinValue = 0.01, Step = 0.01)]
        public double Quantity { get; set; }



        public enum Multi
        {
            Pips = 10,
            Unit = 100,
            Point = 1
        }

        public enum devi
        {
            Price = 1,
            ATR = 2
        }

        [Parameter("Deviation Size", Group = "Deviations Settings", DefaultValue = Multi.Unit)]
        public Multi Multiplier { get; set; }

        [Parameter("Deviation", Group = "Deviations Settings", DefaultValue = 50, MinValue = 1)]
        public int Deviation { get; set; }

        [Parameter("Sell Histogram Negative", Group = "Histogram Settings", DefaultValue = false)]
        public bool change { get; set; }

        [Output("UpVolume", LineColor = "DarkViolet", PlotType = PlotType.Histogram, Thickness = 5)]
        public IndicatorDataSeries UpVolume { get; set; }

        [Output("DownVolume", LineColor = "White", PlotType = PlotType.Histogram, Thickness = 5)]
        public IndicatorDataSeries DownVolume { get; set; }

        [Parameter("Atr Multiplier", Group = "ATR Settings", DefaultValue = 1.5, MinValue = 0, MaxValue = 10)]
        public double atrMultiplier { get; set; }

        [Parameter("Atr Period", Group = "ATR Settings", DefaultValue = 13, MinValue = 1)]
        public int atrPeriod { get; set; }

        [Parameter("Deviation Type", Group = "Deviations Settings", DefaultValue = devi.ATR)]
        public devi deviationType { get; set; }



        public IndicatorDataSeries Result { get; set; }
        public TradeType TradeType { get; set; }
        public double ClosePrices { get; set; }

        string label = "Bot 3.1";
        public Position[] BotPositions
        {
            get { return Positions.FindAll(label, SymbolName, TradeType); }
        }

        public int lastHighIndex = 0;
        public int lastLowIndex = 0;
        public double _point { get; set; }
        public DataSeries CurrentClose { get; set; }
        public IndicatorDataSeries Direction { get; set; }
        public IndicatorDataSeries DownBuffer { get; set; }
        private AverageTrueRange _averageTrueRange { get; set; }
        public double DeviationAtr { get; set; }
        public bool deviationPrice = true;
        public double deviationValue { get; set; }

        private WeisWavesTraderExperto WWTE { get; set; }




        protected override void OnStart()
        {

[...]

 

Thanks anyway!


@Mia999

Mia999
07 Jan 2022, 23:35 ( Updated at: 09 Feb 2023, 11:54 )

Hi,

It would be very appreciated if you could work on an integration with FTX.

FTX is an important "Broker" for cryptocurrencies. It is cheap, honest, accessible, inclusive and straightfoward, and its reputation is well established - including in the United States. Their API seems ready and well referenced for integration with other platforms (such as cTrader).

The brokers that actually integrate with cTrader don't do very well with cryptocurrencies in my opinion. Most of them offer just a few crypto (if they offer crypto at all), and their commission / spread are often unacceptable. 

Moreover (and that could be a separated topic in itself), the vast majority of them are Europe oriented: only one or two of them serve North America. My guess is that many opportunities are slipping through your fingers because of that.

Thank you, and keep up for the good work!


@Mia999

Mia999
23 Dec 2021, 02:52

I vote for this 

(StopLoss / Take Profit in $ please)


@Mia999

Mia999
22 Dec 2021, 10:14

RE:

firemyst said:

Well, I'lm not sure how/why you expect the indicator to work that you provided the link to. When I looked at the page, it has numerous parameters that it's expected other than "source":

 

[Parameter("Source", Group = "Base Settings", DefaultValue = "Close")]

        public DataSeries Source { get; set; }

 

        [Parameter("Oversold Level", DefaultValue = 20, MinValue = 1, Step = 1)]

        public int Oversold { get; set; }

 

        [Parameter("Overbought Level", DefaultValue = 80, MinValue = 1, Step = 1)]

        public int Overbought { get; set; }

 

        [Parameter("RSI Periods", DefaultValue = 14, MinValue = 2)]

        public int RSIPeriod { get; set; }

 

        [Parameter("Stochastic K%", DefaultValue = 3, Step = 1, MinValue = 2)]

        public int StochK { get; set; }

 

        [Parameter("Stochastic D%", DefaultValue = 3, Step = 1, MinValue = 2)]

        public int StochD { get; set; }

 

        [Parameter("Stochastic Periods", DefaultValue = 14, Step = 1, MinValue = 2)]

        public int StochPeriods { get; set; }

 

If you expect to use that one in your cBot, you have to have it something like the following:

Indicators.GetIndicator<StochasticRSI>(Source, Oversold, Overbought, RSIPeriod, STochK, StochD, StochPeriods);

with values obviously for all the parameters you supply.

Thanks


@Mia999

Mia999
15 Nov 2021, 06:13

Integrate cTrader with FTX

As far as I know, cXchange does not let you run cbots (please, tell me if I'm wrong). For this reason, I do wish to see cTrader integrated with a platform such as FTX.

I found this forum while looking for this precise issue.


@Mia999