you should have another method rather than this

Created at 19 Oct 2014, 05:24
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!
RA

rawand123

Joined 07.10.2014

you should have another method rather than this
19 Oct 2014, 05:24


protected override void OnStart()
        {
            Positions.Closed += PositionsOnClosed;
            ExecuteMarketOrder(TradeType.Buy, Symbol, 10000, "myLabel", 10, 10);

        }
        private void PositionsOnClosed(PositionClosedEventArgs args)
        {
            var position = args.Position;
            if (position.GrossProfit > 0)
                ExecuteMarketOrder(TradeType.Buy, Symbol, 10000, "myLabel", 10, 10);
        }

their might be a way if a trader want the algo to do something different each time a trade is closed 

in the example above the algo will do same thing each time a trade is closed

but for example if a trader want the algo to buy a currency if last trade is closed and after that he changes his mind 

lets suppose he wants the algo to sell a currency once the next trade is closed

there must be a way for this 


@rawand123
Replies

Spotware
20 Oct 2014, 10:07

We can recommend you to contact one of our Partners or post a job in Development Jobs section.


@Spotware