Whipsaw Or Trend

 
Hi, I have developed and run two EAs. One catches WHIPSAWs and other catches TRENDs. Both are highly profitable in the short runs. But I've found both unprofitable in the long runs as the WHIPSAW one got done by the long trends and the TREND one lost heavily when the market just whipsaws for a long time. My question is - Is it possible to develop an EA that combines my two EAs and also switches between WHIPSAW and TREND algorithms, based on a market condition or conditions? - thanks.
 
EuroTrader wrote >>
Hi, I have developed and run two EAs. One catches WHIPSAWs and other catches TRENDs. Both are highly profitable in the short runs. But I've found both unprofitable in the long runs as the WHIPSAW one got done by the long trends and the TREND one lost heavily when the market just whipsaws for a long time. My question is - Is it possible to develop an EA that combines my two EAs and also switches between WHIPSAW and TREND algorithms, based on a market condition or conditions? - thanks.


I suggest use of GlobalVariable or file as a flag between your two EA. When one is profitable, it flag the other not to trade.

You can also use FGDI indicator https://www.mql5.com/en/code/9604 to detect Trend.

 
Matutin:


I suggest use of GlobalVariable or file as a flag between your to EA. When one is profitable, it flag the other not to trade.

You can also use FGDI indicator https://www.mql5.com/en/code/9604 to detect Trend.

Thanks Matutin,

What you mean is to load two EAs together on same chart and flag only one to trade?

Is it possible to load two EAs together on one chart? I am sort of new to this automated trading business. Thanks.

 
EuroTrader wrote >>

Thanks Matutin,

What you mean is to load two EAs together on same chart and flag only one to trade?

Is it possible to load two EAs together on one chart? I am sort of new to this automated trading business. Thanks.





No, only one EA per chart. I suggest two charts on same pairs. One with WHIPSAWs EA and the other with TRENDs EA.
 
Matutin,

So I run two charts on same EURUSD pair. Then load WHIPSAW EA on one chart and TREND EA on the other.

But what I understand is once the EA is loaded it will run till it is REMOVED from the chart.

So how do I stop the EA from running without REMOVING it, and then how do I RESTART it?

I hope I don't sound too stupid asking you these questions, thanks.
 
EuroTrader wrote >>
Matutin,

So I run two charts on same EURUSD pair. Then load WHIPSAW EA on one chart and TREND EA on the other.

But what I understand is once the EA is loaded it will run till it is REMOVED from the chart.

So how do I stop the EA from running without REMOVING it, and then how do I RESTART it?

I hope I don't sound too stupid asking you these questions, thanks.


So I run two charts on same EURUSD pair. Then load WHIPSAW EA on one chart and TREND EA on the other.
Yes


So how do I stop the EA from running without REMOVING it, and then how do I RESTART it?
You can add a fonction to analyse result. If results become bad : stop trading and flag via GlobalVariable or File the other EA to trade and so on.

 
Thanks Matutin,

You may have saved me much money. I will try to figure out how to implement what you suggest.

Thanks again, mate, and good night.
 
EuroTrader wrote >>
Thanks Matutin,

You may have saved me much money. I will try to figure out how to implement what you suggest.

Thanks again, mate, and good night.


The question is also how you determine is trend or WHIPSAWs?
Then will be more easy to implement in your EA to trade or not.

Fore Example you have an indicator which is showing the trend ...
In your WHIPSAWs EA you can implement ... "IF (Trendindicator Shows Trend) -->> return without open new trades and maybe closing existing trades.
In your Trend EA .. if (Trendindicator dont shows Trend) -->> return without open new trades and maybe closing existing trades
 
Hi,

I found it very hard to make two EAs work together from the different charts. That stupid error 416 or 419 (Trade Context Busy) kept on popping up. From a single terminal the EAs seemed to be clashing with each other whenever they tried to perform the ordering special functions.

So instead I simply combined the EAs together into one big EA and run both WHIPSAW and TREND catcher EAs from the same chart. The result was astounding. The picture is the Strategy tester result for yesterday 30 Minute EURUSD.

For some reason it started working like a hedge pair with a small profit almost every bar. It gave big profit when the bad UK-unemployment-claims number came out and pushed down the market like hell.

I am now trading one micro-lot only to test the new EA in real time. Hopefully the performance will repeat.

 
With $200 S/L and $700 P/T for Trend EA and $200 S/L and $500 P/T for Whipsaw EA the weekly result becomes much better and consistent over almost every week. The picture is the result for 19/4/2010 to 24/4/2010 week for 30 mins EURUSD.

Reason: