[Ask] Code MA

 

Ask for Help Code

Graves' Disease Foundation all ..

I have a headache looking for code on the ATR indicator MA (previous indicators of data).

If anyone can help me very happy ..

What I want is an ATR crossed MAit will be reflected in the Chart window, a rectangel.

Hopefully nothing helps.

 

Hi Samid,

I have this version, maybe its what your looking for,and hopefully to heal your headache.

Files:
atr_ma.mq4  2 kb
atr_ma.gif  21 kb
 

Thanks

thank you mrtools,

This indicator is very meaningful for me, but I really want is how the code to draw a box on the chart windows, if MA Previous data above ATR ... so I do not have to look into separate_windows again.

 

Great

Thanks Mrtools,

Your work is amazing ..

But I mean is how do I draw a box if the previous MA Indicator Data (Period 14, EMA) is above the ATR (periode14). So I do not see anymore separate_windows

thanks,..

Files:
atr_dan_ma.gif  33 kb
 
samid:
Thanks Mrtools,

Your work is amazing ..

But I mean is how do I draw a box if the previous MA Indicator Data (Period 14, EMA) is above the ATR (periode14). So I do not see anymore separate_windows

thanks,..

Thanks for the kind words but would have felt better if i would have read your first post more thoroughly. I understand what you are looking for now, and not sure if i will be able to do that but will try, and also apologize for the misunderstanding.

 

MrTools,

I also apologize if my request is too much, but this I do for my analysis.

A lot of explaining if MA (previous data, EMA) are under the ATR is where there is profit ..

Perhaps you are more experienced in this than me.

 
samid:
MrTools,

I also apologize if my request is too much, but this I do for my analysis.

A lot of explaining if MA (previous data, EMA) are under the ATR is where there is profit ..

Perhaps you are more experienced in this than me.

Samid don't know if your idea is to much or not, can say your idea rekindled an old idea i had awhile back about having adaptable boxes, all the boxes i have done use begin time and end time for the vertical parts of the box, for your idea begin time would be the cross of atr and ma and end time would be the uncrossing, and i'm not knowing how to subsitute the crossing for time.

 

Mr Tools

I may be off the mark, but here is something like I think you want. I am doing something similar to determine the crossover of two moving averages and retaining the crossover time so I can go back and determine how many bars have passed. You could also keep track of the return result. When it changes to up you have the ATR cross and when it changes to down it signals the ATR "uncross".

int Crossed (int crossover, int bar, double FastLine[] , double SlowLine[])

{

int previous=bar+1;

if(FastLine>=SlowLine && FastLine[previous]<SlowLine[previous]) {CrossOverTime=Time; return(1);} //up

if(FastLineSlowLine[previous]) {CrossOverTime=Time; return(-1);} //down

return (crossover);

}

CrossOverBar=iBarShift(Symbol(),0,CrossOverTime);

 

Thanks again

mrtools:
Samid don't know if your idea is to much or not, can say your idea rekindled an old idea i had awhile back about having adaptable boxes, all the boxes i have done use begin time and end time for the vertical parts of the box, for your idea begin time would be the cross of atr and ma and end time would be the uncrossing, and i'm not knowing how to subsitute the crossing for time.

I say thank you for your concern, Mrtools ..

Maybe my opinion is still a beginner, the crossing over is to look sideway area ... so it can be used for scalping. Looking for a little point with a lot of ..

After sideway passes then we will continue to trend strongly. upward or downward.

 
Tzuman:
Mr Tools

I may be off the mark, but here is something like I think you want. I am doing something similar to determine the crossover of two moving averages and retaining the crossover time so I can go back and determine how many bars have passed. You could also keep track of the return result. When it changes to up you have the ATR cross and when it changes to down it signals the ATR "uncross".

int Crossed (int crossover, int bar, double FastLine[] , double SlowLine[])

{

int previous=bar+1;

if(FastLine>=SlowLine && FastLine[previous]<SlowLine[previous]) {CrossOverTime=Time; return(1);} //up

if(FastLineSlowLine[previous]) {CrossOverTime=Time; return(-1);} //down

return (crossover);

}

CrossOverBar=iBarShift(Symbol(),0,CrossOverTime);

Hi Tzuman,

Thanks, think that just might work, soon as i wake up enough will give it a go.