Problem with OrderLimit

Created at 14 Nov 2017, 10:29
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!
MT

mto1995

Joined 19.10.2017

Problem with OrderLimit
14 Nov 2017, 10:29


i would like to do an OrderLimit like OrderLimit Buy is Symbol.LastValue + 10pip but just after take the order, the robot do like an OrderMarket

 

protected override void OnTick()
        {   
            if (Positions.Count < 1)
            {
                PlaceLimitOrder(TradeType.Buy, Symbol, 10000, (Symbol.Ask + 0.001), "e", 5, 10);
            }
        }

 

Thanks for you helping

 

 


@mto1995
Replies

PanagiotisCharalampous
20 Nov 2017, 12:14

Hi mto1995,

Thanks for posting your question, but it is not very clear what exactly you need. From what I understand you want something to happen after the limit order is triggered. Can you please elaborate on that so that the community can help you?

Best Regards,

Panagiotis


@PanagiotisCharalampous

mto1995
28 Nov 2017, 15:04 ( Updated at: 21 Dec 2023, 09:20 )

Hi,

Thks for you comment,

i just want place an order like the picture.


@mto1995

PanagiotisCharalampous
28 Nov 2017, 15:14

Hi mto1995,

If you want to place a Buy order above the market price then you need to place a Stop Order, not a Limit Order. See below

        protected override void OnTick()
        {
            if (Positions.Count == 0 && PendingOrders.Count == 0)
            {
                PlaceStopOrder(TradeType.Buy, Symbol, 10000, (Symbol.Ask + 0.001), "e", 5, 10);
            }

        }

Best Regards,

Panagiotis


@PanagiotisCharalampous

mto1995
28 Nov 2017, 21:42

Hi Panagiotis, 

Thks i will try 

best regards,


@mto1995