Topics
22 Feb 2024, 12:29
 1
 279
 0
09 Nov 2023, 12:24
 0
 451
 0
08 Feb 2022, 22:11
 851
 2
08 Apr 2021, 03:53
 1028
 2
22 Jun 2020, 16:42
 1054
 2
16 Dec 2019, 14:49
 3
 1318
 1
13 Dec 2018, 16:50
 1
 1019
 1
13 Dec 2018, 13:48
 1220
 2
26 Apr 2018, 16:59
 2042
 7
12 Jul 2017, 00:36
 0
 3006
 9
20 Jul 2015, 19:00
 2773
 2
Replies

Futuresmo
09 Dec 2013, 18:57

Thanks for reply hichem. To my mind it sounds like standard event in Positions class like Positions.PriceAttained

 

 

If you want to raise an event on a certain condition then there is no way it can be done without executing a condition clause. And since price changes at each tick, it should be done on each Tick. You can use a separate thread to do the calculations and to not block the rest of the robot, but it should be done on each tick.

comparing price on every tick is not going to use a lot of CPU resources.


@Futuresmo

Futuresmo
09 Dec 2013, 17:41

Thanks Kate :)

 

I am more interested on custom event that will react on certain price attained oppose to comparing price on every tick that causes lots of CPU resources being used.


@Futuresmo

Futuresmo
21 Oct 2013, 18:31

Thanks for response.

The point is that i want to have set stop immediately when opening with position, so opening and modifying position seem like one step too far.

Will try MarketOrderRequest(), also SellStop and BuyStop() methods can serve the purpose.

 

 

 

 


@Futuresmo