MultiBob, a multi symbol NB10.2(a) autotrader

Share your 10.x automated traders here.
Post Reply
phil_trade

Re: MultiBob, a multi symbol NB10.2(a) autotrader

Post by phil_trade »

Hi Paul

MultiBob is filling the expert log with same message

2012.10.02 08:48:30 MultiBob v1.0.1 EURUSD,H1: CHFJPY: PIVOT LONG SELL, 83.299, 83.0467
Multi Bob 10.2a config message bug.PNG
there is no trade CHFJPY

Philippe
You do not have the required permissions to view the files attached to this post.
phil_trade

Re: MultiBob, a multi symbol NB10.2(a) autotrader

Post by phil_trade »

lvdfx888 wrote:
phil_trade wrote:
lvdfx888 wrote:Thanks Paul for the new version.

Loaded v1.1.8 with 10.2a enabled, 3 trades were opened even there's no DP cross. Although it's in the right direction with profits :D, but too far from DP.
ac pivotshort.gif
Thanks,
Ron
It was taken at 0.97211 2012.10.02 04:01 so +65 pips now. When did you run 10.2a ?
Hi Phil,

I run the new version after 2 (M15) candles move. AUDCHF was opened around 63 PIPS from DP with TP set at 10 PIPS from open price, and TP reached and trade is now closed.
Capture.JPG
Thanks
Ron
Hi Paul

I the code, I only see for 10.2a a check if price was not 15 minutes ago below/above WP. Do you consider to add a check for price not to far away from DP or am I missigni a parameter ?

Philippe
User avatar
lucklogic
Trader
Posts: 85
Joined: Mon Jan 23, 2012 6:26 pm
Location: On The Hoe in Plymouth, UK

Re: MultiBob, a multi symbol NB10.2(a) autotrader

Post by lucklogic »

spyderman wrote:
lucklogic wrote:Could someone explain what the, if activated, correlation modules within the EA are trying do ??? :?

Helping you to avoid trading too many pairs with similar price movement. For example Eur/Usd and Gbp/Usd are typically highly correlated. Trading one position in each would effectively be trading two positions in either one. Correlation is referenced by a range of numeric value from -99 (high reverse correlation) to 99 (high positive correlation) The EA allows you to set at what point you want it to filter your trade pairs for correlation purposes.


Thank you
User avatar
Baluda
Trader
Posts: 330
Joined: Mon Feb 06, 2012 2:00 pm
Location: An insignificant village in the Netherlands

Re: MultiBob, a multi symbol NB10.2(a) autotrader

Post by Baluda »

garyfritz wrote:Running 10.2a, MB suddenly started spitting out error 134's ("Not enough money") on every tick. It had just finally worked its basket into positive territory. Plenty of money in the account.
Gary,

What trade caused this? Please check your experts tab.

A SILVER/XAGUSD trade can get quickly to big. Current lot size on my FXOPEN demo would be 0.71, which is too much for the available margin. MultiBob already adjusts the lot size for SILVER/XAGUSD with a 0.2 factor. My guess is this factor is too small.

Paul
Check the MQL4 Market for my best EA's and Indicators.
User avatar
aworex
Trader
Posts: 68
Joined: Thu Sep 20, 2012 2:42 pm
Location: London UK

Re: MultiBob, a multi symbol NB10.2(a) autotrader

Post by aworex »

Hi Paul,

firstly would want to commend you for all your brilliance and hard work with this EA I have been testing since last week and have been very impressed with the results so far. However, I have a question with the ATR stop loss, the EA has a static 200 pip SL and an ATR(5) stop loss based on daily candles. As I am more comfortable trading 24omin candles than daily candles am I right to amend the ATR timeframe to use 240min instead of the 1440 ? to trade the 10.2a strategy.

Regards

Femi
User avatar
lucklogic
Trader
Posts: 85
Joined: Mon Jan 23, 2012 6:26 pm
Location: On The Hoe in Plymouth, UK

Is this not incorrect

Post by lucklogic »

Code: Select all

bool sendSingleTrade( int symbolIndex, int type, string comment, double lotSize, double price, int magicNumber )
{
   if ( useCorrFilter )
   {
      if ( isCorrelated( symbolNames[symbolIndex] ) ) return (true);
   }

..............................................
   
Is this not incorrect

If using the useCorrFilter, the EA is assessing if a prospective order is highly correlated to an existing order BUT if the result is true (that it is highly correlated, so is likely to move in exactly the same direction) THE TRADE is being allowed rather than refused

The result of the argument - if ( isCorrelated( symbolNames[symbolIndex] ) ) return (true);
should return (false) because we do not in affect want to repeat the trade twice
dietcoke
Trader
Posts: 162
Joined: Tue Nov 15, 2011 9:59 pm

Re: Is this not incorrect

Post by dietcoke »

lucklogic wrote:

Code: Select all

bool sendSingleTrade( int symbolIndex, int type, string comment, double lotSize, double price, int magicNumber )
{
   if ( useCorrFilter )
   {
      if ( isCorrelated( symbolNames[symbolIndex] ) ) return (true);
   }

..............................................
   
Is this not incorrect

If using the useCorrFilter, the EA is assessing if a prospective order is highly correlated to an existing order BUT if the result is true (that it is highly correlated, so is likely to move in exactly the same direction) THE TRADE is being allowed rather than refused

The result of the argument - if ( isCorrelated( symbolNames[symbolIndex] ) ) return (true);
should return (false) because we do not in affect want to repeat the trade twice

The return is for the whole function. It is just saying the sendtrade function completed successfully. No trade is opened here.
Image
User avatar
lucklogic
Trader
Posts: 85
Joined: Mon Jan 23, 2012 6:26 pm
Location: On The Hoe in Plymouth, UK

Re: Is this not incorrect

Post by lucklogic »

dietcoke wrote:
lucklogic wrote:

Code: Select all

bool sendSingleTrade( int symbolIndex, int type, string comment, double lotSize, double price, int magicNumber )
{
   if ( useCorrFilter )
   {
      if ( isCorrelated( symbolNames[symbolIndex] ) ) return (true);
   }

..............................................
   
Is this not incorrect

If using the useCorrFilter, the EA is assessing if a prospective order is highly correlated to an existing order BUT if the result is true (that it is highly correlated, so is likely to move in exactly the same direction) THE TRADE is being allowed rather than refused

The result of the argument - if ( isCorrelated( symbolNames[symbolIndex] ) ) return (true);
should return (false) because we do not in affect want to repeat the trade twice

The return is for the whole function. It is just saying the sendtrade function completed successfully. No trade is opened here.

But a trade WILL BE opened exactly here, that's my point - see the full code module below that includes the OrderSend function

Unless there is a refusal of some sort inserted, the code will go on and take the trade - therefore in effect duplicating the trade , the bool of the useCorrFilter is doing nothing, it certainly is not preventing a trade

Code: Select all

bool sendSingleTrade( int symbolIndex, int type, string comment, double lotSize, double price, int magicNumber )
{
   if ( useCorrFilter )
   {
      if ( isCorrelated( symbolNames[symbolIndex] ) ) return (true);    // looks wrong and is in the wronr place 
	  
   }
   
   int digits = doubleToInt( MarketInfo( symbolNames[symbolIndex], MODE_DIGITS ) );

   int slippage = 10;
   if ( digits == 3 || digits == 5 ) slippage = 100;

   color col = Red;
   if ( type == OP_BUY || type == OP_BUYSTOP ) col = Green;

   int expiry = 0;

   for ( int i = 0; i < 10; i++ )
   {
      for ( int j = 0; j < 10 && IsTradeContextBusy(); j++ ) Sleep( 100 );

      RefreshRates();
      if ( type == OP_BUY ) price = NormalizeDouble( MarketInfo( symbolNames[symbolIndex], MODE_ASK ), digits );
      if ( type == OP_SELL ) price = NormalizeDouble( MarketInfo( symbolNames[symbolIndex], MODE_BID ), digits );

      if ( DEBUG ) Print( symbolNames[symbolIndex], " SEND ORDER: ", type, ", ", lotSize, ", ", price );
      int ticket = OrderSend( symbolNames[symbolIndex], type, lotSize, price, slippage, 0, 0, comment, magicNumber, expiry, col);
      if ( ticket > -1 )
      {
         if ( OrderSelect( ticket, SELECT_BY_TICKET ) )
         {
            double take = calculateTakeProfit( symbolNames[symbolIndex], OrderType() );
            double stop = calculateStopLoss( symbolNames[symbolIndex], OrderType() );
            if ( DEBUG ) Print( symbolNames[symbolIndex], " MODIFY ORDER: ", ticket, ", ", stop, ", ", take );
            modifyOrder( ticket, stop, take );
         }
         else
         {
            Alert( symbolNames[symbolIndex], " ", WindowExpertName(), " select order, ticket ", ticket, " failed." );
            Print( symbolNames[symbolIndex], " ", WindowExpertName(), " select order, ticket ", ticket, " failed." );
            return ( false );
         }
      }

      if ( ticket > -1 ) break;
      
      if ( i == 9 ) return ( false );

      // Error trapping
      if ( ticket < 0 )
      {
         string stype;
         if ( type == OP_BUY ) stype = "OP_BUY";
         if ( type == OP_SELL ) stype = "OP_SELL";
         if ( type == OP_BUYLIMIT ) stype = "OP_BUYLIMIT";
         if ( type == OP_SELLLIMIT ) stype = "OP_SELLLIMIT";
         if ( type == OP_BUYSTOP ) stype = "OP_BUYSTOP";
         if ( type == OP_SELLSTOP ) stype = "OP_SELLSTOP";
         int err = GetLastError();
         Alert( symbolNames[symbolIndex], " ", WindowExpertName(), " ", stype," order send failed with error(",err,"): ", ErrorDescription( err ) );
         Print( symbolNames[symbolIndex], " ", WindowExpertName(), " ", stype," order send failed with error(",err,"): ", ErrorDescription( err ) );
         return ( false );
      }
   }

   return ( true );
}
dietcoke
Trader
Posts: 162
Joined: Tue Nov 15, 2011 9:59 pm

Re: Is this not incorrect

Post by dietcoke »

Code: Select all

if ( isCorrelated( symbolNames[symbolIndex] ) ) return (true);
To me that says, If the pair to be traded is correlated then return without sending an order
Image
User avatar
lucklogic
Trader
Posts: 85
Joined: Mon Jan 23, 2012 6:26 pm
Location: On The Hoe in Plymouth, UK

Re: Is this not incorrect

Post by lucklogic »

dietcoke wrote:

Code: Select all

if ( isCorrelated( symbolNames[symbolIndex] ) ) return (true);
To me that says, If the pair to be traded is correlated then return without sending an order

Oh ...............OK

I can see that, now you have pointed it out

It's a bit confusing though because it is returning bool = true for the sendSingleTrade () argument - when no trade was indeed sent !!! :lol: :lol: :lol:

Thank you
Post Reply

Return to “10.x EA forum”