OnThick event

Created at 28 May 2014, 11: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!
CE

Cezary

Joined 28.05.2014

OnThick event
28 May 2014, 11:40


Hi,

 

When is called OnTick event ?

Is it called on every price change ?

 

Thanks!

Cezary


@Cezary
Replies

Spotware
28 May 2014, 12:05

RE:

Cezary said:

Hi,

 

When is called OnTick event ?

Is it called on every price change ?

 

Thanks!

Cezary

OnTick method is called on each incoming market tick.


@Spotware

Cezary
28 May 2014, 13:37

RE: RE:

ok, thanks

Spotware said:

Cezary said:

Hi,

 

When is called OnTick event ?

Is it called on every price change ?

 

Thanks!

Cezary

OnTick method is called on each incoming market tick.

 


@Cezary

aharonzbaida
29 Nov 2015, 08:46

RE: RE: RE:

Cezary said:

ok, thanks

Spotware said:

Cezary said:

Hi,

 

When is called OnTick event ?

Is it called on every price change ?

 

Thanks!

Cezary

OnTick method is called on each incoming market tick.

 

How do I trigger an event for every incoming tick on each of a list of (or all) symbols, as opposed to OnTick() method being called only for ticks on the symbol the cBot is attached to?


@aharonzbaida

Spotware
01 Dec 2015, 19:47

Dear Trader,

In cAlgo.API there is no way to trigger an event in the way you want. However, you can take advantage of the C# language used in cAlgo and create an event to be triggered whenever you want. Please have a look at the Events Tutorial on Microsoft.


@Spotware

aharonzbaida
20 Dec 2015, 06:50

RE:

Spotware said:

Dear Trader,

In cAlgo.API there is no way to trigger an event in the way you want. However, you can take advantage of the C# language used in cAlgo and create an event to be triggered whenever you want. Please have a look at the Events Tutorial on Microsoft.

so either make an inter process communication using anonymous pipes between robots. and have a chart instance for every symbol which will serve to fire price changes from each respective OnStart().

See:

http://stackoverflow.com/questions/528652/what-is-the-simplest-method-of-inter-process-communication-between-2-c-sharp-pro

which suggests using Asynchronous operations with BeginRead/BeginWrite and AsyncCallback. As outlined here:

https://msdn.microsoft.com/en-us/library/bb546102.aspx

 

Or, alternatively use polling to check if Symbol.bid / Ask changed, then fire an event, a variation on outlined here:

 http://stackoverflow.com/questions/19794652/c-sharp-raise-event-when-property-changes-in-foreign-class

 

Both of which are hacks for something that should be built in. 

 

Dear Spotware team, is the second option what you had in mind in your previous answer where you reffered me/us to the MS Event tutorial?

 

Are you planning to integrate events for global price changes? If so, is there a timeline?

 

-Roni


@aharonzbaida

Spotware
21 Dec 2015, 20:48

Dear Trader,

We will consider your suggestion regarding integrating an event to be triggered when the global price is changed. Additionally, you can post your ideas/suggestions to http://vote.spotware.com/


@Spotware