PlaceLimitOrder / PlaceStopOrder with a start price

Created at 19 Feb 2019, 10:48
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!
KE

ketos.energy

Joined 19.02.2019

PlaceLimitOrder / PlaceStopOrder with a start price
19 Feb 2019, 10:48


Hi cTrader community

I am a bit confused and I hope to find a solution here.
When I work manually on a graph, I am able to place a limit order or stop order with a set price. When the market reaches this price, the order is opened and executed when the according stop loss or take profit is reached.
When I try to achieve the same in cAlgo using the PlaceLimitOrder() or PlaceStopOrder(), I am only able to define a targetPrice and not a startPrice.


How can I achieve the exact same action in cAlgo than I can achieve manually? How can I specify the start price and not the target price?

 

Thanks in advance for your help.

Adrian


@ketos.energy
Replies

Shares4UsDevelopment
26 Feb 2019, 10:59

RE:

PlaceStopLimitOrder


@Shares4UsDevelopment

ketos.energy
26 Feb 2019, 11:17

Thank you Ton for your response.

According to the API reference, PlaceStopLimitOrder does also take "targetPrice" and not "startPrice" as Parameter -> https://ctrader.com/api/reference/robot/placestoplimitorder


@ketos.energy

PanagiotisCharalampous
26 Feb 2019, 11:27

Hi Adrian,

Thanks for posting in our forum. I am not sure what do you mean when you say start price. The target price is the price at which the pending order will be triggered. You can add a SL and TP on that order separately.

Best Regards,

Panagiotis

 


@PanagiotisCharalampous