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

Old and defunct Holy Graily Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3966
Page 119 of 129
Author:  SteveHopwood [ Tue Feb 10, 2015 4:54 pm ]
Post subject:  Holy Graily Bob

acostafulano » Tue Feb 10, 2015 4:31 pm wrote:Steve, I think the following is missing from line 2297;

//Only allow 1 trade per candle
if (WaveMostRecentBuyTime >= iTime(Symbol(), TradingTimeFrame, 0) )
return(false);


And Line 2316:

//Only allow 1 trade per candle
if (WaveMostRecentSellTime >= iTime(Symbol(), TradingTimeFrame, 0) )
return(false);

Which may be causing some multiple Wave trades per candle

(Same for TrendWave)
Another nice spot. Thanks. :clap: :clap: :clap:

2w in post 1 or copy this over the top of bool CanWeWaveTrade(int type)

Code: Select all

bool CanWeWaveTrade(int type)
{
   //Returns true if the filters pass, else false
   
   //Are trend trading?
   if (!WaveTradingAllowed)
      return(false);
   
   //Maximum trades
   if (OpenTrades >= MaxOverallTrades)
      return(false);
   if (WaveBuyTotalTrades + WaveSellTotalTrades >= WaveMaxTradesAllowed)   
      return(false);
   
      
   if (type == OP_BUY)
   {
      //Only allow 1 trade per candle
      if (WaveMostRecentBuyTime >= iTime(Symbol(), TradingTimeFrame, 0) )
         return(false);

      //Hedging
      if (SellOpen)
         if (!BrokerAllowsHedging)
            return(false);
			
	      //Minimum distance between trades
      if (WaveMinDistanceBetweenTradesPips > 0)
         if (MathAbs(WaveMostRecentBuyPrice - Ask) < (WaveMinDistanceBetweenTrades / factor) )
            return(false);		
   
   }//if (type == OP_BUY)
   
   if (type == OP_SELL)
   {

      //Only allow 1 trade per candle
      if (WaveMostRecentSellTime >= iTime(Symbol(), TradingTimeFrame, 0) )
         return(false);
      
      //Hedging
      if (BuyOpen)
         if (!BrokerAllowsHedging)
            return(false);
     
			//Minimum distance between trades
      if (WaveMinDistanceBetweenTradesPips > 0)
         if (MathAbs(WaveMostRecentSellPrice - Bid) < (WaveMinDistanceBetweenTrades / factor) )
            return(false);
   
   }//if (type == OP_SELL)
   
   
   //Got this far, so trade is ok
   return(true);

}// CanWeWaveTrade(int type)
and this over the top of bool CanWeTrendWaveTrade(int type)

Code: Select all

bool CanWeTrendWaveTrade(int type)
{
   //Returns true if the filters pass, else false
   
  
   //Maximum trades
   //if (OpenTrades >= MaxOverallTrades)
   //  return(false);
   if (TrendWaveBuyTotalTrades + TrendWaveSellTotalTrades >= TrendWaveMaxMultiTrades)   
      return(false);
   
      
   if (type == OP_BUY)
   {
      
      //Only allow 1 trade per candle
      if (TrendWaveMostRecentBuyTime >= iTime(Symbol(), TradingTimeFrame, 0) )
         return(false);

      //Hedging
      if (SellOpen)
         if (!BrokerAllowsHedging)
            return(false);
   
   }//if (type == OP_BUY)
   
   if (type == OP_SELL)
   {

      //Only allow 1 trade per candle
      if (TrendWaveMostRecentSellTime >= iTime(Symbol(), TradingTimeFrame, 0) )
         return(false);
      
      //Hedging
      if (BuyOpen)
         if (!BrokerAllowsHedging)
            return(false);
   
   
   }//if (type == OP_SELL)
   
   
   //Got this far, so trade is ok
   return(true);
}//bool CanWeTrendWaveTrade(int type)

:xm:
Author:  currymonster [ Tue Feb 10, 2015 7:30 pm ]
Post subject:  Holy Graily Bob

Bonkersly good . I'm raising my glass to you Steve, some lovely barefoot shiraz :)
Author:  SteveHopwood [ Tue Feb 10, 2015 7:45 pm ]
Post subject:  Holy Graily Bob

currymonster » Tue Feb 10, 2015 7:30 pm wrote:Bonkersly good . I'm raising my glass to you Steve, some lovely barefoot shiraz :)
Hmmmmm.

