Master Zen

Post Reply
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: Master Zen

Post by fx800 »

art wrote:no problems, i have two meta 4's running on one of my comps, and they are both playing up all of a sudden when i go to launch the platforms i get this revolving circle and then screen greys out, any ideas running windows 8

Sorry, not sure what is the cause of your problems.

I have added only one line of code to CTC, and that should not have caused your computer to crash.

CTC has been around for quite a while and no one has reported similar problems.
art
Trader
Posts: 588
Joined: Fri Mar 02, 2012 3:51 pm

Re: Master Zen

Post by art »

no i dont think its anything to do with ctc, i think its a compatability issue, with my comp, all good fun
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: Master Zen

Post by fx800 »

The ea has entered trades even though the DP cross occured two candles previously. Not sure why this has happened. I thought the entry code was adequate but obviously not.

For long

Code: Select all

 if (iClose(NULL,0,2) >= DailyPivot && iClose(NULL,0,1) <= DailyPivot + (PivotBufferPips*Point)) return;
I am defeated.

I would advise no further download until this basic probem is resolved.

I have added an extra line of code to see if this makes any difference. Update v.5.07 in post 1.
You do not have the required permissions to view the files attached to this post.
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

Re: Master Zen

Post by renexxxx »

For long

Code: Select all

 if (iClose(NULL,0,2) >= DailyPivot && iClose(NULL,0,1) <= DailyPivot + (PivotBufferPips*Point)) return;
This does not necessarily guarantee a cross of the Daily Pivot. It merely states that two candle's ago, the Close was above the Daily Pivot and 1 candle ago the the Close was lower than 10 PIPs (default) above the Daily Pivot. So, eg. if Daily Pivot is 1.0320. If iClose(NULL,0,2) == 1.0321 and iClose(NULL,0,1) == 1.0329, this code would return. But no cross has happened.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: Master Zen

Post by fx800 »

renexxxx wrote:For long

Code: Select all

 if (iClose(NULL,0,2) >= DailyPivot && iClose(NULL,0,1) <= DailyPivot + (PivotBufferPips*Point)) return;
This does not necessarily guarantee a cross of the Daily Pivot. It merely states that two candle's ago, the Close was above the Daily Pivot and 1 candle ago the the Close was lower than 10 PIPs (default) above the Daily Pivot. So, eg. if Daily Pivot is 1.0320. If iClose(NULL,0,2) == 1.0321 and iClose(NULL,0,1) == 1.0329, this code would return. But no cross has happened.
You are absolutely correct. A very elementary mistake ! Silly Billy ! :oops: :oops: :oops:

The next update v.5.07 as follows

For buy

Code: Select all

if (iClose(Symbol(),0,1) >= DailyPivot && iClose(Symbol(),0,0) <= DailyPivot + (PivotBufferPips*Point)) return; 
It uses close of CURRENT candle across DP for entry.


To ensure that the ea does not enter trade long after price has crossed the daily pivot, I would suggest using pull back by setting UseStoch to true. I know this is not in accordance with 10.5 for monkeys, but without the pull back, the ea has not got a chance.

As all previous entries were incorrect, I have started a fresh demo with v.5.07.
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

Re: Master Zen

Post by renexxxx »

fx8000 wrote:
renexxxx wrote:For long

Code: Select all

 if (iClose(NULL,0,2) >= DailyPivot && iClose(NULL,0,1) <= DailyPivot + (PivotBufferPips*Point)) return;
This does not necessarily guarantee a cross of the Daily Pivot. It merely states that two candle's ago, the Close was above the Daily Pivot and 1 candle ago the the Close was lower than 10 PIPs (default) above the Daily Pivot. So, eg. if Daily Pivot is 1.0320. If iClose(NULL,0,2) == 1.0321 and iClose(NULL,0,1) == 1.0329, this code would return. But no cross has happened.
You are absolutely correct. A very elementary mistake !

The next update v.5.07 as follows

For buy

Code: Select all

if (iClose(Symbol(),0,1) >= DailyPivot && iClose(Symbol(),0,0) <= DailyPivot + (PivotBufferPips*Point)) return; 
It uses close of CURRENT candle across DP for entry.


To ensure that the ea does not enter trade long after price has crossed the daily pivot, I would suggest using pull back by setting UseStoch to true. I know this is not in accordance with 10.5 for monkeys, but without the pull back, the ea has not got a chance.

As all previous entries were incorrect, I have started a fresh demo with v.5.07.
The close of the current candle is basically the current price. If you want to use confirmed candles, i would do something like:

Code: Select all

if ( isNewBar( PERIOD_H4 ) ) {
   if ( ( iOpen( Symbol(), PERIOD_H4, 1) > DailyPivot ) && ( iOpen( Symbol(), PERIOD_H4, 0 ) < DailyPivot ) ) return;
}

