Replies

PanagiotisCharalampous
20 Nov 2024, 07:12

RE: RE: RE: RE: RE: RE: "ACCESS_DENIED Error When Requesting Access Token via Open API"

Vasilios-G said: 

PanagiotisCharalampous said: 

Vasilios-G said: 

PanagiotisCharalampous said: 

Vasilios-G said: 

PanagiotisCharalampous said: 

Hi Vasilie,

Try using https://openapi.ctrader.com/apps/token to retrieve the token and let me know if this works.

Best regards,

Panagiotis

Hi Panagiotis,

Thank you for your reply.

I’ve tried using the suggested URL https://openapi.ctrader.com/apps/token in almost every possible place in my code, including replacing both the auth_url and token_url:

python

Code kopieren

# URLs for authentication and token retrieval self.auth_url = 'https://openapi.ctrader.com/apps/auth' self.token_url = 'https://openapi.ctrader.com/apps/token'

Unfortunately, despite these efforts, I’m still getting the "ACCESS_DENIED" error when trying to retrieve the access token.

Is there a specific way or place where this URL is supposed to be used that I might be missing? Also, would it be possible for someone to review my code or point out any common pitfalls I might be encountering?

Ελπίζω ειλικρινά να μπορέσετε να με βοηθήσετε περαιτέρω. Η υποστήριξή σας είναι ανεκτίμητη!

Με εκτίμηση,

Vasilios Gerasimou

Hi Vasilie,

Can you share a video demonstrating the exact steps you follow to receive this error, as well as the exact link for which the access is denied?

Best regards,

Panagiotis

Here the proceed frame by frame: 

i click on the link: 

copy the access token and paste it here: 

 

After pressing the enter button: 

 

This is what it looks like when I use the link you provided, or rather, an error already appears on the page where I retrieve the token. 

Regards, Vasili.

Hi there,

It seems you are using the access token instead of the authorization code. You need to use the authorization code returned by the authorization url when it redirects back to the redirect uri.

Best regards,

Panagiotis

Hi there, 

when i do it like this: 

i get the same error.  Can you explain it to me step by step. 

Hi Vasilie,

For step by step instructions you should contact the script developer, I don't know what it does and how it should be used. What I see in the screenshots is that the application is asking for the authorization code but you are passing the token instead. The authorization code and the token are two different things.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
20 Nov 2024, 07:05

RE: RE: Cant get ADX indicator to retuen values matching the CTrader charts

Mohammadq said: 

PanagiotisCharalampous said: 

Hi there,

Can you share screenshots showing what you are comparing?

Best regards,

Panagiotis

Here you go..

 

Hi there,

Your chart is set to UTC+3 while your cBot prints in UTC+0.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Nov 2024, 11:28

Hi there,

Can you share screenshots showing what you are comparing?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Nov 2024, 11:27

Hi there,

We will check. You can use this one in the meanwhile

https://app.ctrader.com/investor/Y2ofPJZE_f6x?u=finance101

Best regards

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Nov 2024, 11:25

RE: RE: cTrader hanging after the recent upgrade

remote.daniel said: 

This has been constantly happening to me since the update!!!!!! 

I cant cope anymore, I have restarted it via taks manager at least 10 times today,  and every other day since the last update.

Seems like this is when I finally shift to tradingview! This is horrendous!

 

 

PanagiotisCharalampous said: 

Hi there,

Could you please send us some troubleshooting information the next time this happens? Please paste a link to this discussion inside the text box before you submit it.

Best regards,

Panagiotis
 

 

Hi there,

Did you send troubleshooting report so that we can check?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Nov 2024, 11:24

RE: cTrader.Automate. Host.Dispatcher. Exceptions.AutomateDispatcherUnhandledException' was thrown.

Salileh said: 

Dear Sir,

 

Thank you looks like the issue is resolved with the new ctrader version 5.0.44

 

Best Regards,

Salileh

Hi Salileh,

