Single Position Only

Created at 02 Oct 2019, 00:34
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!
CO

collettnoel

Joined 02.10.2019

Single Position Only
02 Oct 2019, 00:34


If a cbot is running on multiple charts is it possible when one position is opened that no other positions may be opened until the open position is closed.

The cbot variables (inputs) associated with each chart are likely to be different


@collettnoel
Replies

PanagiotisCharalampous
02 Oct 2019, 08:47

Hi collettnoel,

Thanks for posting in our forum. You can always check if there are no positions open before executing an order. See below the condition

            if (Positions.Count == 0)
            {
                // Execute your trading
            }

Best Regards,

Panagiotis


@PanagiotisCharalampous

collettnoel
03 Oct 2019, 08:31

RE:

Thanks.... better than MT4/5 which cannot do that.


@collettnoel