Remember a while ago when my live (granted tiny) account rose by 40% in the blink of an eye courtesy of SNB?

I withdrew everything and have not traded anything live since. Which is a bloody good thingy because HGB has done nothing but lose me demo pips ever since.

Is this going to be yet another ea that lots of other people make money out of and has fucked me out of sight? It has happened many times before.

:xm:
Author:  pathenry [ Tue Feb 10, 2015 10:04 pm ]
Post subject:  Holy Graily Bob

Be encouraged Steve.

Things are brewing nicely around here and I am encouraged by the efforts of all involved.
I have a sense of anticipation and excitement that we are not far from the Holy Grail. No one has anything that has any value in life unless it has cost them. Keep going my friend as I do with every ounce of determination.
Some days my knuckles become white holding on but I WILL get there.

Be encouraged.

Pat
Author:  SteveHopwood [ Tue Feb 10, 2015 11:06 pm ]
Post subject:  Holy Graily Bob

pathenry » Tue Feb 10, 2015 10:04 pm wrote:Be encouraged Steve.

Things are brewing nicely around here and I am encouraged by the efforts of all involved.
I have a sense of anticipation and excitement that we are not far from the Holy Grail. No one has anything that has any value in life unless it has cost them. Keep going my friend as I do with every ounce of determination.
Some days my knuckles become white holding on but I WILL get there.

Be encouraged.

Pat
Hmmmmmmm. Couldn't cost me a bit less from time to time could it? Not always talking cash here.

:arrrg:
Author:  betterskin [ Wed Feb 11, 2015 2:56 am ]
Post subject:  Holy Graily Bob

The EA is opening and closing trades too fast with no context..

rogue trades.. whatever.. just pointing this out.

ban me all you want, i don't care. just pointing this out to the programmer
Author:  acostafulano [ Wed Feb 11, 2015 4:37 am ]
Post subject:  Holy Graily Bob

Hello,

What could be the problem? (today's version)
Captura.PNG
One Rad trade every minute for some reason. The same is happening with some Wavy Trades (Several trades ocurring within same candle not respecting min distance or "only one trade per candle" filter in the code)

settings for this are basically:
-Trade Only Instant Market Trades
- (NO Pendings, no Multitrades enabled)
- Mindistancebetween trades=10

My setfile is attached.

Is people using PENDINGS/MULTITRADES experiencing any similar issues?
7220 HGIG - M15 - 55SL-25TP.set
Author:  trendinator [ Wed Feb 11, 2015 11:16 am ]
Post subject:  Holy Graily Bob

in the latest 2w there is a problem

Code: Select all

 if (!WaveTradeBlueToYellowOnly)
               {
                  if (Bid < val)
                     WaveStatus = Wavesell;//High wavy gold line so sell below it
                  else
                     WaveStatus = Wavebuy;//Low wavy gold line so buy above it
               }//if (!WaveTradeBlueToYellowOnly) 
because of if (!WaveTradeBlueToYellowOnly)
the yellow wavy doesn't result in a wavestatus, which is used to close the trades. so if WaveTradeBlueToYellowOnly is true it will only close on blue waves.

perhaps a different approach is needed?
Author:  SteveHopwood [ Wed Feb 11, 2015 11:31 am ]
Post subject:  Holy Graily Bob

trendinator » Wed Feb 11, 2015 11:16 am wrote:in the latest 2w there is a problem

Code: Select all

 if (!WaveTradeBlueToYellowOnly)
               {
                  if (Bid < val)
                     WaveStatus = Wavesell;//High wavy gold line so sell below it
                  else
                     WaveStatus = Wavebuy;//Low wavy gold line so buy above it
               }//if (!WaveTradeBlueToYellowOnly) 
because of if (!WaveTradeBlueToYellowOnly)
the yellow wavy doesn't result in a wavestatus, which is used to close the trades. so if WaveTradeBlueToYellowOnly is true it will only close on blue waves.

perhaps a different approach is needed?
Bugger. I knew it was not so simple. :arrrg:

Hey ho. Looking into it.

:xm:
Author:  SteveHopwood [ Wed Feb 11, 2015 11:33 am ]
Post subject:  Holy Graily Bob

Probably needs a new set of yellow wave status thingies. I will mull this over and do some recoding later.

:xm:
All times are UTC Page 119 of 129