Thanks for letting us know.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Nov 2024, 07:06

Hi there,

Thanks for reporting this issue. We are aware of it and it will be fixed soon.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Nov 2024, 07:06

RE: RE: RE: RE: "ACCESS_DENIED Error When Requesting Access Token via Open API"

Vasilios-G said: 

PanagiotisCharalampous said: 

Vasilios-G said: 

PanagiotisCharalampous said: 

Hi Vasilie,

Try using https://openapi.ctrader.com/apps/token to retrieve the token and let me know if this works.

Best regards,

Panagiotis

Hi Panagiotis,

Thank you for your reply.

I’ve tried using the suggested URL https://openapi.ctrader.com/apps/token in almost every possible place in my code, including replacing both the auth_url and token_url:

python

Code kopieren

# URLs for authentication and token retrieval self.auth_url = 'https://openapi.ctrader.com/apps/auth' self.token_url = 'https://openapi.ctrader.com/apps/token'

Unfortunately, despite these efforts, I’m still getting the "ACCESS_DENIED" error when trying to retrieve the access token.

Is there a specific way or place where this URL is supposed to be used that I might be missing? Also, would it be possible for someone to review my code or point out any common pitfalls I might be encountering?

Ελπίζω ειλικρινά να μπορέσετε να με βοηθήσετε περαιτέρω. Η υποστήριξή σας είναι ανεκτίμητη!

Με εκτίμηση,

Vasilios Gerasimou

Hi Vasilie,

Can you share a video demonstrating the exact steps you follow to receive this error, as well as the exact link for which the access is denied?

Best regards,

Panagiotis

Here the proceed frame by frame: 

i click on the link: 

copy the access token and paste it here: 

 

After pressing the enter button: 

 

This is what it looks like when I use the link you provided, or rather, an error already appears on the page where I retrieve the token. 

Regards, Vasili.

Hi there,

It seems you are using the access token instead of the authorization code. You need to use the authorization code returned by the authorization url when it redirects back to the redirect uri.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Nov 2024, 07:00

Hi there,

Thanks for reporting this issue. We are aware of it and it will be fixed soon.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Nov 2024, 06:51

Hi there,

Can you please explain your issue by providing more information i.e. screenshots, videos.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Nov 2024, 06:39

Hi there,

Since the volume provided in OTC markets is only tick volume, then the volume of every tick is by definition 1.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Nov 2024, 06:36

RE: RE: RE: RE: cTrader.Automate. Host.Dispatcher. Exceptions.AutomateDispatcherUnhandledException' was thrown.

Salileh said: 

Salileh said: 

PanagiotisCharalampous said: 

Salileh said: 

Dear sirs,

Thank you for your reply and I just followed your instructions and submitted my technical issue from ctrader platform.

 

Best regards

Salileh

Hi Salileh,

We checked your troubleshooting and it seems that your broker does not have historical data for XAUEUR which is necessary for the conversion. Please provide us with the following information to reproduce this issue

  1. Your cBot code
  2. Backtesting dates and parameters
  3. Your broker
  4. Your account's currency.

Best regards,

Panagiotis

 

 

Hi there,

Your responses are empty.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
18 Nov 2024, 06:34

RE: Inactive Status

firemyst said: 

An example of an even easier method, which I use, is:

