How do I Find ATR[1] value, Help

 

Hello to all,

I have posted this question but had taken it down, I am sure it was not clear enough. Maybe it is more understanding now.

How do I find the value of ATR[1], the moment that Ask is greater than the highest high of the last ten bars.

Something like:

if (Ask > ( High [ iHighest, ( NULL, 0, MODE_HIGH, 10, 0 ) ] ) )

{

?? = iATR

I understand that the code is not formatted exactlly like this.Or is the expression. I post as such only to help clarify the problem at hand.

Note: The Atr is calculated by 20 bars and will be declared and initialized. This is not the problem.

Help if anyone can. I have been going in circles for weeks, actually longer than that. Learned from the circles, but still lost.

Cheers

 
Huckleberry wrote >>

Hello to all,

I have posted this question but had taken it down, I am sure it was not clear enough. Maybe it is more understanding now.

How do I find the value of ATR[1], the moment that Ask is greater than the highest high of the last ten bars.

Something like:

if (Ask > ( High [ iHighest, ( NULL, 0, MODE_HIGH, 10, 0 ) ] ) )

{

?? = iATR

I understand that the code is not formatted exactlly like this.Or is the expression. I post as such only to help clarify the problem at hand.

Note: The Atr is calculated by 20 bars and will be declared and initialized. This is not the problem.

Help if anyone can. I have been going in circles for weeks, actually longer than that. Learned from the circles, but still lost.

Cheers

double ATR=iATR(NULL,0,14,1);

https://docs.mql4.com/indicators/iATR