Can EAs be coded to do virtual Trades?

 

Different EAs(trending, rangebound,etc) perform differently under different conditions such that it will a streak of winners and losing trades. Can EAs be modified to trade virtual or real lots based on equity curve condition?

 

Probably

I think I understand what you are asking. Rather than take a trade and risk actual money, you want an EA to act like a trade is in progress and record whether the outcome was positive or not. I guess if you had the kind of EA that has "runs" rather than seemingly random spaced wins and losses, this might be advantageous. But most EAs I am familar with don't perform like this. They win more in one market condition than in another but they also lose in both situations, so you couldn't determine the condition of the market by counting consecutive wins / losses.

 

It is trivial to get an EA to trade virtually and count virtual profits, however, what is the purpose of doing so? You might garner 4 successive positive profits, and decide to enter the on the 5th trade, and it might be a loss?

Past success does not count towards future profits.

 

I am not talking about consecutive/successive losses or wins for an immediate win the very next round but rather something like a higher-high equity curve from a range-block sample of trades. For e.g, setting real trade condition only if in the last 7 trades,any 4 are winners.

Range(S&R) EAs and trend focused ones tend to perform inversely from each other within the same range period or block of trades.

Anyway, just wanted to know from real coders, is it really "trivial" to get the same EA to switch between real or virtual lots depending on trade count condition?

 
scalpmaster:
Anyway, just wanted to know from real coders, is it really "trivial" to get the same EA to switch between real or virtual lots depending on trade count condition?

Yes. There is an easy solution and a moderately easy solution.

The easy solution, use 2 instances of mt4, one on demo, one on real, the demo account does the trades on _every_ entry, and when it fulfills your condition, store a value to a text file. The real account checks for entry conditions and only enters when the magic value is found in the text file, then it clears the text file.

The moderately easy solution is to use variables to check whether the past x trades have been successful, when condition is fulfilled, next time an entry is spotted, enter in real lots.

 
beckham.is.619:
The moderately easy solution is to use variables to check whether the past x trades have been successful, when condition is fulfilled, next time an entry is spotted, enter in real lots.

Thanks. How does the moderately easy solution identify when to re-enter real lots without knowing if the EA that has supposingly say, not traded real lots for the last 15 rounds, satisfy the condition of (4,7) rounds without trading virtual lots? Can you use variables to check whether the past x trades have been successful virtually?

Reason: