Is it possible to pause trade criteria to profit from changing conditions?!?!?

Created at 15 Oct 2014, 18:45
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!
97

9718853

Joined 14.10.2014

Is it possible to pause trade criteria to profit from changing conditions?!?!?
15 Oct 2014, 18:45


Hi everyone,

I'm testing a moving average cross robot which is generating profit from consolidating markets.

Stop Loss placement means that the robot is inactive during trends.

Is it possible to use a trade reversal instead of a Stop Loss to make profit from the trend? 

This reversal code would have to ignore all other trade signals until another Moving Average cross triggers the end of the trend and resumes the consolidation trading criteria...

Thank you in advance, 

Ian


@9718853
Replies

emeeder
15 Oct 2014, 23:56

Hi Ian,

Just an idea. Maybe i am misunderstanding what you want to do, but can't you just put all of your consolidating signal code inside an if("market is not trending") statement.

Then another if("when markets are trending").

Not sure what signal you are using to determine trending or consolidating.

Is it a multi currency robot?

 


9718853
16 Oct 2014, 00:53

Hi Emeeder, Thank you for commenting...

I've yet to come across such statements in CAlgo, I'll investigate in the morning... If you have any example code with these statements in use it would be great to see a snippet?

My robot is very simple: Whenever a 14 period Exponential moving average is above a 100 period EMA it creates a short position, and the opposite for a long position.... I've placed a 5 pip delay on entry to prevent over trading and the results are very good in consolidating markets...

The robot is profitable (without a stop loss) as the gains during consolidation are greater than the losses when trending... 

Now I simply need to reverse the trade temporarily when trend develops to reduce the drawdown and increase profit...

I'll post back here if I can find the solution tomorrow...

Thanks again..


@9718853