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

Pipcruiser's Pipmasher
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3874
Page 14 of 55
Author:  KapguHaJI [ Tue Nov 25, 2014 6:22 pm ]
Post subject:  Pipcruiser's Pipmasher

SteveHopwood » Tue Nov 25, 2014 7:38 pm wrote:I came across what looked like faulty code in the shift applied to the open/close price of the candles that could cause the incorrect candle directions. Give it a whirl guys and see if all is correct now.
Was trying to trace this bug for some time, when you posted this. But I can't find what you actually changed in the code. Please point me to where the fix is (if you actually posted the correct version).
SteveHopwood » Tue Nov 25, 2014 7:38 pm wrote:Re the occasional non-refresh, the code could not be simpler and even I am unlikely to screw it up. Check by the time display that the ea is still running when this happens - that is what the time display is for. The ea is not running if the clock has stopped.
Well, the clock does stop for 60 seconds because of sleep function in the end of LookForTradingOpportunities. This probably confuses some people.
Author:  SteveHopwood [ Tue Nov 25, 2014 6:44 pm ]
Post subject:  Pipcruiser's Pipmasher

KapguHaJI » Tue Nov 25, 2014 6:22 pm wrote:
Was trying to trace this bug for some time, when you posted this. But I can't find what you actually changed in the code. Please point me to where the fix is (if you actually posted the correct version).
void GetCandleDirections()

:xm:
Author:  KapguHaJI [ Tue Nov 25, 2014 7:17 pm ]
Post subject:  Pipcruiser's Pipmasher

SteveHopwood » Tue Nov 25, 2014 9:44 pm wrote:
KapguHaJI » Tue Nov 25, 2014 6:22 pm wrote:
Was trying to trace this bug for some time, when you posted this. But I can't find what you actually changed in the code. Please point me to where the fix is (if you actually posted the correct version).
void GetCandleDirections()

:xm:

Hmmm. It has some lines added for the info panel on the chart, but nothing about shift, that could change directions.

Added:
You propably talked about this shift:

Code: Select all

   if (BrokerHasSundayCandle)
      if (TradingTF == PERIOD_D1)
         shift = 2;
But everything about this variable remained the same. Shift=2 can only be used to trade monday. On tuesday you get both open and close from sunday candle and so on.
Author:  SteveHopwood [ Tue Nov 25, 2014 9:06 pm ]
Post subject:  Pipcruiser's Pipmasher

KapguHaJI » Tue Nov 25, 2014 7:17 pm wrote:
SteveHopwood » Tue Nov 25, 2014 9:44 pm wrote:
KapguHaJI » Tue Nov 25, 2014 6:22 pm wrote:
Was trying to trace this bug for some time, when you posted this. But I can't find what you actually changed in the code. Please point me to where the fix is (if you actually posted the correct version).
void GetCandleDirections()

:xm:

Hmmm. It has some lines added for the info panel on the chart, but nothing about shift, that could change directions.

Added:
You propably talked about this shift:

Code: Select all

   if (BrokerHasSundayCandle)
      if (TradingTF == PERIOD_D1)
         shift = 2;
But everything about this variable remained the same. Shift=2 can only be used to trade monday. On tuesday you get both open and close from sunday candle and so on.
I give up.

The damn bot is supposed to work as described in pc's pm in post 1. He wanted the additional stuff to allow for experimentation on lower time frames, as I recall in a subsequent request. As usual with commissioners, they think that everything is easy and that their every whim can be accommodated with ease. They aren't.

Now listen up people.

Ready?

Ears pinned back?

This blasted bot which is now irritating me beyond measure is a D1 - OK D1 get it? - trading EA. Trade it on anything other than the D1 and the results are unpredictable.

So just trade the bloody thing on the D1.

KapguHaJI, if you have another problem then solve it and post it here. I am not interested anymore. I have enough to do.
Author:  Aussiedoc [ Wed Nov 26, 2014 3:30 am ]
Post subject:  Pipcruiser's Pipmasher

