Replies

PanagiotisCharalampous
12 Oct 2018, 12:35

Hi noorimotlagh.reza,

Thanks for posting in our forum. Which version of cTrader do you use? Can you post your cBot code so that we can fix it?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
12 Oct 2018, 09:49

Hi Sasha, 

The best approach to this would be to keep this information saved in a file i.e. records with position id, SL, TP. You should be updating this file every time the information changes while the cBot runs and delete it on cBot stopping. On starting the cBot, you should be checking if the file exists. If yes, then it means the cBot was closed unexpectedly, therefore you should read the file and update your variables accordingly. 

Let me know if this was helpful.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
11 Oct 2018, 12:43

Hi iuri.govoni,

Can you please try to perform a clean installation?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
11 Oct 2018, 10:58

Hi aboukerker,

That works fine as well. Is it possible to make a short video with your issue and send it to us?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2018, 10:11

Hi aboukerker,

I could not reproduce any issue. Visual backtesting seems to be working fine. Can you make sure that this is not caused because of the speed setting?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2018, 17:59

Hi ctid244560,

It is a matter of weeks to start rolling out this version to brokers.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2018, 15:29 ( Updated at: 21 Dec 2023, 09:20 )

Hi Ranjeet,

Go to your profile and hover the mouse over the bottom right conrer of the general info area. A button will appear like the below.

 

Click on it and change your details.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2018, 15:11

Hi Ranjeet,

To get the last bar's close price, try the below

MarketSeries.Close.Last(1)

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2018, 15:00

Hi ranjeet,

That is correct. MarkerSeries can only return data that is known at the moment of the bar change, meaning up to the last closed bar.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2018, 14:38

Hi Ranjeet,

"What does it return when used under onBar and onTick ?"

MarketSeries returns the OHLC and other values of a timeframe as you would have seen then on the chart. It doesn't matter where it is called, the results are the same.

"From the examples why is 'MarketSeries.Close.Count - 2;' used to get indicator data within onBar"

Which example are you referring to?

At what point does onBar get called. What does this mean during backtesting?

On the change of each bar of the selected timeframe

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2018, 10:31

Check line 57. You wrote positons instead of Position.


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2018, 10:24

Hi Sasha,

That is correct. I do not get an error using that type. Can you share the full code so that I can reproduce?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2018, 09:59

Hi aboukerker,

Can you please share the complete cBot code so that we can reproduce the issue?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2018, 09:50

Hi Sasha,

You did not share the declaration of longPositions and shortPositions. What is their type?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
09 Oct 2018, 09:48

Hi ghazisameer,

Try changing the layout using F11.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2018, 17:24

Hi ghazisameer,

cAlgo does not exist anymore. You can do this in cTrader Automate tab. Can you please explain what do you mean by saying it failed? What did you do exactly and what happened?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2018, 14:05

Hi fcomanjoncabeza,

No this feature has been introduced in v3.01. It will be released to brokers soon.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2018, 12:37

Hi fcomanjoncabeza,

For a line to stay on the chart you need to make it interactive. See how below.

            var line = Chart.DrawHorizontalLine("Test", Symbol.Bid, Color.AliceBlue);
            line.IsInteractive = true;

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2018, 12:27

If you want to close that one position then try the following

ClosePosition(Positions.First(x => x.Label == Instance));

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
08 Oct 2018, 12:20

Hi Sasha,

It is not clear to me what is the problem you would like to address. Can you please explain?

Best Regards,

Panagiotis


@PanagiotisCharalampous