if (Symbol.MarketHours.IsOpened())    { // market is open, do what you want }else    { //market is closed for the symbol. Do what you want }

Market hours are different to market sessions. Market hours are set by the broker. Market sessions are global.


@PanagiotisCharalampous

PanagiotisCharalampous
18 Nov 2024, 06:31

Hi there,

You can already do this. Just add an ATR indicator to your chart and then add an SMA and set the source to the ATR

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
18 Nov 2024, 06:24

RE: RE: RE: RE: No reply

MysticNic said: 

PanagiotisCharalampous said: 

MysticNic said: 

PanagiotisCharalampous said: 

Hi there,

Can you share a link to the thread?

Best regards,

Panagiotis

Thread was posted at 13 November with subject name “Position Manager” 

Can you please share the link?

I have a hard time trying to share the link so I’ll just copy and paste it here instead.

here it is:

“So here’s the thing, it’s been around 8-9 months since the risk-reward tool was launched in the web version and still to have this feature in desktop. Since this tool is still not available and I love cTrader I started looking for available Position Managers out there and guess what, all of the good ones out there have issues with Mac desktop. 

In my case a position manager like this is very important so I had to move to MT5 and purchase one there to trade. 

I say all this because it’s a petty to lose Traders for such things. CTrader for me is literally better than MT5 in every aspect but this one thing forced me to move to them. 
I’m sure there’s a whole bunch of traders out there that choose MT5 over cTrader for that one reason. I believe everyone would benefit if you guys do something about this.

All love, keep it up”

Thank you! The feature is under development, it should be available early next year.


@PanagiotisCharalampous

PanagiotisCharalampous
17 Nov 2024, 16:47

RE: RE: "ACCESS_DENIED Error When Requesting Access Token via Open API"

Vasilios-G said: 

PanagiotisCharalampous said: 

Hi Vasilie,

Try using https://openapi.ctrader.com/apps/token to retrieve the token and let me know if this works.

Best regards,

Panagiotis

Hi Panagiotis,

Thank you for your reply.

I’ve tried using the suggested URL https://openapi.ctrader.com/apps/token in almost every possible place in my code, including replacing both the auth_url and token_url:

python

Code kopieren

# URLs for authentication and token retrieval self.auth_url = 'https://openapi.ctrader.com/apps/auth' self.token_url = 'https://openapi.ctrader.com/apps/token'

Unfortunately, despite these efforts, I’m still getting the "ACCESS_DENIED" error when trying to retrieve the access token.

Is there a specific way or place where this URL is supposed to be used that I might be missing? Also, would it be possible for someone to review my code or point out any common pitfalls I might be encountering?

Ελπίζω ειλικρινά να μπορέσετε να με βοηθήσετε περαιτέρω. Η υποστήριξή σας είναι ανεκτίμητη!

Με εκτίμηση,

Vasilios Gerasimou

Hi Vasilie,

Can you share a video demonstrating the exact steps you follow to receive this error, as well as the exact link for which the access is denied?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
17 Nov 2024, 16:45

RE: RE: I have a problem with counting pips in cbot

kudukmariusz said: 

PanagiotisCharalampous said: 

Hi there,

Please provide your complete code and explain to us how we can see what you are looking at. Also explain what you would expect to see instead.

Best regards,

Panagiotis

Hi, so the problem only occurs when I open positions, even when I tried to take the easiest example from the Internet where in the video it works normally, it doesn't work for me :( setting up pending positions works normally and I can set SL and TP as I like

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

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class ThreeWhiteSoldiersAndThreeBlackCrows : Robot
    {
        [Parameter(DefaultValue = 1)]
        public double Volume { get; set; }

        [Parameter(DefaultValue = 200)]
        public double TakeProfit { get; set; }

        [Parameter(DefaultValue = 300)]
        public double StopLoss { get; set; }

        protected override void OnBar()
        {
        
            // Check if there are open positions
            if (HasOpenPositions())
                return;

            
            double Price_mine = Bars.ClosePrices.Last(1);
            
            // Three White Soldiers
            if (Bars.ClosePrices.Last(1) > Bars.OpenPrices.Last(1) &&
                Bars.ClosePrices.Last(2) > Bars.OpenPrices.Last(2) &&
                Bars.ClosePrices.Last(3) > Bars.OpenPrices.Last(3))
            {
                double stopLoss = Price_mine - (StopLoss * Symbol.PipSize);
                double takeProfit = Price_mine + (TakeProfit * Symbol.PipSize);

                ExecuteMarketOrder(TradeType.Buy, SymbolName, Volume, "ThreeWhiteSoldiers", stopLoss, takeProfit);
            }

            // Three Black Crows
            if (Bars.ClosePrices.Last(1) < Bars.OpenPrices.Last(1) &&
                Bars.ClosePrices.Last(2) < Bars.OpenPrices.Last(2) &&
                Bars.ClosePrices.Last(3) < Bars.OpenPrices.Last(3))
            {
                double stopLoss = Price_mine + (StopLoss * Symbol.PipSize);
                double takeProfit = Price_mine - (TakeProfit * Symbol.PipSize);

                ExecuteMarketOrder(TradeType.Sell, SymbolName, Volume, "ThreeBlackCrows", stopLoss, takeProfit);
            }
        }
          private bool HasOpenPositions()
        {
            foreach (var position in Positions)
            {
                if (position.SymbolName == SymbolName)
                    return true;
            }
            return false;
        }
    }
}

