PanagiotisCharalampous's avatar
PanagiotisCharalampous
26 follower(s) 0 following 1006 subscription(s)
Replies

PanagiotisCharalampous
15 Feb 2021, 09:51

Hi ctid2613585,

Just go to Settings > Quick Trade and disable Single-Tap.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:45

Hi drayzen,

Did you restart cTrader? Does this still happen?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:44

Hi there,

Here is an example of how to plot values on the chart

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

namespace cAlgo
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC)]
    public class NewIndicator : Indicator
    {
        private ExponentialMovingAverage _emaFast;
        private ExponentialMovingAverage _emaSlow;
        [Parameter("Data Source")]
        public DataSeries Price { get; set; }
        [Parameter("Slow Periods", DefaultValue = 21)]
        public int SlowPeriods { get; set; }
        [Parameter("Fast Periods", DefaultValue = 3)]
        public int FastPeriods { get; set; }

        [Output("Slow")]
        public IndicatorDataSeries Slow { get; set; }

        [Output("Fast")]
        public IndicatorDataSeries Fast { get; set; }


        protected override void Initialize()
        {
            // initialize new instances of ExponentialMovingAverage Indicator class 
            _emaFast = Indicators.ExponentialMovingAverage(Price, FastPeriods);
            // _emaSlow is the exponential moving average of the emaFast 
            _emaSlow = Indicators.ExponentialMovingAverage(_emaFast.Result, SlowPeriods);
        }
        public override void Calculate(int index)
        {

            Fast[index] = _emaFast.Result[index];
            Slow[index] = _emaSlow.Result[index];
        }
    }
}

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:20

Hi there,

Can you share the cBot code that is causing this problem?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:20

Hi Fron,

I am not sure what kind of function are you looking for. This is just a subtraction.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:16

Hi prosteel1,

The plan is for v4.2. Hopefully it will come in the summer.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
15 Feb 2021, 09:15

Hi prosteel1,

Thanks for reporting this. It will be fixed in an upcoming update.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
13 Feb 2021, 16:16 ( Updated at: 21 Dec 2023, 09:22 )

Hi rbrt.gorski,

Here it is

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Feb 2021, 15:09

Hi wefald,

You can use ModifyStopLossPrice and ModifyTakeProfitPrice to set absolute prices for SL and TP.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
12 Feb 2021, 11:04

Hi marian.kosa,

The index represents the index of the current bar being calculated and as you can see it is passed as a parameter to the Calculate method. So you can use it only inside this method. It is a local variable. If you want to access the values of the indicator inside the cBot, you should consider using Last() method.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Feb 2021, 08:24

Hi marian.kosa,

Thanks for posting in our forum. It is not clear to me what is the problem. Why do you want to replace index? What are you trying to do?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Feb 2021, 08:22

Hi x3m.law,

If these accounts are Spotware Beta accounts, then send me an email at community@spotware.com and I will delete them.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Feb 2021, 08:17

Hi rbrt.gorski,

The chart should not change. You are probably dragging the axis instead of the time counter. Please make sure you click on the time counter.

 

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
12 Feb 2021, 08:15

Hi intraflay,

It will be released on IC Markets as soon as beta testing finishes.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
11 Feb 2021, 15:20

Hi PUdPUd,

This part of the code

 var position = Positions.Find(MyLabel);

is limiting the execution of the trailing stop loss to one position at a time. You need to execute that code for all open positions.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
11 Feb 2021, 15:15

Hi C123dale,

You should try using a flag when the RSI crosses on the other direction and place trades only when the flag is changing. See below an idea

            if (rsi.Result.LastValue < LRL && _isBullish)
            {
                Close(TradeType.Buy);
                Open(TradeType.Sell);
                _isBullish = false;
            }
            else if (rsi.Result.LastValue > URL && !_isBullish)
            {
                Close(TradeType.Sell);
                Open(TradeType.Buy);
                _isBullish = true;
            }

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
11 Feb 2021, 15:09

Hi Marko,

Please send me an email from the email address that owns this account and I will delete it for you.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
11 Feb 2021, 14:59

Hi robustby,

Thank you so much for the example. Can you check if I'm right? If I want to get lower Ask price I'm doing following:

It seems correct to me

1) If I want to use only last 10000 ticks, how better load it? Or if I want use ticks data for only 50 last bars at the chart?

You should load until this condition is me e.g.

while (ticks.Count < 100000)

I must use MarketData.GetTicks() & ticks.LoadMoreHistory() for every time when new tick appears? Please explain how it works.

The list is not updated with every incoming tick. Therefore you should make the respective arrangements if this is something that is important for you i.e. add the new ticks to the list.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
11 Feb 2021, 14:51

Hi intraflay,

This is already available in cTrader Desktop v4.0.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

PanagiotisCharalampous
11 Feb 2021, 10:56

Hi robustby,

Here is an example of how to load all ticks for the bars loaded on your chart.

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 NewcBot : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        protected override void OnStart()
        {
            var ticks = MarketData.GetTicks();
            while (ticks[0].Time > Bars[0].OpenTime)
            {
                ticks.LoadMoreHistory();
                Print("Loaded till " + ticks[0].Time);
            }
            Print("Ticks loaded");
        }

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

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

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous