Script to calculate Average Daily Range? - page 9

 

How to use?

Hi Nich,

The code which you gave is in some code. How to use that?? Is it a calculator?? Please guide me anyone

Thanks in advance

Raja

 

Average Traded Price (ATP)

Does any one know to convert Amibroker afl into MT4 Indicator??

I want to plot ATP (Average Traded Price) on chart. The coding is as under:

//=====================================

//======AVERAGE TRADED PRICE OR TODAY

DayChange = Day() != Ref(Day(), -1);

AvgTradePrice = Null;

CurDayVol = 0.000;

CurDayValue = 0.000;

for (i = 0; i < BarCount; i++)

{

if (DayChange)

{

CurDayValue= 0.000;

CurDayVol = 0.000;

}

CurDayValue= CurDayValue + (C * V);

CurDayVol=CurDayVol+ V;

AvgTradePrice = CurDayValue / CurDayVol;

}

Plot(AvgTradePrice, "Current ATP" , colorYellow,styleDots );

//===============================================

The above ATP coding is plotting ATP line on chart which is too much helpfull for day trading. If any person is able to convert the code to MQL please contat me on hareshbhaip@yahoo.com

 

I'll use this old thread to ask a question about the ADR indicators (not ATR).

Is there an indicator that alerts when the ADR breaks out of the last 'x' days range?

Thanks

TEAMTRADER

Reason: