Thursday, September 8, 2016

Here is a script for having the range as a label for an intraday label.


Code:

input end = 1600;
def active = if secondsFromTime(start) == 0 then 1 else 0;
def h = high;
def hh = if active && h then h else if h > hh[1] then h else hh[1];
def l = low;
def ll = if active && l then l else if l < ll[1] then l else ll[1];
plot RTH_High = hh;
RTH_High.hide();
plot RTH_Low = ll;
RTH_Low.hide();
RTH_High.setpaintingStrategy(paintingStrategy.ARROW_DOWN);
RTH_Low.setPaintingStrategy(paintingStrategy.ARROW_UP);

addlabel(1,"Range = " + (hh - ll)+ "; " + "Range% = " + Round(100*(hh - ll)/open,2) +"%",color.white);

2 comments:

Rebecca D. McNeely said...

Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. fxgm za

NiceFreshClean said...

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often. 70trades