New EA based on the !xMeter - page 55

 

I see what you mean. Yeah it's not supposed to do that. The only issue I remember seeing earlier in the thread had to do with partial lot sizes not being traded but that was a completely different error. Perhaps check if you find any error messages from the EA when it was placing those duplicate orders? IDK I'm sorry I can't be of much more help...only beginning to learn about EA programming but maybe another experienced programmer may chime in with a suggestion.

 

ive slowly gone threw the thread trying to understand this ea so i added fullpips ea file with jztrader set file but all i get is

Initializing EA, waiting for ticks...

on my FxPro mt4 seems its stuck on constructBrokerPairs cant figure out why wont load

 

Daily Trading Hours Quick Fix

FxChi:
Are you referring to getting caught on the wrong side of a trade and the EA keeps opening trades due to its grid nature? I haven't tested FP's version in a while as I've been primarily working with Venox's V2.1.1, but I think FP built in trading logic so that it doesn't open trades based on a fixed distance. I think you need to change the "RecoverTrigger" parameter from 0 to 4.5 if you want to keep it constant with your current trade trigger, but like I said I haven't played around with that EA in a while. Venox's version will average into trades based on a fixed distance though. From observing the EA over several weeks now, I think having control over trading times is very important. There are times when news announcements cause temporary spikes which will trigger trades. Also there are times when the EA attempts to take a trade at the end of New York session when trading activities die down and we're caught holding until next session. Would be nice to choose specific times to only allow trades then.

Quick fix to allow daily hour trade times:

In the beginning of the Init Section add the following 4 statements:

if (eipauseStartTime>=70000)

eiPauseStartTime=eiPauseStartTime-70000+DayOfWeek()*10000;

if (eiPauseEndTime>=70000)

eiPauseEndTime=eiPauseEndTime-70000+DayOfWeek()*10000;

Then enter 7HHMM in eiPauseStartTime & 7HHMM in eiPauseEndTime

====Example:

To trade every day from 9:00AM to 5:00PM:

eipauseStartTime=71700

eipauseEndTime =70900

Field Names are different from PiPs version because that version is VERY POORLY CODED & FULL OF KLUDGED PATCHES

This should work provided you stop and start the program every day. If you dont, then this also needs to be done when the day changes.

This eipauseStartTime and eipauseEndTime should have been encapsulated in a single function, and not all over the place like that version is coded now.

WHEN EVERYTHING ELSE FAILS.... READ THE INSTRUCTIONS!!!

KOMODODRAGON

 

AllowNewTrades vs. PauseTrades Clarification

Hi All.

This is a clarification about the PauseTrades fix. I have corrected the times given on the example to describe daily trading periods. I had erroneously entered the times in reverse order. This is because the concept PauseTrades is contrarian to the concept AllowTrades. Either you code with AllowTrades/!AllowTrades or PauseTrades/!PauseTrades. These 2 variables used throughout the code are redundant, and to make matters worse, they are contrarian in nature. Confusingly enough, the default is set to not trade on the weekend(as if you could!).

I will shortly be putting out another release that uses the date fields to AllowTrades or disAllowTrades, discarding the NewTradesAllowed flag, as well as allowing daily TimePeriods to Trade(Day#7=TodaysDayOfWeek). To DisAllowTrades,set Day to 6(Saturday). This will also allow you to see the long and short trades, as the current AllowNewTrades flag currently blocks that information if it is set to false.

 
vosterfxandy:
i know, this is what often happens with EAs. Always evolving. This is good, but i really hope the end outcome is a great ea!

Problem is, most EAs don't need evolution.

They need revolution!

 
FxChi:
I see what you mean. Yeah it's not supposed to do that. The only issue I remember seeing earlier in the thread had to do with partial lot sizes not being traded but that was a completely different error. Perhaps check if you find any error messages from the EA when it was placing those duplicate orders? IDK I'm sorry I can't be of much more help...only beginning to learn about EA programming but maybe another experienced programmer may chime in with a suggestion.

how do I execute a partial lot trade?

lets say I have 3 lots long on the EURUSD and want to take out 0.5 Lot is that possible?

 

Trading manually?

Just close lot size 0.5: in metatrader - right mouse click on this trade, select 'Close order' and select lot size.

 
KomodoDragon:
]Greetings:

As my first contribution to the site, I am attaching my !xMeterEA which is a Rewrite of !xMeter_v2.1. Seeing as the maintenance for this EA has become problematic due to its lack of structure and duplicity of code, i have rewritten it in a modular fashion, with common functions.

IMHO, it is far easier to understand than its previous versions, as well as outperforms them execution-wise. For those purists concerned with locality of code, replace the common functions with includes.

Installation:

1.Place the quickSort.mqh in the include Folder

2.Place the !xMeterEA.mq4 in the experts Folder.

3.Compile and read Notes at bottom of Comments Section.

Any and all comments will be welcomed!!! Enjoy...

Am I the only one who can't open the ZIP file? Re-installed Winzip a couple of times, to no avail. Anyone mind to upload the indicator?

Thanks, appreciate it!

 
KomodoDragon:
Hi All.

This is a clarification about the PauseTrades fix. I have corrected the times given on the example to describe daily trading periods. I had erroneously entered the times in reverse order. This is because the concept PauseTrades is contrarian to the concept AllowTrades. Either you code with AllowTrades/!AllowTrades or PauseTrades/!PauseTrades. These 2 variables used throughout the code are redundant, and to make matters worse, they are contrarian in nature. Confusingly enough, the default is set to not trade on the weekend(as if you could!).

I will shortly be putting out another release that uses the date fields to AllowTrades or disAllowTrades, discarding the NewTradesAllowed flag, as well as allowing daily TimePeriods to Trade(Day#7=TodaysDayOfWeek). To DisAllowTrades,set Day to 6(Saturday). This will also allow you to see the long and short trades, as the current AllowNewTrades flag currently blocks that information if it is set to false.

KomodoDragon:

Do you still planning on releasing an updated version?

 

So.. which is the most reliable and profitable version of this amazing miracle EA xmeter??

Reason: