You can do something like this :
extern int TimeFrame = PERIOD_D1;
extern int AtrPeriod = 20;
//
//
//
//
//
int init() { return(0); }
int deinit() { return(0); }
int start()
{
Comment("current range is : "+DoubleToStr(100.0*(iHigh(NULL,TimeFrame,0)-iLow(NULL,TimeFrame,0))/iATR(NULL,TimeFrame,AtrPeriod,0),2)+" %");
}Hi everybody,
I'm looking for an indicator which shows the percent of today's range compared to daily ATR period 20 (adjustable would be nice). So for example if on daily frame ATR20 is 120 p and today's range is already 60 p I would see ATR%-50 perhaps in the upper left corner, on every time frame.
Has anybody seen something like that? Or perhaps you can code it?
Any help? Thank you.Thanks Mladen,
This is exactly what I was looking for
You can do something like this :
extern int TimeFrame = PERIOD_D1;
extern int AtrPeriod = 20;
//
//
//
//
//
int init() { return(0); }
int deinit() { return(0); }
int start()
{
Comment("current range is : "+DoubleToStr(100.0*(iHigh(NULL,TimeFrame,0)-iLow(NULL,TimeFrame,0))/iATR(NULL,TimeFrame,AtrPeriod,0),2)+" %");
}Wow. That is excellent for ADR trading. I have a strategy that relies on such percentages +/-
the ADR range.
I wonder if you could add an adjustable alert to signal when a percentage is breached? I would like to set this indicator to alert @ 112% of the current range, for example. A fixed alert would be fine if that is easier.
Thanks in advance for considering..
You can do something like this :
extern int TimeFrame = PERIOD_D1;
extern int AtrPeriod = 20;
//
//
//
//
//
int init() { return(0); }
int deinit() { return(0); }
int start()
{
Comment("current range is : "+DoubleToStr(100.0*(iHigh(NULL,TimeFrame,0)-iLow(NULL,TimeFrame,0))/iATR(NULL,TimeFrame,AtrPeriod,0),2)+" %");
}Could a pop up alert be added to this rangepercent indictor please?
So that when the current range exceeds a chosen percentage it fires the alert.
That would be VERY useful.
Thanks
TEAMTRADER
I understood that the rangepercent indi was programmable to give information relating to the previous ATR - can this not be done?
Thanks
TEAMTRADER
You can do something like this :
extern int TimeFrame = PERIOD_D1;
extern int AtrPeriod = 20;
//
//
//
//
//
int init() { return(0); }
int deinit() { return(0); }
int start()
{
Comment("current range is : "+DoubleToStr(100.0*(iHigh(NULL,TimeFrame,0)-iLow(NULL,TimeFrame,0))/iATR(NULL,TimeFrame,AtrPeriod,0),2)+" %");
}You are truly an amazing person. I have no idea what somebody like me with 0 knowledge about coding would do without people like you. Really thank you for all your work.
Just one more thing, is it posible to make it a graph instead of just the current value?
You are truly an amazing person. I have no idea what somebody like me with 0 knowledge about coding would do without people like you. Really thank you for all your work. Just one more thing, is it posible to make it a graph instead of just the current value?
If you place that expression into a loop, you will get a normal indicator with historical values
You can do something like this :
extern int TimeFrame = PERIOD_D1;
extern int AtrPeriod = 20;
//
//
//
//
//
int init() { return(0); }
int deinit() { return(0); }
int start()
{
Comment("current range is : "+DoubleToStr(100.0*(iHigh(NULL,TimeFrame,0)-iLow(NULL,TimeFrame,0))/iATR(NULL,TimeFrame,AtrPeriod,0),2)+" %");
}Can this Range% indicator be made so it can be placed in a different area please?
Thanks
TEAMTRADER
That is comment
You can not change the position of comment
Can no alert be made for this indicator? It seems a shame as it would be another valuable asset.
TEAMTRADER
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi everybody,
I'm looking for an indicator which shows the percent of today's range compared to daily ATR period 20 (adjustable would be nice). So for example if on daily frame ATR20 is 120 p and today's range is already 60 p I would see ATR%-50 perhaps in the upper left corner, on every time frame.
Has anybody seen something like that? Or perhaps you can code it?
Any help? Thank you.