Defining conditions for an order to be filled

Created at 21 Aug 2024, 18:38
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!
NC

ncel01

Joined 19.03.2020

Defining conditions for an order to be filled
21 Aug 2024, 18:38


Hello,

Is it possible to define conditions for pending orders that will be checked on the spot (server) once the price to fill the order is met?
I don't think this is possible since, apparently, it is not covered by any of PlacePendingOrder() arguments, but just to be sure.

I don't think that a wide range of conditions would be needed here, but mainly those that can impact risk the most:

  • Min. margin level (%)
  • Min. equity
  • Max. allowable spread → This condition should apply to open positions as well, before any SL is triggered.
  • Max. swaps (optional)
  • Max. commission (optional)
  • Etc.

Has this ever been considered for future implementation?
I believe that sooner or later such an option should be available with any advanced algorithmic trading platform, such as cTrader.

This would also represent another level regarding traders' protection against sudden (and many times unjustified) changes in trading conditions by the brokers.


@ncel01
Replies

PanagiotisCharalampous
22 Aug 2024, 05:31

Hi ncel01,

You guessed right, this is not possible. We are not considering this either, since in the majority of cases, this need can be covered by cTrader Algo.

Best regards,

Panagiotis


@PanagiotisCharalampous

ncel01
24 Aug 2024, 18:24

RE: Defining conditions for an order to be filled

PanagiotisCharalampous said: 

Hi ncel01,

You guessed right, this is not possible. We are not considering this either, since in the majority of cases, this need can be covered by cTrader Algo.

Best regards,

Panagiotis

Hi Panagiotis,

Thanks for clarifying.

Unlike spreads, I agree that such feature could be a bit redundant for the remaining account/symbol properties mentioned, due to the following:

  • These can be checked as often as needed (OnTick())
  • The process of filling out orders and closing positions is not directly depending on these

However, spread has a direct impact on filing pending orders and closing positions (with a harmful effect on the SL side).
This impact can be particularly negative when considering sudden spikes in spreads and cannot be avoided via cAlgo (on the cBot side), unless some instruction is stored on the server. Am I right?

I understand that spreads can be checked before placing market orders which will mitigate the risk, however, I don't really see how this can be achieved when it comes to pending orders and open positions.


@ncel01

PanagiotisCharalampous
26 Aug 2024, 07:08

RE: RE: Defining conditions for an order to be filled

ncel01 said: 

PanagiotisCharalampous said: 

Hi ncel01,

You guessed right, this is not possible. We are not considering this either, since in the majority of cases, this need can be covered by cTrader Algo.

Best regards,

Panagiotis

Hi Panagiotis,

Thanks for clarifying.

Unlike spreads, I agree that such feature could be a bit redundant for the remaining account/symbol properties mentioned, due to the following:

  • These can be checked as often as needed (OnTick())
  • The process of filling out orders and closing positions is not directly depending on these

However, spread has a direct impact on filing pending orders and closing positions (with a harmful effect on the SL side).
This impact can be particularly negative when considering sudden spikes in spreads and cannot be avoided via cAlgo (on the cBot side), unless some instruction is stored on the server. Am I right?

I understand that spreads can be checked before placing market orders which will mitigate the risk, however, I don't really see how this can be achieved when it comes to pending orders and open positions.

Hi ncel01,

Yes you are right. This is the only use case I can think of that cannot be managed on the client side. You can post it as a separate suggestion.

Best regards,

Panagiotis


@PanagiotisCharalampous