stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Multi 10:4 Trader EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1619
Page 28 of 160
Author:  Wkcfx [ Fri Mar 22, 2013 1:00 am ]
Post subject:  Re: Multi 10:4 Trader EA

MrLong wrote:
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
Roger that thanks! I'll stand by for 1.08.
FYI i did improve the CPU drain by switching all my charts to the 1H NB 10.4 v.5 which uses STOCH. I just pop up to 4H as required.

Also thanks to Slipshod!

Bill
Author:  Wkcfx [ Fri Mar 22, 2013 1:29 am ]
Post subject:  Re: Multi 10:4 Trader EA

snailbeard wrote:
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
Thanks Very much Snailbeard!
Bill
Author:  Jonathan2FI [ Fri Mar 22, 2013 8:41 am ]
Post subject:  Re: Multi 10:4 Trader EA

fx8000 wrote:
fx8000 wrote: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.

At London close today, the live microlot account is in the red by less than 0.05% of equity. It was up almost 2% from 12 midday to 3 pm, then retracements brought the account into negative territory. I have closed the pair in profit and leave three pairs to run. All in all, it has been a very positive day, not something I can say about other ea's I have tried before. From tomorrow, I will use Steve's MPTM to prevent a winning trade turn into a losing one (BE25+10 JS10).

I have also set up a demo on Cowboy IBFX 10K risk 2% and leaving it to run 24/7. It was launched at 12 midday today, the results attached below. As you can see, it was up 1.25% of equity balance at one stage but was in the red at London close. I have now added MPTM BE25+10 JS10.
.................................
Peter,
I am also following this EA with a similar strategy to yours with micro live Axi on a vps and 10k risk 2%demo on GKFX. I have followed NB strats for 2 yrs and look for strats that I can mange at weekend and an hour at London close during the week- heavy day job. I have also seen results 8% from last Friday retrace to 4% by mid week. Some quick questions.
1. Do you edit the pairs being traded and remove any like e.g Gold ! which I have never had much success with apart from on my finger.
2. Do you use any discretionary or indicators for S&R / TLs to influence the trade strategy on this EA or just rely on the Pivots?
3. Using Steve's MPTM - to avoid equity curve retracement thanks for the tip I assume keep stealth on - comment?
4. Have you done any single pair back testing on this EA?
Thanks Jonathan
Author:  nubika [ Fri Mar 22, 2013 9:17 am ]
Post subject:  Re: Multi 10:4 Trader EA

Guys,

I loaded 1.08 version on 2 broker platforms, but so far did not even place pending orders. Running all day now. The other one on FXCM does not even work properly the "correlated pairs " section is just blank. Nothing comes up.
Global Prime looks OK with the setup, but no pending orders all day. 1.07 still works well and running smoothly.

If any of you have a working and successful set file on 1.08, please post it here or list your settings.

Thanks
Frank
Author:  TraderDesk [ Fri Mar 22, 2013 9:22 am ]
Post subject:  Re: Multi 10:4 Trader EA

nubika wrote:Guys,

I loaded 1.08 version on 2 broker platforms, but so far did not even place pending orders. Running all day now. The other one on FXCM does not even work properly the "correlated pairs " section is just blank. Nothing comes up.
Global Prime looks OK with the setup, but no pending orders all day. 1.07 still works well and running smoothly.

If any of you have a working and successful set file on 1.08, please post it here or list your settings.

Thanks
Frank
I have 1.08 running with OOB settings for the last 12 hours and it has 4 pending at the moment...
Author:  Sojourner [ Fri Mar 22, 2013 9:28 am ]
Post subject:  Re: Multi 10:4 Trader EA

Up 200 pips for the week, guys. Closed my trades manually. Lost some switching to the new version as I was not sure the new version would take over the old versions trades.

Sure, it's too early to tell just what this puppy is made of, as one week is hardly something to make long term claims on, but I'm telling ya I've tested probably hundreds and hundreds of EA and one sort of gets a 'feel' about and EA as they watch it work and I really like the feel and style of this one.

I confess, I don't know the 10.* strategy very well, if at all (I know I should but....) but I'm not here critiquing that.

High five to all the folks putting their heart and soul into this thing I now affectionately call the Nanningbob Cyclone.

Coding is clearly over my head but I hope I can at least tell you what is 'happening' with mine on my FXCM live account using microlots. If anything I can at least thank everyone and cheer them on.

Fantastic work and have a fantasmical weekend!
Author:  Baluda [ Fri Mar 22, 2013 9:51 am ]
Post subject:  Re: Multi 10:4 Trader EA

Andy,

Here is the code to internalize the RSI call and calculation.

Code: Select all

//+------------------------------------------------------------------+
//| GetSlopeRSI()                                                                         |
//+------------------------------------------------------------------+
double GetSlopeRSI(string symbol, int tf, int shift)
{
   double slope[];
   int workPeriod = 17;                                         // RSI period Bob's default = 2, + overhead
   ArrayResize( slope, workPeriod );
   ArraySetAsSeries( slope, true );
   for ( int i = 0; i < workPeriod; i++ )
   {
      slope[i] = GetSlope( symbol, tf, shift + i );
   }
   return( iRSIOnArray( slope, workPeriod, 2, 0 ) );    // Again, 2 is Bob's default
}

//+------------------------------------------------------------------+
//| GetSlope()                                                                              |
//+------------------------------------------------------------------+
double GetSlope(string symbol, int tf, int shift)
{
   int shiftWithoutSunday = shift;
   if ( addSundayToMonday && sundayCandlesDetected && tf == PERIOD_D1 )
   {
      if ( TimeDayOfWeek( iTime( symbol, PERIOD_D1, shift ) ) == 0  ) shiftWithoutSunday++;
   }   
   double atr = iATR(symbol, tf, 100, shiftWithoutSunday + 10) / 10;
   double gadblSlope = 0.0;
   if ( atr != 0 )
   {
      double dblTma = calcTmaTrue( symbol, tf, shiftWithoutSunday );
      double dblPrev = calcPrevTrue( symbol, tf, shiftWithoutSunday );
      gadblSlope = ( dblTma - dblPrev ) / atr;
   }
   
   return ( gadblSlope );

}

//+------------------------------------------------------------------+
//| calcTmaTrue()                                                                        |
//+------------------------------------------------------------------+
double calcTmaTrue( string symbol, int tf, int inx )
{
   // return ( iMA( symbol, tf, 21, 0, MODE_LWMA, PRICE_CLOSE, inx ) );

   double dblSum  = 0;
   double dblSumw = 0;
   int jnx, knx;
   int sundayCandles = 0;

   for ( jnx = 0, knx = 21; jnx < 21; jnx++, knx-- )
   {
      if ( addSundayToMonday && sundayCandlesDetected && tf == PERIOD_D1 )
      {
         if ( TimeDayOfWeek( iTime( symbol, PERIOD_D1, inx + jnx + sundayCandles ) ) == 0 ) sundayCandles++;
      }   
      dblSum  += iClose( symbol, tf, inx + jnx + sundayCandles ) * knx;
      dblSumw += knx;
   }
   
   return ( dblSum / dblSumw );
}

//+------------------------------------------------------------------+
//| calcPrevTrue()                                                                        |
//+------------------------------------------------------------------+
double calcPrevTrue( string symbol, int tf, int inx )
{
   double dblSum  = iClose( symbol, tf, inx ) * 20;
   double dblSumw = 20;
   int jnx, knx;
   int sundayCandles = 0;
   
   for ( jnx = 1, knx = 21; jnx < 22; jnx++, knx-- )
   {
      if ( addSundayToMonday && sundayCandlesDetected && tf == PERIOD_D1 )
      {
         if ( TimeDayOfWeek( iTime( symbol, PERIOD_D1, inx + jnx + sundayCandles ) ) == 0 ) sundayCandles++;
      }   
      dblSum  += iClose( symbol, tf, inx + jnx + sundayCandles ) * knx;
      dblSumw += knx;
   }
   
   return ( dblSum / dblSumw );
}
Get the RSI with a call to GetSlopeRSI().

Only two global variables are needed, addSundayToMonday and sundayCandlesDetected. Add those and set them to false (or delete the relevant lines from the codes above).

Paul
Author:  slipshod [ Fri Mar 22, 2013 10:18 am ]
Post subject:  Re: Multi 10:4 Trader EA

TraderDesk wrote:
nubika wrote:Guys,

I loaded 1.08 version on 2 broker platforms, but so far did not even place pending orders. Running all day now. The other one on FXCM does not even work properly the "correlated pairs " section is just blank. Nothing comes up.
Global Prime looks OK with the setup, but no pending orders all day. 1.07 still works well and running smoothly.

If any of you have a working and successful set file on 1.08, please post it here or list your settings.

Thanks
Frank
I have 1.08 running with OOB settings for the last 12 hours and it has 4 pending at the moment...
I've had it running on two fresh Empty4 installs for the last 12 hours, one using RSI (OOB) and the other Stoch. Neither have placed any pending trades, and the Type & Trend columns are empty except for on AUDJPY where it says Long and UT. Not sure what the problem is :\

Edit: Just loaded 1.07 on one of the blank installs - again no trades. Loaded 1.06 and it places a long on AUDJPY but that's all. Perhaps its just how the market was today & its working as it should?
Author:  MrLong [ Fri Mar 22, 2013 10:24 am ]
Post subject:  Re: Multi 10:4 Trader EA

Baluda wrote:Andy,

Here is the code to internalize the RSI call and calculation.

Code: Select all

