Multi 10:4 Trader EA

Post Reply
Wkcfx
Trader
Posts: 48
Joined: Sun Feb 17, 2013 6:25 am

Re: Multi 10:4 Trader EA

Post by Wkcfx »

slipshod wrote:Wkcfx, I believe my Sleep() suggestion was added to 1.07, so it won't help you I'm afraid. I've no idea what could be causing it, the EA's running just fine on 3 different MT4s for me. Is there anything in your Experts of Journal tabs? Any repetitive errors etc? Are you running with Stealth on?
Hi SlipShod, sorry for delay I'm working;
First earlier i forgot to mention, trading sys NB10.4 v5.0
Stealth= false

Only a couple of errors and or repetitive notes in experts journal.
market info B had many div0 errors, i removed it from all charts
this repeats for all pairs i have charting;
2013.03.21 14:15:56 Awesome AUDCAD,H4: removed
2013.03.21 14:15:56 Awesome AUDCAD,H4: uninit reason 1
2013.03.21 14:15:56 10.4 RSI2_on_NT_TMA AUDCAD,H4: removed
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: removed
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: uninit reason 1
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: deinitialized
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: removed
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: uninit reason 1
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: deinitialized

Anyway, thanks for your great effort and help!

I'm going to rung this out through tomorrow NY close and close everything out, load 1.08 when it's ready and start fresh Monday.

thanks
bill
MrLong

Re: Multi 10:4 Trader EA

Post by MrLong »

Wkcfx wrote:
slipshod wrote:Wkcfx, I believe my Sleep() suggestion was added to 1.07, so it won't help you I'm afraid. I've no idea what could be causing it, the EA's running just fine on 3 different MT4s for me. Is there anything in your Experts of Journal tabs? Any repetitive errors etc? Are you running with Stealth on?
Hi SlipShod, sorry for delay I'm working;
First earlier i forgot to mention, trading sys NB10.4 v5.0
Stealth= false

Only a couple of errors and or repetitive notes in experts journal.
market info B had many div0 errors, i removed it from all charts
this repeats for all pairs i have charting;
2013.03.21 14:15:56 Awesome AUDCAD,H4: removed
2013.03.21 14:15:56 Awesome AUDCAD,H4: uninit reason 1
2013.03.21 14:15:56 10.4 RSI2_on_NT_TMA AUDCAD,H4: removed
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: removed
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: uninit reason 1
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: deinitialized
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: removed
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: uninit reason 1
2013.03.21 14:15:56 NT TMATrue SlopeHisto MTF AUDCAD,H4: deinitialized

Anyway, thanks for your great effort and help!

I'm going to rung this out through tomorrow NY close and close everything out, load 1.08 when it's ready and start fresh Monday.

thanks
bill
That is the RSI version, 1.07 doesn't use those indicators.

Version 1.08 will do though, we have a choice of RSI or STOCH.

Andy
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Re: Multi 10:4 Trader EA

Post by snailbeard »

Wkcfx wrote:Great work guys! question; I've been testing on demo with GP, IC, Alpari and Oanda. I hope this is peculiar to my hardware but with v1.07 and about 10+ trades active I get pegged CPU and lockup no matter which broker I try? Also when I close the platform and no other apps are running the CPU stays 100% until I reboot the machine? I couldn't figure where to put Slipshod's suggestion of "Sleep()" I assume I have missed something. Any thoughts?

I'm running Win7 64 pro on a wired cat 6 lan, Intel Core2Duo 2.2GHz, 2GB, 4GB DDR2

I'll look forward to v1.08 and, if it is only my hardware, a new workstation.

thanks again!!
The DisplayGrid() screen update uses more CPU than the trading logic. I am running two copies Empty4+EA and on a 4-core machine and I get bursts of 100% CPU usage on 2 CPUs.

The simplest way of reducing the CPU load would be to reduce the rate at which the screen is updated,
depending on how you use it, this could be once per 5 seconds or once per minute, etc.

Also, MQL is heavy on string operations inside loops, I have some (untested) code to use index look-up instead of string comparisons:

Code: Select all

int allPipFactors[];

//+------------------------------------------------------------------+
//| expert Get Factor function
//+------------------------------------------------------------------+
double PFactorByName(string symbol) {
	
	for (int i = ArraySize(pipFactor) - 1; i >= 0; i--)
		if (StringFind(symbol, pipFactor[i], 0) != -1)
			return(pipFactors[i]);
	return(10000);
}


//+------------------------------------------------------------------+
//| Set up fast look-up for pip factor 
//+------------------------------------------------------------------+
void initPipFactors(string& arPairs[], int& arPipFactors[])
{

	int pairCount = ArraySize(arPairs);
	ArrayResize(arPipFactors, pairCount);

	for (int i = 0; i < pairCount; i++) {

			arPipFactors[i] = PFactorByName( arPairs[i] );
	}	
}

//+------------------------------------------------------------------+
//| Fast look-up for pip factor 
//+------------------------------------------------------------------+
int PFactor(int pairIndex ) { return (arPipFactors[pairIndex]) }

//+------------------------------------------------------------------+
//| Faster pip conversions 
//+------------------------------------------------------------------+
int doubleToPip(int symIndex, double d)
{
	return ( d * allPipFactors[symIndex] )
}

double pipToDouble(int symIndex, double pips)
{
	return ( pips / allPipFactors[symIndex])
}
Regards
Brian
User avatar
slipshod
Trader
Posts: 404
Joined: Tue Dec 27, 2011 9:14 am
Location: Australia

Re: Multi 10:4 Trader EA

Post by slipshod »

snailbeard wrote:The DisplayGrid() screen update uses more CPU than the trading logic. I am running two copies Empty4+EA and on a 4-core machine and I get bursts of 100% CPU usage on 2 CPUs.