Even if I enter the number of pips directly into the Execute Order function, the bot still sets my SL and TP to over 2k pips.

Hi there,

The example you provided uses price levels as a stop loss and take profit. If it still doesn't work when you use pips, please share the updated code and screenshots demonstrating what happens.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
17 Nov 2024, 16:39

RE: RE: No reply

MysticNic said: 

PanagiotisCharalampous said: 

Hi there,

Can you share a link to the thread?

Best regards,

Panagiotis

Thread was posted at 13 November with subject name “Position Manager” 

Can you please share the link?


@PanagiotisCharalampous

PanagiotisCharalampous
17 Nov 2024, 16:37

RE: RE: RE: RE: Bollinger Bands on RSI(or CCI) with unseen MACD

lbwforex said: 

PanagiotisCharalampous said: 

lbwforex said: 

PanagiotisCharalampous said: 

Hi Louis,

Thanks for your kind words. I am not sure why you got the impression that the source in Bollinger Bands cannot change. You can use any source you need. See below where you can do it

Best regards,

Panagiotis

 

Thank you for your reply. 

The issue is two fold. The MACD is still on the chart above the RSI using the MACD data. Maybe there is a way to remove the MACD and keep the the RSI using the MACD data? Then attaching the Bollinger Bands to the RSI does appear to be as easy changing the source parameters for the Bollinger Bands to the RSI, but the Source parameter is grayed out and cannot be changed. I tried to play around with the settings and could not achieve the singular subwindow with the Bollinger Bands on the RSI using the previous MACD data, (unseen same sub window). I am new to cTrader, so I hope there is a way to do this setup, because it is the best setup that exists, im my opinions. Please check it out. 

Thank you, 

Louis B.W.

 

Hi there,

The MACD is still on the chart above the RSI using the MACD data. Maybe there is a way to remove the MACD and keep the the RSI using the MACD data?

No the indicator needs to be on the chart in order to use it as a source. Alternatively, you need to code your own indicator.

but the Source parameter is grayed out and cannot be changed.

You need to add the source when you add the indicator on the chart. You cannot change it later. So make sure your RSI indicator is already on the chart before you add the Bollinger Bands indicator.

Best regards,

I tried that and it worked. Thank you. I plan on having all my indicators from MT4 converted over the cTrader. The Bollinger Bands in cTrader would be of better usefulness if levels could be added the Bollinger Bands because levels create signals when the RSI value crosses the levels. Can the levels be writting into a Bollinger Bands indicator? And an EA automatic software algorithm, cAlgo have Bollinger Band levels? Thank you. 

Hi there,

It is not possible to add levels in the built in Bollinger Bands indicator. But you can develop your own custom indicator and add levels if you wish, it should not be hard.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
17 Nov 2024, 16:29

Hi there,

You can use MarketSessions to achieve this. Check below

https://help.ctrader.com/ctrader-algo/guides/trading-sessions/

Best regards,

Panagiotis


@PanagiotisCharalampous