Shelley's multi-pair basket trader

Share your 10.x automated traders here.
Post Reply
forexripper
Trader
Posts: 133
Joined: Fri Apr 13, 2012 6:11 pm

Re: Shelley's multi-pair basket trader

Post by forexripper »

SWG123 wrote:
forexripper wrote:As the one I am testing right now has significantly slowed down my computer I do not want to test another one. I have asked the question in the relevant thread and waiting for response on why it has slowed down. Is it just me? Do I need to do anything (did not change anything except BE+10 and JSL)?
Are you using the slope display indi? That might be the culprit.

Coders?
No I am not.

I have around 23 charts open with no candles or indicators on them and just the EA. Still so slow.
Why is JSL not working. Any thoughts?
maudur
Trader
Posts: 24
Joined: Fri May 18, 2012 6:39 pm
Location: Bogotá, Colombia

Possible Shelley's error

Post by maudur »

Hi Steve,

Thank you very much for all your kind cooperation.

I have reviewed the EA Shelley and I think there is an error in the following code:

//Detect previous slope
if (ShelleyPlusGary)
{
double Slope = GetSlope(symbol, TimeFrame, 1);
string PrevSlope = nottradable;
if (Slope < 0.8) PrevSlope = buy;
if (Slope > -0.8) PrevSlope = sell;
}//if (ShelleyPlusGary)

If the previous slope was for example 0.7, PrevSlope will be sell and not buy because 0.7 is greater than -0.8. I think the correct code should be:

//Detect previous slope
if (ShelleyPlusGary)
{
double Slope = GetSlope(symbol, TimeFrame, 1);
string PrevSlope = nottradable;
if (Slope < 0.8 && Slope > 0) PrevSlope = buy;
if (Slope > -0.8 && Slope < 0) PrevSlope = sell;
}//if (ShelleyPlusGary)

Thank you very much.
With Regards,

Maudur.
mackaozy
Trader
Posts: 190
Joined: Sat Mar 17, 2012 1:22 pm

Re: Shelley's multi-pair basket trader

Post by mackaozy »

Caillou wrote:
SWG123 wrote:2nd basket auto-closed for +292, so nearly +700 pips for the day. Not too shabby.
Yep, but sooner or later we will be in the middle of a reverse. The question is how and when must we exit?
I' m waiting for this, this kind of market is useless for a trending EA.............
Hi..

I thought that in fact the forex market is in a ranging period at the moment..so this will only get better..someone please correct me if I am wrong.. :oops:
mackaozy
Trader
Posts: 190
Joined: Sat Mar 17, 2012 1:22 pm

Re: Shelley's multi-pair basket trader

Post by mackaozy »

SWG123 wrote:
mackaozy wrote:
SWG123 wrote:Another stonking performance from Shelley today. 6 pairs opened, 400 pips profit, no fuss whatsoever. :D
Hi

Would you mind sharing your setfile & version you are using? :) :) :) :)

Cheers

Steve
I am still using v1k as the updates were coming so quickly I couldn't keep up! Settings OOTB except for BasketSendHour = [London open] & ComeWhatMayCloseHour = 24. Closed all trades manually at 400 pips.

I started a new basket at US open: 7 pairs trading and currently fluctuating between 20 & 40 pips positive.

This is all on demo still but I'm trading 10.2 manually live. It's going rather well :lol:
Cheers SWG123..! I traded the US market open today at 1pm in an effort to break this bot...results below.. I'm stunned..Results below... :D :D :D
User avatar
droland
Trader
Posts: 52
Joined: Tue Nov 15, 2011 9:40 pm
Location: Vancouver, BC, Canada

Re: Shelley's multi-pair basket trader

Post by droland »

garyfritz wrote:FWIW I've been running S+G with no regular Shelley for over 24 hrs. No trades entered.

I've been running 1l without any changes, just adaptive stops &etc chosen. I pointed out a possible bug with S+G in http://www.stevehopwoodforex.com/phpBB3 ... 232#p14232. I didn't *think* that would prevent entries, but I just made the change I suggested in that post and boom! 12 open trades. But those are the trades it should have entered with standard Shelley mode. Since I made the change in S+G-only code, I'm sure I'm in the right mode. I'll have to figure out what's going on here.
I am having the same problem. No trades on the S+G settings. Same EA works great on the Shelley only settings. Very much interested in trying the S+G mode however. Good luck in tracking the problem.
SWG123
Trader
Posts: 565
Joined: Wed Nov 16, 2011 3:02 pm
Location: Cape Town

Re: Shelley's multi-pair basket trader

Post by SWG123 »

mackaozy wrote:
Caillou wrote:
SWG123 wrote:2nd basket auto-closed for +292, so nearly +700 pips for the day. Not too shabby.
Yep, but sooner or later we will be in the middle of a reverse. The question is how and when must we exit?
I' m waiting for this, this kind of market is useless for a trending EA.............
Hi..

I thought that in fact the forex market is in a ranging period at the moment..so this will only get better..someone please correct me if I am wrong.. :oops:
Well, the market both trends and ranges at all times - it just depends what timeframe you are looking at. Here, of course, we are mainly concerned with daily action. When a pair reverses direction, will the TMA Slope indi alert us quickly enough, or will we get caught on the wrong side of a series of trades? I think that is the question Caillou is asking.
Caillou
Trader
Posts: 48
Joined: Sat Dec 03, 2011 9:11 pm

Re: Shelley's multi-pair basket trader

Post by Caillou »

mackaozy wrote:
Caillou wrote:
SWG123 wrote:2nd basket auto-closed for +292, so nearly +700 pips for the day. Not too shabby.
Yep, but sooner or later we will be in the middle of a reverse. The question is how and when must we exit?
I' m waiting for this, this kind of market is useless for a trending EA.............
Hi..

I thought that in fact the forex market is in a ranging period at the moment..so this will only get better..someone please correct me if I am wrong.. :oops:
If Selley EA is closing baskets in profit no matter when you put it on the chart with the same pairs and the same order types (Sell EUR and GBP, Buy USD)..........sure the market is trending.
Armen

Re: Shelley's multi-pair basket trader

Post by Armen »

garyfritz wrote:... I pointed out a possible bug with S+G in http://www.stevehopwoodforex.com/phpBB3 ... 232#p14232. ....
Hello garyfritz, frankly speaking I have absolutely no experience in coding things in MQL. My question may appear silly but I thought this should be true for sell part also.

Code: Select all

if (TradePair[cc][2] == sell)
            {
               //Trading styles
               if (OriginalShelley)
               {
                  if (IsShelleyTime) SendShort = true;
               }//if (OriginalShelley)         

               //Additional condition: Slope(1) must have been > -0.8
               if (ShelleyPlusGary)
               {
                if (PrevSlope == sell) SendShort = true;
Shouldn't that be if (PrevSlope != sell).
garyfritz

Re: Shelley's multi-pair basket trader

Post by garyfritz »

Armen wrote:
garyfritz wrote:... I pointed out a possible bug with S+G in http://www.stevehopwoodforex.com/phpBB3 ... 232#p14232. ....
Shouldn't that be if (PrevSlope != sell).
Yup. That was the bug I mentioned earlier.
maudur wrote:I think the correct code should be:
//Detect previous slope
if (ShelleyPlusGary)
{
double Slope = GetSlope(symbol, TimeFrame, 1);
string PrevSlope = nottradable;
if (Slope < 0.8 && Slope > 0) PrevSlope = buy;
if (Slope > -0.8 && Slope < 0) PrevSlope = sell;
}//if (ShelleyPlusGary)
Not quite -- as I understand it anyway, Slope should be >= 0.8 for a buy, <= -0.8 for a sell. But you ARE right that there's a bug in there that I didn't see before. Steve got the tests backwards: if (Slope < 0.8) PrevSlope = buy;

I'm now running with both these fixes. They didn't open up a dozen trades instantly, so that's a good sign. I'll let you know if it seems to work. Remember, though, I don't think it makes a lot of sense to trade this approach as a basket, so I'm not sure how well this is going to work.

Meanwhile if anybody else wants to test it, you can just replace LookForTradingOpportunities() with this code:

Code: Select all

void LookForTradingOpportunities()
{

   BasketSent = true;
   
   for (int cc = 0; cc < NoOfPairs; cc++)
   {
      string symbol = TradePair[cc][0];
      if (DoesTradeExist(symbol) ) continue;//Only one trade per pair
      double digits = MarketInfo(symbol, MODE_DIGITS);
      double bid = NormalizeDouble(MarketInfo(symbol, MODE_BID), digits);
      double ask = NormalizeDouble(MarketInfo(symbol, MODE_ASK), digits);
      if (CloseEnough(bid, 0)) continue;//Pair not traded by the crim.
      
      //Detect previous slope
      if (ShelleyPlusGary)
      {
         double Slope = GetSlope(symbol, TimeFrame, 1);
         string PrevSlope = nottradable;
         if (Slope >= 0.8) PrevSlope = buy;
         if (Slope <= -0.8) PrevSlope = sell;         
      }//if (ShelleyPlusGary)
      
      bool SendLong = false, SendShort = false;
      int type;
      bool SendTrade = false;
      
      //Slope must be buy and hold
      if (TradePair[cc][1] == buyhold)
      {
         //Woh 2x1 must be >0
         if (TradePair[cc][2] == buy) 

         //Trading styles
         if (OriginalShelley)
         {
            if (IsShelleyTime) SendLong = true;
         }//if (OriginalShelley)
         
         //Additional condition: Slope(1) must have been < 0.8
         if (ShelleyPlusGary)
         {
            if (PrevSlope != buy) SendLong = true;
         }//if (ShelleyPlusGary)
         

      }//if (TradePair[cc][3] == buyhold)
      
      
      //Look for sell trades if there was no buy trigger
      if (!SendLong)
      {
         //HTF sell and hold monthly pivot cross
         //Find a monthly pivot cross. Both Woh's must be in the right direction.
         if (TradePair[cc][1] == sellhold)
         {
            //Woh 2x1 must be <0
            if (TradePair[cc][2] == sell)
            {
               //Trading styles
               if (OriginalShelley)
               {
                  if (IsShelleyTime) SendShort = true;
               }//if (OriginalShelley)         

               //Additional condition: Slope(1) must have been > -0.8
               if (ShelleyPlusGary)
               {
                  if (PrevSlope != sell) SendShort = true;
               }//if (ShelleyPlusGary)

            }//if (TradePair[cc][2] == sell)            
         }//if (TradePair[cc][3] == sellhold)
      }//if (!SendLong)
      
   /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
   //Trading
   
   //Long 
   if (SendLong)
   {
       
      //Got this far, so there is going to be a trade send of some sort. Setting up price here makes
      //this code most easily adaptable to easy alteration
      type = OP_BUY;
      SendTrade = true;
   }//if (SendLong)
   
   //Short
   if (SendShort)
   {
      
      //Got this far, so there is going to be a trade send of some sort. Setting up price here makes
      //this code most easily adaptable to easy alteration
      type = OP_SELL;
      SendTrade = true;      
   }//if (SendShort)
   

   if (SendTrade)
   {
      bool result = SendSingleTrade(symbol, type, TradeComment, Lot, 0, 0);
   }//if (SendTrade)
   
      
   //Actions when trade send fails
   if (SendTrade && !result)
   {
      BasketSent = false;
      OldSgBarTime = 0;
   }//if (!result)
   
   
   
   }//for (int cc = 0; cc < NoOfPairs; cc++)
   
   

}//End void LookForTradingOpportunities()
blahn
Trader
Posts: 53
Joined: Wed Nov 30, 2011 2:39 am

Re: Shelley's multi-pair basket trader

Post by blahn »

Since we're using slope triggers for S & G entries, we could use them for stacking as well. Enter at .8, stack at .9, stack at 1, again at 1.1, etc.
Post Reply

Return to “10.x EA forum”