Page 5 of 6

Re: Average Daily Range Trading

Posted: Fri Sep 08, 2017 1:42 pm
by JADragon3
NZDUSD - Keeping an eye out for signs of a turnaround at this high based on being out of the range. Personally , Thinking this one is going to run a little bit. Looking for more of a corrective turn and then upward continuation. I think this is that hard run out of the range I have been waiting to see

Re: Average Daily Range Trading

Posted: Mon Sep 18, 2017 7:05 am
by JADragon3
Hello viewers. Hope all is well in your trading world. Sorry if anyone was looking for a post last week and didn't get it.

NZDUSD - I missed the bounce of price off the lower range because of sleep. And then made a bad trade going against the rules I have been trying to establish. I am looking for a signal at the top once again. I have also added averages ATR bands (ADXVMA) on a 15min setting to possibly assist in a daily directional bias and possible alert areas for pullback entries. Lets see how this week works out.

On a side note , I would like to workout this system for a few different pairs , not just NZDUSD

Re: Average Daily Range Trading

Posted: Mon Sep 18, 2017 7:12 am
by JADragon3
I try to use MQ4 files when possible. That way they can be updated down the road if need be.

Re: Average Daily Range Trading

Posted: Tue Sep 26, 2017 5:17 am
by michaelB
Problem with iATR ??
I wrote a small test indicator to display the iATR values.
This indicator also displays the difference between the High and Low values for the first few candles.
When I manually calculate the ATR for periods 1,2, and 3 the result agrees with the iATR value.
However, any iATR period above 3 does not agree with the manual calculations.
I must be doing something wrong, but I can't see the problem.

Code: Select all

#property indicator_chart_window
int start()
{
    static datetime currentBar = 0;
    if  (currentBar == Time[0])  return(0);
    else currentBar  = Time[0]; 
    
    Print("[1] ",DoubleToStr(MathAbs(High[1] - Low[1]),5),
       "   [2] ",DoubleToStr(MathAbs(High[2] - Low[2]),5),
       "   [3] ",DoubleToStr(MathAbs(High[3] - Low[3]),5), 
       "   [4] ",DoubleToStr(MathAbs(High[4] - Low[4]),5),
       "   [5] ",DoubleToStr(MathAbs(High[5] - Low[5]),5));   
    
    Print("ATR1  ",DoubleToStr(iATR(NULL,0,1,1),5));  
    Print("ATR2  ",DoubleToStr(iATR(NULL,0,2,1),5));    
    Print("ATR3  ",DoubleToStr(iATR(NULL,0,3,1),5));
    Print("ATR4  ",DoubleToStr(iATR(NULL,0,4,1),5));
    Print("ATR5  ",DoubleToStr(iATR(NULL,0,5,1),5));     
    return(0);
}

Re: Average Daily Range Trading

Posted: Tue Sep 26, 2017 12:24 pm
by JADragon3
NZDUSD - Keeping an eye out to see if we can get a valid entry back up to the top. It's looking pretty weak at the moment.

Re: Average Daily Range Trading

Posted: Tue Sep 26, 2017 12:30 pm
by JADragon3
michaelB wrote: Tue Sep 26, 2017 5:17 am Problem with iATR ??
I wrote a small test indicator to display the iATR values.
This indicator also displays the difference between the High and Low values for the first few candles.
When I manually calculate the ATR for periods 1,2, and 3 the result agrees with the iATR value.
However, any iATR period above 3 does not agree with the manual calculations.
I must be doing something wrong, but I can't see the problem.

Code: Select all

#property indicator_chart_window
int start()
{
    static datetime currentBar = 0;
    if  (currentBar == Time[0])  return(0);
    else currentBar  = Time[0]; 
    
    Print("[1] ",DoubleToStr(MathAbs(High[1] - Low[1]),5),
       "   [2] ",DoubleToStr(MathAbs(High[2] - Low[2]),5),
       "   [3] ",DoubleToStr(MathAbs(High[3] - Low[3]),5), 
       "   [4] ",DoubleToStr(MathAbs(High[4] - Low[4]),5),
       "   [5] ",DoubleToStr(MathAbs(High[5] - Low[5]),5));   
    
    Print("ATR1  ",DoubleToStr(iATR(NULL,0,1,1),5));  
    Print("ATR2  ",DoubleToStr(iATR(NULL,0,2,1),5));    
    Print("ATR3  ",DoubleToStr(iATR(NULL,0,3,1),5));
    Print("ATR4  ",DoubleToStr(iATR(NULL,0,4,1),5));
    Print("ATR5  ",DoubleToStr(iATR(NULL,0,5,1),5));     
    return(0);
}
I am not sure at all. I have very very little knowledge about coding at the moment. What exactly are you trying to accomplish ? If you don't mind me asking

Re: Average Daily Range Trading

Posted: Wed Sep 27, 2017 2:44 am
by michaelB
[quote=JADragon3 post_id=1295363959 time=1506393011 user_id=4928779]

I was using iATR in an EA, when I noticed the value it returns is sometimes not what I expected.
When I manually calculate the ATR over the last 5 candles, the result does not agree with iATR.

Re: Average Daily Range Trading

Posted: Wed Sep 27, 2017 4:43 am
by michaelB
[quote=michaelB post_id=1295363991 time=1506444268 user_id=4867181]

Interesting, after additional testing, this issue seems to only occur with pairs that include the NZD.
I'm using FXCM demo account.
Apparently the problem is with FXCM. There is no issue on Oanda platform.

Re: Average Daily Range Trading

Posted: Wed Sep 27, 2017 7:03 am
by JADragon3
[quote=michaelB post_id=1295363996 time=1506451400 user_id=4867181]


That would probably be par for the course when it comes to FXCM. Especially considering they were just banned from the US for defrauding their customers.

Re: Average Daily Range Trading

Posted: Wed Sep 27, 2017 7:06 am
by JADragon3
[quote=michaelB post_id=1295363991 time=1506444268 user_id=4867181]


So what kind of EA are you trying to build ? Maybe I can add some thoughts ?