Re: Average Daily Range Trading

#41
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
NZDUSD-9-7-2017-840pm-pst.PNG


Re: Average Daily Range Trading

#42
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
NZDUSD-9-17-2017-150pmPST.PNG
StretchBreakoutChannel.mq4
(4.66 KiB) Downloaded 565 times
averages - mtf - alerts 8.3 - atr bands.ex4
(142.21 KiB) Downloaded 692 times
Daily Av Percentage v1.mq4
(3.24 KiB) Downloaded 751 times
averages - mtf - alerts 8.8.ex4
(150.94 KiB) Downloaded 656 times

Re: Average Daily Range Trading

#44
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

#46
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

#47
JADragon3 wrote:
Tue Sep 26, 2017 12:30 pm
michaelB wrote:
Tue Sep 26, 2017 5:17 am

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
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

#48
michaelB wrote:
Wed Sep 27, 2017 2:44 am
JADragon3 wrote:
Tue Sep 26, 2017 12:30 pm

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.
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

#49
michaelB wrote:
Wed Sep 27, 2017 4:43 am
michaelB wrote:
Wed Sep 27, 2017 2:44 am

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.
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

#50
michaelB wrote:
Wed Sep 27, 2017 2:44 am
JADragon3 wrote:
Tue Sep 26, 2017 12:30 pm

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.
So what kind of EA are you trying to build ? Maybe I can add some thoughts ?


  1. Similar Topics

    1. Daily trades

      44 Replies 5085 Views

      by FBI, Fri Mar 29, 2019 6:32 am in Trading Journals

      44 Replies
      5085 Views
    2. Daily Data

      1 Replies 344 Views

      by jisun09, Sat Jul 11, 2020 12:57 am in MT4 Indicators

      1 Replies
      344 Views

Return to “Trading Journals”