refresh the chart

Created at 11 Mar 2019, 23:40
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!
PO

pozhy

Joined 03.04.2018

refresh the chart
11 Mar 2019, 23:40


I want to refresh the chart every one hour, is there any solution to refresh the Calculate method? 


@pozhy
Replies

PanagiotisCharalampous
12 Mar 2019, 14:43

Hi pozhy,

I offered a solution to a similar problem here.

Best Regards,

Panagiotis


@PanagiotisCharalampous

pozhy
12 Mar 2019, 15:26

RE:

Panagiotis Charalampous said:

Hi pozhy,

I offered a solution to a similar problem here.

Best Regards,

Panagiotis

thank you


@pozhy

pozhy
13 Mar 2019, 02:32

RE:

Panagiotis Charalampous said:

Hi pozhy,

I offered a solution to a similar problem here.

Best Regards,

Panagiotis

protected override void Initialize()
{
 
    Chart.ZoomChanged += Chart_ZoomChanged;
}
 
private void Chart_ZoomChanged(ChartZoomEventArgs obj)
{
   //Redraw your indicator           
}

in this code you use Chart.ZommChanged , it means the only way is changing the zoom on chart to refresh the indicator?


@pozhy

PanagiotisCharalampous
13 Mar 2019, 09:13

Hi pozhy,

No, you can refresh the chart whenever want. In your case you can refresh the chart every hour using the TimerTick event.

Best Regards,

Panagiotis


@PanagiotisCharalampous