Replies

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

PanagiotisCharalampous
11 Feb 2021, 08:34 ( Updated at: 21 Dec 2023, 09:22 )

Hi rbrt.gorski,

Just drag the time counter to the left

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
11 Feb 2021, 08:33

Hi TomSands,

No, we will only consider this if it is requested by a lot of traders. For now it has 0 votes.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
11 Feb 2021, 08:31

RE:

TomSands said:

Hello, was this fixed, or is it the problem on my end?

Hi TomSands,

If you have any issues, please send us troubleshooting to check. While in cTrader, press Ctrl+Alt+Shift+T, paste the link to this thread inside the text box and press Submit.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
11 Feb 2021, 08:29

Hi robustby,

The ask price is not available. Bars are created using bid prices. To get ask prices you need to get the tick data using MarketData.GetTicks() and loop through the ticks to find the lowest for the bar's period.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
11 Feb 2021, 08:24

Hi uurb2002,

There is no such option at the moment.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
11 Feb 2021, 08:23

Hi malas7malas,

There is no such property at the moment. The angle calculation is based on the screen pixels which are also not accessible at the moment.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
10 Feb 2021, 08:27

Hi robgned,

This is not a platform related issue. Trading hours are set by the brokers. You should talk to your brokers regarding this issue.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

PanagiotisCharalampous
10 Feb 2021, 08:23

Hi dwalkhul,

Yes you are correct.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous