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
Attachments


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

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


Who is online

Users browsing this forum: No registered users and 4 guests