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

PanagiotisCharalampous
25 Apr 2018, 09:20

Hi kienvu8888,

Thanks for posting in our forum. Which version of cTrader are you using? This issue has been resolved in cTrader 3.0.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Apr 2018, 15:34 ( Updated at: 21 Dec 2023, 09:20 )

Hi ceakuk,

1.18214 is the Close value for the 13/08/2017 22:00 as specified in the log. See graph below

It represents the first value evaluated by that indicator, at index 0, which at that moment is the last value of the series as well.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Apr 2018, 15:19

Hi ceakuk,

The values in the log are correct. This is how it is supposed to work. If Calculate() is not executing on the Last Bar, it will consider as last values, the values of the candlestick with the index evaluated. That is why you see the values incrementing by one hour each time.

I hope this clarifies things for you.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Apr 2018, 15:06

Hi thegreat.super,

Unfortunately I cannot advise you on that. Your cBot contains 4200 lines of code and I don't know what it is supposed to do. It seems that you got the source code from a converter (EA to cAlgo) however I don't know how trustworthy the conversion is. If you don't know how to handle the code maybe you could ask the assistant of a professional. I would also advise you to consider rewriting the cBot from scratch instead of relying on the conversion.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Apr 2018, 14:48

Hi thegreat.super,

It seems that MA_PERIOD and ATR_PERIOD are always 0 when the cBot is starting and that is what is causing NaN values.

 protected override void OnStart()
        {
 
 
            CommonInitialize();
            keltnerChannels = Indicators.KeltnerChannels(MA_PERIOD, MovingAverageType.Simple, ATR_PERIOD, MovingAverageType.Simple, 2.0);
            double icustom_92 = keltnerChannels.Top.LastValue;
            double icustom_100 = keltnerChannels.Bottom.LastValue;
.
.
.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Apr 2018, 14:08 ( Updated at: 21 Dec 2023, 09:20 )

Hi ceacuk,

Are you sure you have posted the correct indicator? Because I see different messages in log and they seem correct after checking. See below

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Apr 2018, 09:14

Hi ceakuk,

The fact that there is no link does not mean that this is not possible. Practically, you could read the data on the Initialize() function, store them in memory and then assign them to the appropriate Result index in the Calculate() function. However this requires some coding to be achieved. You could always use some professional help if you don't know how to do it and if you would like this to be implemented.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Apr 2018, 09:03

Hi w.b.z,

Thanks for reporting this issue. Which version of cAlgo/cTrader are you using? 2.01 or 3.0?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
24 Apr 2018, 09:01

Hi cuongdn1102,

Thanks for posting in our forum. You could also consider postng a Job or contacting a professional Consultant to help you with your cBot.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Apr 2018, 17:36

Hi reza.roboforex,

Thanks for posting in our forum. If you wish to start programming cBots, you should first get familiar with C#. If you google "Learn C#" you will find thousands of resources on how to do so.

If you are familiar with C# and you need to get accustomed with cAlgo specifics that you can have a look at the following guides

Let me know if you need any additional information.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Apr 2018, 16:17 ( Updated at: 21 Dec 2023, 09:20 )

Dear rwieden,

Thanks but I am seeing different parameters. See below

Am I using the correct robot?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Apr 2018, 15:15

Hi ceakuk,

Yes, I believe this is possible. You could create another indicator that reads values from csv data and use it as an imput to your current indicator.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Apr 2018, 14:42

Hi ceakuk,

Currently there is no way to get a fixed range of market data. We plan to add this as an option of the MarkerSeries.GetData() function in a future release of cTrader. If you could share your indicator so that I can reproduce your problem then I might be able to suggest a different approach.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Apr 2018, 12:46

Hi ceakuk,

Could you please explain to me what is the purpose if the following condition?

if (index == 0)

What are you trying to achieve?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Apr 2018, 12:22 ( Updated at: 21 Dec 2023, 09:20 )

Hi carlosdrcunha,

Thanks for posting in our forum. Regarding your questions.

1) It is not clear what do you mean. Would you like to calculate the simple moving average of the ADX. If yes, see below how you can set the ADX indicator as an input to your SMA indicator

If this in not what you mean, please explain further.

2) I did not understand this question. Can you elaborate a bit more?

3) If you want to restrict your cBot to opening one position at a time, you can use the following condition before executing a market order.

            if (Positions.Count == 0)
            {
                // Execute trading...
            }

Let me know if the above helps,

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Apr 2018, 11:48

Hi rwieden,

Thanks for the additional information. Could you please provide me the cBot parameters you are using? I will run the cBot on my side as well and check if I can reproduce the problem.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Apr 2018, 09:21

Hi MUSYOKAMORRIS,

Thanks for posting in our forum. Yes, it is in our plans to add Heiken Ashi charts in cTrader Windows, however this is not planned for the next major update. We will keep you updated when this chart type will come in cTrader Desktop.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
23 Apr 2018, 09:10

Hi rwieden,

It would be easier to get an answer if you contacted the broker directly, provide them with the position ID and explain them the issue. They should come back to you with the exact reason why the position was closed. The cBot's code is fairly extensive for someone to go through and guess what could go wrong. If the broker cannot provide an explanation, then we can investigate further.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
20 Apr 2018, 16:29

Hi mosaddeqi@gmail.com,

You can use the same robot on Bactesting and it will save the historical data.

Best Regards,

Panagiotis 


@PanagiotisCharalampous

PanagiotisCharalampous
20 Apr 2018, 15:22

Hi mosaddeqi@gmail.com,

Check the cBot below. It could be helpful.

/algos/cbots/show/843

Best Regards,

Panagiotis


@PanagiotisCharalampous