//+------------------------------------------------------------------+
//| GetSlopeRSI()                                                                         |
//+------------------------------------------------------------------+
double GetSlopeRSI(string symbol, int tf, int shift)
{
   double slope[];
   int workPeriod = 17;                                         // RSI period Bob's default = 2, + overhead
   ArrayResize( slope, workPeriod );
   ArraySetAsSeries( slope, true );
   for ( int i = 0; i < workPeriod; i++ )
   {
      slope[i] = GetSlope( symbol, tf, shift + i );
   }
   return( iRSIOnArray( slope, workPeriod, 2, 0 ) );    // Again, 2 is Bob's default
}

//+------------------------------------------------------------------+
//| GetSlope()                                                                              |
//+------------------------------------------------------------------+
double GetSlope(string symbol, int tf, int shift)
{
   int shiftWithoutSunday = shift;
   if ( addSundayToMonday && sundayCandlesDetected && tf == PERIOD_D1 )
   {
      if ( TimeDayOfWeek( iTime( symbol, PERIOD_D1, shift ) ) == 0  ) shiftWithoutSunday++;
   }   
   double atr = iATR(symbol, tf, 100, shiftWithoutSunday + 10) / 10;
   double gadblSlope = 0.0;
   if ( atr != 0 )
   {
      double dblTma = calcTmaTrue( symbol, tf, shiftWithoutSunday );
      double dblPrev = calcPrevTrue( symbol, tf, shiftWithoutSunday );
      gadblSlope = ( dblTma - dblPrev ) / atr;
   }
   
   return ( gadblSlope );

}

//+------------------------------------------------------------------+
//| calcTmaTrue()                                                                        |
//+------------------------------------------------------------------+
double calcTmaTrue( string symbol, int tf, int inx )
{
   // return ( iMA( symbol, tf, 21, 0, MODE_LWMA, PRICE_CLOSE, inx ) );

   double dblSum  = 0;
   double dblSumw = 0;
   int jnx, knx;
   int sundayCandles = 0;

   for ( jnx = 0, knx = 21; jnx < 21; jnx++, knx-- )
   {
      if ( addSundayToMonday && sundayCandlesDetected && tf == PERIOD_D1 )
      {
         if ( TimeDayOfWeek( iTime( symbol, PERIOD_D1, inx + jnx + sundayCandles ) ) == 0 ) sundayCandles++;
      }   
      dblSum  += iClose( symbol, tf, inx + jnx + sundayCandles ) * knx;
      dblSumw += knx;
   }
   
   return ( dblSum / dblSumw );
}

//+------------------------------------------------------------------+
//| calcPrevTrue()                                                                        |
//+------------------------------------------------------------------+
double calcPrevTrue( string symbol, int tf, int inx )
{
   double dblSum  = iClose( symbol, tf, inx ) * 20;
   double dblSumw = 20;
   int jnx, knx;
   int sundayCandles = 0;
   
   for ( jnx = 1, knx = 21; jnx < 22; jnx++, knx-- )
   {
      if ( addSundayToMonday && sundayCandlesDetected && tf == PERIOD_D1 )
      {
         if ( TimeDayOfWeek( iTime( symbol, PERIOD_D1, inx + jnx + sundayCandles ) ) == 0 ) sundayCandles++;
      }   
      dblSum  += iClose( symbol, tf, inx + jnx + sundayCandles ) * knx;
      dblSumw += knx;
   }
   
   return ( dblSum / dblSumw );
}
Get the RSI with a call to GetSlopeRSI().

Only two global variables are needed, addSundayToMonday and sundayCandlesDetected. Add those and set them to false (or delete the relevant lines from the codes above).

Paul

Thanks Paul.
Author:  MrLong [ Fri Mar 22, 2013 10:30 am ]
Post subject:  Re: Multi 10:4 Trader EA

slipshod wrote:
TraderDesk wrote:
nubika wrote:Guys,

I loaded 1.08 version on 2 broker platforms, but so far did not even place pending orders. Running all day now. The other one on FXCM does not even work properly the "correlated pairs " section is just blank. Nothing comes up.
Global Prime looks OK with the setup, but no pending orders all day. 1.07 still works well and running smoothly.

If any of you have a working and successful set file on 1.08, please post it here or list your settings.

Thanks
Frank
I have 1.08 running with OOB settings for the last 12 hours and it has 4 pending at the moment...
I've had it running on two fresh Empty4 installs for the last 12 hours, one using RSI (OOB) and the other Stoch. Neither have placed any pending trades, and the Type & Trend columns are empty except for on AUDJPY where it says Long and UT. Not sure what the problem is :\

Edit: Just loaded 1.07 on one of the blank installs - again no trades. Loaded 1.06 and it places a long on AUDJPY but that's all. Perhaps its just how the market was today & its working as it should?

Hi slipshod,

Have you tried it with this setting set to false?
extern bool useBoundryFilter =true;

Andy
All times are UTC Page 28 of 160