bool isNewBar(int tf) {
   static int prevBar = -1;
   bool newBar=false; 

   if ( iTime(NULL,tf,0) != prevBar ) {
      newBar=true;
      prevBar=iTime(NULL,tf,0);
   }
   return(newBar);
}
 
I don't know exactly what the use is of PivotBufferPips ... Do you want to have crossed the DailyPivot by at least PivotBufferPips? In that case, you should substract PivotBufferPips as in:

Code: Select all

   if ( ( iOpen( Symbol(), PERIOD_H4, 1) > DailyPivot ) && ( iOpen( Symbol(), PERIOD_H4, 0 ) < DailyPivot - PivotBufferPips*Point ) ) return;
Anyway ... my two cents.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: Master Zen

Post by fx800 »

renexxxx wrote:
fx8000 wrote:
renexxxx wrote:For long

Code: Select all

 if (iClose(NULL,0,2) >= DailyPivot && iClose(NULL,0,1) <= DailyPivot + (PivotBufferPips*Point)) return;
This does not necessarily guarantee a cross of the Daily Pivot. It merely states that two candle's ago, the Close was above the Daily Pivot and 1 candle ago the the Close was lower than 10 PIPs (default) above the Daily Pivot. So, eg. if Daily Pivot is 1.0320. If iClose(NULL,0,2) == 1.0321 and iClose(NULL,0,1) == 1.0329, this code would return. But no cross has happened.
You are absolutely correct. A very elementary mistake !

The next update v.5.07 as follows

For buy

Code: Select all

if (iClose(Symbol(),0,1) >= DailyPivot && iClose(Symbol(),0,0) <= DailyPivot + (PivotBufferPips*Point)) return; 
It uses close of CURRENT candle across DP for entry.


To ensure that the ea does not enter trade long after price has crossed the daily pivot, I would suggest using pull back by setting UseStoch to true. I know this is not in accordance with 10.5 for monkeys, but without the pull back, the ea has not got a chance.

As all previous entries were incorrect, I have started a fresh demo with v.5.07.
The close of the current candle is basically the current price. If you want to use confirmed candles, i would do something like:

Code: Select all

if ( isNewBar( PERIOD_H4 ) ) {
   if ( ( iOpen( Symbol(), PERIOD_H4, 1) > DailyPivot ) && ( iOpen( Symbol(), PERIOD_H4, 0 ) < DailyPivot ) ) return;
}

bool isNewBar(int tf) {
   static int prevBar = -1;
   bool newBar=false; 

   if ( iTime(NULL,tf,0) != prevBar ) {
      newBar=true;
      prevBar=iTime(NULL,tf,0);
   }
   return(newBar);
}
 
I don't know exactly what the use is of PivotBufferPips ... Do you want to have crossed the DailyPivot by at least PivotBufferPips? In that case, you should substract PivotBufferPips as in:

Code: Select all

   if ( ( iOpen( Symbol(), PERIOD_H4, 1) > DailyPivot ) && ( iOpen( Symbol(), PERIOD_H4, 0 ) < DailyPivot - PivotBufferPips*Point ) ) return;
Anyway ... my two cents.
Many thanks.

Can you please post your amended version.

The candle must close by X PivotBuffePips plus DP for a long entry.

The ea is temporily removed from post 1.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: Master Zen

Post by fx800 »

Renee is absolutely correct, Close[0] is essentially the same as the current market price, as I just saw a trade entry when price crossed the DP plus bufferpips.

I am hoping he will post the ea with his amendments so that everyone here can benefit from it.

CTCDPC is meant to be a community project as I am not a coder myself. Help from any quarter is always welcome.

If the expert coders in Steve's forum are busy with their own projects, I can very well understand that.

If what I have done is spur someone into coding an ea to test Zen's ideas, then I would have accomplished what I had set out to do.
You do not have the required permissions to view the files attached to this post.
Last edited by Anonymous on Thu Sep 26, 2013 2:16 pm, edited 2 times in total.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: Master Zen

Post by fx800 »

I have just received the ea with the amended code from Renee by PM, many thanks to him.

It will be available for download in post one soon.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Re: Master Zen

Post by fx800 »

I am posting the mod ea by Renee here for our coders to have a look, and not for general download.

I have run it on Empty4 tester, it doesn't seem right, for some reason.

If it is found trading correctly by one of our coders, then it will be available for download in post 1.

The basic criteria for a buy is

1. Price above 240LWMA

2. The HA candle must turn blue (bull candle) at candle close.

3. The current candle must cross and closed above the daily pivot.
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Automated trading systems”