The simplest way of reducing the CPU load would be to reduce the rate at which the screen is updated, depending on how you use it, this could be once per 5 seconds or once per minute, etc.
Excellent observation. The following lines added to the top of the DisplayGrid() function might help...

Code: Select all

static int lastDisplayed = 0;
int currentTime = TimeCurrent();

if (currentTime < lastDisplayed + 4)
   return;

lastDisplayed = currentTime;
Another option would be to add an extern bool that users could set to turn the dashboard off altogether if their computers were still experiencing problems.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Re: Multi 10:4 Trader EA

Post by snailbeard »

Pending orders and margins

Two similar demo accounts can produce quite different results, in my case AlpariUK throws out some orders because of the way it calculates margin. On the other hand FXDD did not kill any of the orders and the margin level is still over 600%. Therefore, the lot sizes are generally slightly higher for FXDD.

The AlpariUK margins are better in terms of risk, but it means pot luck on which orders are triggered and which are killed.

So ideally one should review the pending orders and rate them according to other factors by looking at the charts.

I can't think of a simple way of telling an EA what my preferences are because pending orders get triggered by price action possibly before my preferred choice and if I delete the less preferred pending orders the EA might put them back in again.

I could add an array filter timeDelayPair[PairIndex][datetime] or something similar to temporarily inhibit some pairs - giving other pending orders a chance to trigger instead of being killed by margin.

Just thinking out loud...

There does not seem to be a simple way of doing this. The Empty4 way would be to use another EA to input options for each pair and parameters and pass them via global variables.
It could be called ReviewPendingOrders and have several options for each pair, like
CanTrade true/false, TradeHours +hh:mm,-hh:mm, DelayPendingUntilTime: hh:mm

At the moment I am using the Demo account for hints and placing some of those trades in a real account. Which no doubt is the safest way to use an EA.
NoMeK
Posts: 2
Joined: Sat Jul 07, 2012 5:19 pm

Re: Multi 10:4 Trader EA

Post by NoMeK »

MrLong wrote:
TraderDesk wrote:Andy, I was wondering if there was a way to tie in the "currencySlopeStrength" indicator to the EA. The reasoning behind this is to allow trades to be place using the strongest and weakest currencies.

Example: On the indicator I have place two levels, .70 and -.70. If a currency crosses greater those levels I want the EA to start placing trades based on 10.4 logic.
Example: On the indicator if a currency crosses another currency then look to start placing trades off of those two currencies based on 10.4 logic
Example: On indicator take the top two and bottom two(user defined) currencies and trade accordingly to 10.4 logic

I don't know how intricate it is to add that.

Just some ideas thrown into the mix here... :)

Hi TD,

I'd like to keep it just the way Bob set rules, otherwise we will end up with an EA that's not 10.4.

Thanks for your feedback.

Andy
I think Bob mentoned this idea on his 10.4 tread too...
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: Multi 10:4 Trader EA

Post by fx800 »

Thank you very much MrLong for a great EA v1.07 and Bob for the underlying strategy.

The EA has been doing great on my live microlots account, and has increased equity by 10% from London open till 11 am London time when I closed all the trades manually.

Restart again at 12 midday. Will be interesting to see the result at London close.

Everything OOTB. No issues with CPU overload. No bugs to report.

I would expect a great deal more interest in this thread in no time.

Many congratulations again on your great effort and generosity.

peter.
SWG123
Trader
Posts: 565
Joined: Wed Nov 16, 2011 3:02 pm
Location: Cape Town

Re: Multi 10:4 Trader EA

Post by SWG123 »

Lots of interest here, looking forward to v1.08 :)
acostafulano
Trader
Posts: 243
Joined: Tue Dec 06, 2011 3:40 pm

Re: Multi 10:4 Trader EA

Post by acostafulano »

Hi everyone,

Something strange is happening in my platforms:

I'm trying a "default" setup which is running nicely and profitably
(Check SET 1, SCSHOT 1)

http://www.myfxbook.com/members/acostaf ... ult/400603


This has some buys and sells (trades and pending trades) open, looks pretty normal.

On the other hand, I have another platfrom running as per linuspoon's suggestion (using MPTM abd MPBM). So I've only changed TP/SL parameters, everything else I left untouched as you could see from the setfiles attached. (Set 2, SCSHOT 2)

http://www.myfxbook.com/members/acostaf ... oon/417242

The values on the dashboard are also pretty similar, only NO SHORT TRADES WHATSOEVER ON THE SECOND PLATFORM

I can't find any reasonable explanation, but I'm missing some good shorts here.

HElp!
You do not have the required permissions to view the files attached to this post.
MrLong

Re: Multi 10:4 Trader EA

Post by MrLong »

acostafulano wrote:Hi everyone,

Something strange is happening in my platforms:

I'm trying a "default" setup which is running nicely and profitably
(Check SET 1, SCSHOT 1)

http://www.myfxbook.com/members/acostaf ... ult/400603


This has some buys and sells (trades and pending trades) open, looks pretty normal.

On the other hand, I have another platfrom running as per linuspoon's suggestion (using MPTM abd MPBM). So I've only changed TP/SL parameters, everything else I left untouched as you could see from the setfiles attached. (Set 2, SCSHOT 2)

http://www.myfxbook.com/members/acostaf ... oon/417242

The values on the dashboard are also pretty similar, only NO SHORT TRADES WHATSOEVER ON THE SECOND PLATFORM

I can't find any reasonable explanation, but I'm missing some good shorts here.

HElp!
In Steves MPTM, check these settings.

extern string gen="----General inputs----";
double Lot=0.01;
bool TradeLong=true;
bool TradeShort=true; <===
extern int MagicNumber=0;

Just a thought.

Andy
Post Reply

Return to “Nanningbob 10.x”