Agreed! Works like a charm on my D1. :smile:
Author:  KapguHaJI [ Wed Nov 26, 2014 8:53 am ]
Post subject:  Pipcruiser's Pipmasher

Ok Steve, I still don't understand, what bug you claim to have fixed, but I'll leave you alone.

Everyone, it is obviously a bad idea to post EA files all over the topic. I'll just post what I found and you can make the changes yourself.

At line 3827 replace this

Code: Select all

	while ( time >= tradeHours[i] ) 
	{	
		if ( i == ArraySize( tradeHours ) ) break;
		i++;		
	}
with this

Code: Select all

	while ( time >= tradeHours[i] ) 
	{	
		i++;
		if ( i == ArraySize( tradeHours ) ) break;
	}
It sometimes caused 'Array out of range' errors. I don't know why, but Empty4 doesn't mind them very much, so you don't usually stumble upon them.

Also I doubt that anybody here has sunday candles at all, but if you do, you should go to line 3690 and replace this

Code: Select all

   if (BrokerHasSundayCandle)
      if (TradingTF == PERIOD_D1)
         shift = 2;
with this

Code: Select all

   if (BrokerHasSundayCandle)
      if (TradingTF == PERIOD_D1)
         if(TimeDayOfWeek(iTime(NULL,PERIOD_D1,0))==1)
            shift = 2;
Cheers.
Author:  pipcruiser [ Wed Nov 26, 2014 5:39 pm ]
Post subject:  Pipcruiser's Pipmasher

Thanks a lot for helping out KapguHaJI.

PC
KapguHaJI » Wed Nov 26, 2014 10:53 am wrote:Ok Steve, I still don't understand, what bug you claim to have fixed, but I'll leave you alone.

Everyone, it is obviously a bad idea to post EA files all over the topic. I'll just post what I found and you can make the changes yourself.

At line 3827 replace this

Code: Select all

	while ( time >= tradeHours[i] ) 
	{	
		if ( i == ArraySize( tradeHours ) ) break;
		i++;		
	}
with this

Code: Select all

	while ( time >= tradeHours[i] ) 
	{	
		i++;
		if ( i == ArraySize( tradeHours ) ) break;
	}
It sometimes caused 'Array out of range' errors. I don't know why, but Empty4 doesn't mind them very much, so you don't usually stumble upon them.

Also I doubt that anybody here has sunday candles at all, but if you do, you should go to line 3690 and replace this

Code: Select all

   if (BrokerHasSundayCandle)
      if (TradingTF == PERIOD_D1)
         shift = 2;
with this

Code: Select all

   if (BrokerHasSundayCandle)
      if (TradingTF == PERIOD_D1)
         if(TimeDayOfWeek(iTime(NULL,PERIOD_D1,0))==1)
            shift = 2;
Cheers.
Author:  fchaman [ Thu Nov 27, 2014 12:44 pm ]
Post subject:  Pipcruiser's Pipmasher

Hi folks, Just want to confirm if anyone has got any trades triggered this week...still having bunch of buy-sell stops waiting to be triggered, but no open trades at this moment.

Really like this EA as it knows when to stay out of ranging market!
Author:  casapips [ Thu Nov 27, 2014 12:51 pm ]
Post subject:  Pipcruiser's Pipmasher

Yes just today ..with EURNZD & NZDJPY triggered !

:clap: many thanks for this robust strategy / EA..
Author:  matt_32 [ Thu Nov 27, 2014 2:28 pm ]
Post subject:  Pipcruiser's Pipmasher

fchaman » Thu Nov 27, 2014 2:44 pm wrote:Hi folks, Just want to confirm if anyone has got any trades triggered this week...still having bunch of buy-sell stops waiting to be triggered, but no open trades at this moment.

Really like this EA as it knows when to stay out of ranging market!

nzdchf
eurnzd

Both triggered on Nov 27
All times are UTC Page 14 of 55