New EA based on the !xMeter - page 31

 

xMeter correction

venox250:
I also made some modifications in the code which I'd like to share.

I found some bugs in the code which I corrected. See new attachment.

 

Thanks for your efforts and sharing the last version. I've put it on a forex.com demo account today (sunday night) with default settings. (swap choice:2) it hasn't traded yet. Hope it works well...

 
victor57:
Thanks for your efforts and sharing the last version. I've put it on a forex.com demo account today (sunday night) with default settings. (swap choice:2) it hasn't traded yet. Hope it works well...

Make sure You have all symbols enabled in Market Watch (right click, show all). It did trade on my account today but keep in mind that executed trades might differ from broker to broker.

 

@venox250

..wow..so this looks very well .. good job Mik..THX

btw: ..perfect portfolio for your website..

 
radas070:
..wow..so this looks very well .. good job Mik..THX btw: ..perfect portfolio for your website..

Thanks

I recently found a bug which causes xMeter to enter an infinite loop sometimes (if too many pairs are correlated and/or in use). The correction is here (with some minor display modifications) and I also remove the old one. All other logics are intact.

Happy hunting

MikKi

 

correlation and swap filtering

I further developed xMeter, here are the modifications I made.

The main addition I made is the support for filtering correlated currencies. This means that if xMeter opens a position it won't open any positions on any correlated pairs in the similar direction while the original one is open. This of course doesn't affect recovery mode.

For example: if AUDJPY buy was opened, it won't open EURNZD sell (in current market conditions). Correlation is calculated after every position open but at least every minute based on the H1 close prices for the last few bars (xMeterLookBackPer parameter).

A second addition is the option to let xMeter choose automatically which symbols to trade. The selection logic queries all the available symbols supported by broker (based on 112 currency names and a SpecialPairs variable for any other symbol, e.g.: XAGUSD). All these symbols are sorted by their current spread values ascending. This list (separate buy and sell) is filtered by the correlation filter. The remaining currencies might be traded in ther order of priority (lower spread first) if an open signal is fired.

The 3rd addition is a swap value filter. xMeter now observes swap values for every currency. It has 3 modes (SwapMode parameter):

0: don't care - this is the operation mode of all previous versions

1: better direction - open trades only in the greater swap direction (if EURUSD buy/sell swap is -0.1/-0.59, it will allow only EURUSD buy, however, it still has negative swap)

2: non-negative only - it will trade only in positive swap direction or will not trade if all swap values are negative.

The swap values are queried regularly as they may change.

Fourth addition. Recovery trade opening and new trade opening logic is now separated. xMeter now handles all it's previously opened positions even if the specific pair is not currently allowed to trade (e.g. automatic pair selection was changed to manual). This filtering is based on order magic number.

Fifth change: there were many (!) minor bugs in the code, especially recursive loop which could cause stack overflow, OrderSelect() calls were not checked if they were successful, etc. Also, xMeter now won't close all open positions if their total profit went into positive. Previous versions did close ALL (even manually opened ones) positions in such case!

A minor change: the display was totally rewritten.

Now xMeter looks pretty useful to me.

Any thoughts?

 

Meter is Trading.

Just installed it and it is working on Forward- Demo account.

Thanks for gr8 EA.

 

Spread Error

Currently getting spread errors from the EA. Spread is set at 10 but resulting in open order errors. Is 10 a good number to use. Is this just protecting me from news days? Should I stick with a spread filter of 10?

Suggestions welcome.

 

SpreadLimit & upgrades

ejohnston5:
Currently getting spread errors from the EA. Spread is set at 10 but resulting in open order errors. Is 10 a good number to use. Is this just protecting me from news days? Should I stick with a spread filter of 10? Suggestions welcome.

There are a few use cases for the spread filter:

- You have a variable spread broker and don't want to trade extreme volatility markets,

- You only want to trade the majors (they usually have a tighter spread),

- I don't know any more

I left it as 10 to not to cause any troubles, however, I use it myself on 35 which allows xMeter to trade any pair.

Also note that if You have a 5 digit broker You should multiply SpreadLimit by 10.

You should experiment with various SpreadLimit values on demo and select that one which suits Your needs and trading style. Also note that xMeter's strading 'style' highly depends on broker (own experience).

I'm considering doing some more upgrades on xMeter. If anyone here has ideas please write them here. My next idea is to improve (a) the grid averaging of the recovery positions and (b) not to re-enter the same pair/direction immediately after a successful trade.

a) xMeter should precalculate the required TP level to get into breakeven and set all order's TP to that value. This would improve overall performance because now orders are closed individually which may result closing of them on a different price than optimal (this could be good and bad too).

b) I'm not yet sure if this would result in better performance but it might be worth a try.

Any ideas?

 

has anyone backtested the latest version recently?

Reason: