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

Secret Trendy Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3875
Page 3 of 5
Author:  art [ Tue Oct 14, 2014 8:29 pm ]
Post subject:  Secret Trendy Bob

as dave knows i had problems with losing my ea's today he kindly gave me a 670 version, what a joke metta quotes need there arses kicked
Author:  SteveHopwood [ Tue Oct 14, 2014 10:04 pm ]
Post subject:  Secret Trendy Bob

PM from Stefan earlier today:
Stefan61200 wrote:Hi Steve,

I asked MetaQuotes again for a solution. They have send me the following answer.

1. You should open demo account on MetaQuotes-Demo server and log in.
2. Restart the terminal.
3. Wait until "LiveUpdate finished" record would appear in Journal tab.
4. Restart the terminal once again.
5. Check terminal's build.

I followed the procedure and now I have a Empty4 build 722 installation. I hope that this build is without bugs now and all Problems with the platform is solved.

And by the way - I am just a normal trader like everybody else. I got nothing to do with any broker. Just a friedn of mine is working for a Broker. Thats it.

Cheers,
Stefan
Thanks Stefan.

So, we can at least get past 711. Whether that is any help is another matter.

:xm:
Author:  SteveHopwood [ Tue Oct 14, 2014 10:12 pm ]
Post subject:  Secret Trendy Bob

I have abandoned instant market orders - stop trading is looking far superior at this stage.

One thing I have noticed is that stop orders can be left a long way behind if the market continues to hurtle into obos. I shall add a pending trade expiry feature at some stage this week to take care of this.

:xm:
Author:  fx800 [ Wed Oct 15, 2014 5:46 am ]
Post subject:  Secret Trendy Bob

Thanks again for the ea, Steve.

The UseHiLoForStop prematurely took out the stops this am. I may be mistaken, but is it possible the stop for OP_BUY and OP_SELL should have been the other way round as shown below ?

Code: Select all

      if (type == OP_BUY)
      {
         stop = NormalizeDouble(iLow(Symbol(), TradingTimeFrame, shift)  - (HiLoBuffer / factor), Digits);
         StopLoss = (stop - price) * factor;//For risk based lot sizing
      }//if (type == OP_BUY)
      
      if (type == OP_SELL)
      {
         stop = NormalizeDouble(iHigh(Symbol(), TradingTimeFrame, shift)  + (HiLoBuffer / factor), Digits);
         StopLoss = (price - stop) * factor;//For risk based lot sizing
      }//if (type == OP_SELL)
peter
Author:  SteveHopwood [ Wed Oct 15, 2014 6:07 am ]
Post subject:  Secret Trendy Bob

fx8000 » Wed Oct 15, 2014 5:46 am wrote:Thanks again for the ea, Steve.

The UseHiLoForStop prematurely took out the stops this am. I may be mistaken, but is it possible the stop for OP_BUY and OP_SELL should have been the other way round as shown below ?

peter
Hmmmmm. I wonder what I was on when I coded that little lot. It is all rubbish, so thanks for the spot. :clap:

Fix in 1c in post 1, or copy this over the top of the existing function and recompile:

Code: Select all

double CalculateStopLoss(int type, double price)
{
   //Returns the stop loss for use in LookForTradingOpps and InsertMissingStopLoss
   double stop = 0;
   
   //Calculate StopLoss based on the hilo of the signal candle
   if (UseHiLoForStop)
   {
      int shift = 0;
      if (!EveryTickMode)
         shift = 1;
      if (type == OP_BUY)
      {
         stop = NormalizeDouble(iLow(Symbol(), TradingTimeFrame, shift)  - (HiLoBuffer / factor), Digits);
         StopLoss = (price - stop) * factor;//For risk based lot sizing
      }//if (type == OP_BUY)
      
      if (type == OP_SELL)
      {
         stop = NormalizeDouble(iHigh(Symbol(), TradingTimeFrame, shift)  + (HiLoBuffer / factor), Digits);
         StopLoss = (stop - price) * factor;//For risk based lot sizing
      }//if (type == OP_SELL)
      
      //Check that the stop loss is big enough for the broker
      double MinStop = MarketInfo(Symbol(), MODE_STOPLEVEL);
      if (StopLoss < MinStop)
      {
         double spread = (Ask - Bid) * factor;
         StopLoss = MinStop;
         StopLoss+= spread;
      }//if (StopLoss < MinStop)
      
   }//if (UseHiLoForStop)
   
   RefreshRates();
   
   if (type == OP_BUY)
   {
      if (!CloseEnough(StopLoss, 0) ) 
      {
         stop = price - (StopLoss / factor);
         HiddenStopLoss = stop;
      }//if (!CloseEnough(StopLoss, 0) ) 
      
     
   if (HiddenPips > 0 && stop > 0) stop = NormalizeDouble(stop - (HiddenPips / factor), Digits);
   }//if (type == OP_BUY)
   
   if (type == OP_SELL)
   {
      if (!CloseEnough(StopLoss, 0) ) 
      {
         stop = price + (StopLoss / factor);
         HiddenStopLoss = stop;         
      }//if (!CloseEnough(StopLoss, 0) ) 
      
      

      if (HiddenPips > 0 && stop > 0) stop = NormalizeDouble(stop + (HiddenPips / factor), Digits);

   }//if (type == OP_SELL)
   
   return(stop);
   
}//End double CalculateStopLoss(int type)
:xm:
Author:  fx800 [ Wed Oct 15, 2014 6:23 am ]
Post subject:  Secret Trendy Bob

SteveHopwood » Wed Oct 15, 2014 6:07 am wrote:
fx8000 » Wed Oct 15, 2014 5:46 am wrote:Thanks again for the ea, Steve.

The UseHiLoForStop prematurely took out the stops this am. I may be mistaken, but is it possible the stop for OP_BUY and OP_SELL should have been the other way round as shown below ?

peter
Hmmmmm. I wonder what I was on when I coded that little lot. It is all rubbish, so thanks for the spot. :clap:

Fix in 1c in post 1, or copy this over the top of the existing function and recompile:

Code: Select all

double CalculateStopLoss(int type, double price)
{
   //Returns the stop loss for use in LookForTradingOpps and InsertMissingStopLoss
   double stop = 0;
   
   //Calculate StopLoss based on the hilo of the signal candle
   if (UseHiLoForStop)
   {
      int shift = 0;
      if (!EveryTickMode)
         shift = 1;
      if (type == OP_BUY)
      {
         stop = NormalizeDouble(iLow(Symbol(), TradingTimeFrame, shift)  - (HiLoBuffer / factor), Digits);
         StopLoss = (price - stop) * factor;//For risk based lot sizing
      }//if (type == OP_BUY)
      
      if (type == OP_SELL)
      {
         stop = NormalizeDouble(iHigh(Symbol(), TradingTimeFrame, shift)  + (HiLoBuffer / factor), Digits);
         StopLoss = (stop - price) * factor;//For risk based lot sizing
      }//if (type == OP_SELL)
      
      //Check that the stop loss is big enough for the broker
      double MinStop = MarketInfo(Symbol(), MODE_STOPLEVEL);
      if (StopLoss < MinStop)
      {
         double spread = (Ask - Bid) * factor;
         StopLoss = MinStop;
         StopLoss+= spread;
      }//if (StopLoss < MinStop)
      
   }//if (UseHiLoForStop)
   
   RefreshRates();
   
   if (type == OP_BUY)
   {
      if (!CloseEnough(StopLoss, 0) ) 
      {
         stop = price - (StopLoss / factor);
         HiddenStopLoss = stop;
      }//if (!CloseEnough(StopLoss, 0) ) 
      
     
   if (HiddenPips > 0 && stop > 0) stop = NormalizeDouble(stop - (HiddenPips / factor), Digits);
   }//if (type == OP_BUY)
   
   if (type == OP_SELL)
   {
      if (!CloseEnough(StopLoss, 0) ) 
      {
         stop = price + (StopLoss / factor);
         HiddenStopLoss = stop;         
      }//if (!CloseEnough(StopLoss, 0) ) 
      
      

      if (HiddenPips > 0 && stop > 0) stop = NormalizeDouble(stop + (HiddenPips / factor), Digits);

   }//if (type == OP_SELL)
   
   return(stop);
   
}//End double CalculateStopLoss(int type)
:xm:
Thanks, Steve.
Author:  rapple [ Wed Oct 15, 2014 9:33 am ]
Post subject:  Secret Trendy Bob

Hi Steve

I had been struggling to get 'Secret Trendy Bob' up and running correctly.

I am no coder but when I looked at line 130 and 1577 I notice that the indi being called was "240 BUY.SELL.NOW.ALERT"

I had downloaded the latest indi from Bobs tread which is now called "240.V.7_ BUY.SELL.NOW.ALERT".

After changing line 130 and 1577 to the new indicator name the EA works correctly :clap: :clap: :clap:

Kind regards Rapple
Author:  SteveHopwood [ Wed Oct 15, 2014 11:47 am ]
Post subject:  Secret Trendy Bob

Thanks Rap. There must be a new version of the indi. I have attached the one STB uses to post 1.

:xm:
Author:  wynkins [ Thu Oct 16, 2014 10:27 am ]
Post subject:  Secret Trendy Bob

Now I've got the correct indi, STB has got off to a very good start: 460 pips in the 24 hrs since the demo started plus another 31 pips floating profit.

http://www.myfxbook.com/members/wynkins ... ob/1047358
Author:  excalibre30 [ Thu Oct 16, 2014 10:31 am ]
Post subject:  Secret Trendy Bob

I got it starting it as well by renaming the latest indi.

It bagged 569 pips so far today. Wow.
All times are UTC Page 3 of 5