multiple positions OnTick()

Created at 15 Feb 2019, 14:45
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!
alexander.n.fedorov's avatar

alexander.n.fedorov

Joined 02.01.2018

multiple positions OnTick()
15 Feb 2019, 14:45


Dear Panagiotis!

it just happened that I wanted to open under certain conditions a position onTick()

It opened 200!

How can i do that during on candle only one position is opened?

regards,

 

Sasha


@alexander.n.fedorov
Replies

PanagiotisCharalampous
15 Feb 2019, 14:49

Hi Sasha,

Define a global boolean parameter, make it true when a position opens and make it false when a bar changes. Open positions only if this flag is false.

Best Regards,

Panagiotis

 


@PanagiotisCharalampous

alexander.n.fedorov
15 Feb 2019, 14:58

RE:

alexander.n.fedorov said:

Dear Panagiotis!

it just happened that I wanted to open under certain conditions a position onTick()

It opened 200!

How can i do that during on candle only one position is opened?

regards,

 

Sasha

RE: during one candle


@alexander.n.fedorov

alexander.n.fedorov
15 Feb 2019, 14:59

Thank you , Panagiotis


@alexander.n.fedorov