forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Forum

Forex Software, Forex Strategies, Expert Advisors Generator

You are not logged in. Please login or register.


Forex Forum → Expert Advisor Studio → Reverse trade option in EA

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 11

Topic: Reverse trade option in EA

Hi All,

Just wondering if there is a way to reverse the trade e.g from a buy to sell if the logic of the EA tells it to be a buy?

Not to change the EA logic but only the opened trade to the opposite direction?

Is this possible just wondering..

Much appreciated,
Roberto

Re: Reverse trade option in EA

You can modify the expert easily.

In the ManageOpen() function replace OP_BUY with OP_SELL and vice versa. It must be arraund line 160 in the EA.

   if(canOpenLong)
      OpenPosition(OP_BUY);
   else if(canOpenShort)
      OpenPosition(OP_SELL);

However, please note that EA Studio creates the best experts for the given market data and settings. The reversed signals may not achieve similar performance.

Re: Reverse trade option in EA

this idea i also have a time ago...you think wow great strategies great profits..than trade goes against you...when you have much of them against you running why not make it in opposite way change buy with sell..:-)

Re: Reverse trade option in EA

Hi,

It is possible to do that for an entire portfolio ea ?

Thankyou

Re: Reverse trade option in EA

Someone know how to do that ?

Thankyou

6 (edited by hannahis 2020-07-21 07:54:36)

Re: Reverse trade option in EA

you can use Fxblue copy trade to do reverse copy for all positions, symbols, magic number etc

Re: Reverse trade option in EA

Yes I've already do that but I have to much slippage ..

8 (edited by hannahis 2020-07-21 11:07:46)

Re: Reverse trade option in EA

Popov wrote:

However, please note that EA Studio creates the best experts for the given market data and settings. The reversed signals may not achieve similar performance.

I totally agree.  I've written long ago about the reverse trading. 

In a simplistic terms, we think that a bad EA is due to wrong direction.  However, upon closer examination, it's far more complicated why an EA isn't making money.

1. Wrong direction (simplistic view)

2. Correction direction but late exit

3. Correction direction but premature exit (low reward/drawdown ratio)

So even if you reverse a bad EA, you don't turn a bad EA into a good EA.  Because a good Ea comprised of both good opening rules and closing rules.  Reversing the opening direction doesn't reverse the closing rules because bad EA usually exit because of hitting SL or tight SL or premature exit.

I won't want to waste time "harvesting" bad EA and hoping reverse trade will make it profitable.  Even if it's profitable, I don't think it's performance metrics such as profit factor etc would be outstanding.

Nevertheless, out of curiosity, we sometimes still want to try despite being told not too.  I tried and thus I speak.

Re: Reverse trade option in EA

hannahis wrote:

I totally agree.  I've written long ago about the reverse trading. 

In a simplistic terms, we think that a bad EA is due to wrong direction.  However, upon closer examination, it's far more complicated why an EA isn't making money.

1. Wrong direction (simplistic view)

2. Correction direction but late exit

3. Correction direction but premature exit (low reward/drawdown ratio)

So even if you reverse a bad EA, you don't turn a bad EA into a good EA.  Because a good Ea comprised of both good opening rules and closing rules.  Reversing the opening direction doesn't reverse the closing rules because bad EA usually exit because of hitting SL or tight SL or premature exit.

I won't want to waste time "harvesting" bad EA and hoping reverse trade will make it profitable.  Even if it's profitable, I don't think it's performance metrics such as profit factor etc would be outstanding.

Nevertheless, out of curiosity, we sometimes still want to try despite being told not too.  I tried and thus I speak.

Spot on H. Here is a good example of a system with an exceptionally poor result (green) and the result (in blue) if I flipped it.

https://atstradingsolutions.com/wp-content/uploads/2020/07/Flipped-strategy.png

Clearly there was no serial correlation present in the equity curve despite the visual deteriorating performance.

The vast majority of strategies that are profitable simply are a result of 'random' luck. Very few possess a definitive edge where the positive bias in the series is sufficient to overcome the negative bias of frictional costs.

....but there are a  few instances where evidence of serial correlation in a declining equity curve can mean that a flipped strategy is profitable....however they are as hard to find as profitable strategies with an edge.

Diversification and risk-weighted returns is what this game is about

Re: Reverse trade option in EA

You are going to be hard pressed using small sample sizes trying to determine what is a random effect verses what is a 'biased' deterministic affect in a market where only a weak edge is present.

Here are the results of 30 systems applied to random market data over 500 trades. The red equity curve is a result derived from 'biased market data. By using smaller sample sizes, performance metrics will not pick this up.

https://atstradingsolutions.com/wp-content/uploads/2020/07/500-Trades.png

Only with a large trade sample will you have a hope of discriminating between a random equity curve versus a non-random one.

https://atstradingsolutions.com/wp-content/uploads/2020/07/10000-Trades.png

Diversification and risk-weighted returns is what this game is about

Re: Reverse trade option in EA

Thank you very much to both of you for you're great explanation,
it save me a lot of time, few month for sure!
I can't be more grateful !

I am reading a lot of you're post in this forum and I'm learning so much ..

Thank you !

Posts: 11

Pages 1

You must login or register to post a reply

Forex Forum → Expert Advisor Studio → Reverse trade option in EA

Similar topics in this forum


Generated in 0.018 seconds (81% PHP - 19% DB) with 11 queries