TTM scalper - page 4

 

Mladen it is possible to create MTF version of TTM scalper indicator? Personally i don't need tha alarms.

Thank you

 

Mladen i learn how to manage ttm scalper indicator.

I have only one issue.

I want find the ttm scalper on Higher time frame. I use this function. I recall it in hthis way if(HTFBUY()==true){......}.

It is correct?

bool HTFBUY(){

for(int i = 3 ; i < 1500 ; i++)

{

temp = iCustom(NULL,PeriodoFiltro,"TTM scalper",0,i);

if (temp != EMPTY_VALUE) count = count+1;

if(count == 1 && temp != EMPTY_VALUE) b1 = Time;

if(count == 2) break;

}

barra=iBarShift(NULL,PeriodoFiltro,b1);

p1=iCustom(NULL,PeriodoFiltro,"TTM scalper",0,barra);

p2=iLow(NULL,PeriodoFiltro,barra);

if(p1==p2)

return(true);

}
 

dasio

Replace b1 = Time; with b1 = iTime(NULL,PeriodoFiltro,i);

That way you are going to have exact time of the target time frame bar

dasio:
Mladen i learn how to manage ttm scalper indicator.

I have only one issue.

I want find the ttm scalper on Higher time frame. I use this function. I recall it in hthis way if(HTFBUY()==true){......}.

It is correct?

bool HTFBUY(){

for(int i = 3 ; i < 1500 ; i++)

{

temp = iCustom(NULL,PeriodoFiltro,"TTM scalper",0,i);

if (temp != EMPTY_VALUE) count = count+1;

if(count == 1 && temp != EMPTY_VALUE)b1 = Time;

if(count == 2) break;

}

barra=iBarShift(NULL,PeriodoFiltro,b1);

p1=iCustom(NULL,PeriodoFiltro,"TTM scalper",0,barra);

p2=iLow(NULL,PeriodoFiltro,barra);

if(p1==p2)

return(true);

}
 
mladen:
dasio

Replace b1 = Time; with b1 = iTime(NULL,PeriodoFiltro,i);

That way you are going to have exact time of the target time frame bar

Thank you ^^

 

Hi Mladen,

I try to build an ea that buy or sell if the price close above or belowe the signal. I try to do it with hidden level.

I'm not a expert with programming but can you fix the ea? because it don't open position.

Thank you

breakoutttm.mq4

Files:
 

dasio

Why don't you try using the TrendBuffer from TTM scalper (the 5th buffer in that indicator)? It already contains data on "trend" so you can easily use it to find out what is the "trend" of any bar tested : +1 in that buffer is up, -1 is down

dasio:
Hi Mladen,

I try to build an ea that buy or sell if the price close above or belowe the signal. I try to do it with hidden level.

I'm not a expert with programming but can you fix the ea? because it don't open position.

Thank you

breakoutttm.mq4
 
mladen:
dasio Why don't you try using the TrendBuffer from TTM scalper (the 5th buffer in that indicator)? It already contains data on "trend" so you can easily use it to find out what is the "trend" of any bar tested : +1 in that buffer is up, -1 is down

In TTMScalper.mq4 the buffer would be the 3°. Can you confirm it?

Thank you

UPDATE

Se below Thanks.

 

Hi Mladen,

I try how you told me using buffer 2.

Attached there is a simple ea and an image.

Why the ea open the order also if it haven't the signal from TTMscalper?

Thank you

martingalper.mq4

Files:
issue.gif  41 kb
 

Sorry for late reply :

You have to check if the trend buuffer value have changed. So you have to do something like this :

if (valueOfTrendNow!=valueOfTrendOnPreviousBar) // do the order opening

It is because trend buffer "inherits" the previous value (this line in the indicator code : trendBuffer = trendBuffer; )

dasio:
Hi Mladen,

I try how you told me using buffer 2.

Attached there is a simple ea and an image.

Why the ea open the order also if it haven't the signal from TTMscalper?

Thank you

martingalper.mq4
 

Thank you.

I code it in this way and it's seems work.

string UltimoSwing(){

double temp = 0;

string Segnale;

int count =0;

datetime b1;

for(int i = 3 ; i < 1500 ; i++)

{

temp = iCustom(NULL,0,"TTM scalper",0,i);

if (temp != EMPTY_VALUE) count = count+1;

if(count == 1 && temp != EMPTY_VALUE) {b1=Time;}

if(count == 2) break;

}

int a =iBarShift(NULL,0,b1);

if(iCustom(NULL,0,"TTM scalper",0,a)!=EMPTY_VALUE){

double Previous=iCustom(NULL,0,"TTM scalper",2,1);

double Current=iCustom(NULL,0,"TTM scalper",2,2);

if(Previous !=Current && Current== -1) Segnale="Low";

if(Previous !=Current && Current== 1) Segnale="High";}

return(Segnale);

}