Incorrect chart data being shown

Created at 04 Nov 2024, 22:53
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
JS

jstewartcenter

Joined 18.11.2023

Incorrect chart data being shown
04 Nov 2024, 22:53


I just noticed this as I was trying to compare cTrader to TradingView and I had this gap in USDJPY today. In the cTrader there is a gap where the price jumps, but in TradingView it is consistent. When using a bot this could cause problems with my strategy when data is missing like this. Is there something we can do to prevent this?

cTrader

TradingView


@jstewartcenter
Replies

firemyst
05 Nov 2024, 06:09 ( Updated at: 05 Nov 2024, 08:02 )

Judging from your charts, are you located in the UK?

That “gap” appears to have happened when the markets start their “reset” window, which causes huge spreads.

Because of that, what you obviously need to do is check the spread on the symbol before doing anything.

//Check the spread
if (Symbol.Spread >= SomePredeterminedAmount)   
    Print ("Not doing anything! Spread greater than allowed!");
else
{   
    //Do what you normally would
}

 

The fact it's the spread can also be confirmed by looking at the “tick” chart for the same time - look how the spread suddenly at least quadrupples:


@firemyst

PanagiotisCharalampous
05 Nov 2024, 08:45

Hi there, 

This is as designed. cTrader uses a different convention to TradingView. The opening price of the bar is the first tick arriving for the bar. It seems that TradingView uses the previous bar's closing price instead.

Best regards,

Panagiotis


@PanagiotisCharalampous

jstewartcenter
05 Nov 2024, 13:48

RE: Incorrect chart data being shown

firemyst said: 

Judging from your charts, are you located in the UK?

That “gap” appears to have happened when the markets start their “reset” window, which causes huge spreads.

Because of that, what you obviously need to do is check the spread on the symbol before doing anything.

//Check the spreadif (Symbol.Spread >= SomePredeterminedAmount)       Print ("Not doing anything! Spread greater than allowed!");else{       //Do what you normally would}

 

The fact it's the spread can also be confirmed by looking at the “tick” chart for the same time - look how the spread suddenly at least quadrupples:

Thank you! This makes a lot of sense!


@jstewartcenter