Combination of One Execution Per Bar & Multiple Executions.

Created at 08 Feb 2022, 09:12
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!
ST

steel.export

Joined 19.01.2021

Combination of One Execution Per Bar & Multiple Executions.
08 Feb 2022, 09:12


Usually there is One execution per Bar or Multiple Executions. Is it possible to have combination of both, so that the cBot takes multiple trades till it is getting winning trades, and as soon as it gets a losing trade it Stops at that Bar, then at next Bar it checks for Moving Average rule to a start new Trade in that Direction.

Thanking you in Advance for your Help & Support.

 

 

 private bool CheckOneExecutionPerBar()
        {
            if (!oneExecutionPerBar || lastExecutedTradeTime != Bars.OpenTimes.LastValue)
            {
                return true;
            }
            return false;
        }


@steel.export
Replies

amusleh
08 Feb 2022, 12:06

Hi,

Your question is not clear, In case you want to link a position/order with a bar you can use bar OpenTime as comment for position/order.

Please stop creating multiple threads for same question, otherwise you will be banned from forum.


@amusleh

steel.export
08 Feb 2022, 14:47

Combination of One Execution Per Bar & Multiple Executions.

Dear Mr. Ahmad Norman Musleh,

Thanks for your Reply & Help.


@steel.export