Cloud above or below stock's opening price?

evanevans

evanevans

Member
Is there an indicator to show a green or red cloud above or below the open price on charts? This is the closest thing I can find that has some resemblance to what I'm talking about:



But the difference would be that on mine, the negative periods would be red cloud, and the positive periods green cloud.
 
Last edited by a moderator:
P

Pensar

Active member
VIP
@evanevans Here is something simple; it will only display during regular trading hours.

Code:
declare hide_on_daily;
def start = if SecondsFromTime(0930) >= 0 then 1 else 0;
def end = if SecondsTillTime(1600) >= 0 then 1 else 0;
def o = open(period = aggregationperiod.day);
plot pivot = if start and end then o else double.nan;
def above = if low > o then hl2 else double.nan;
def below = if high < o then hl2 else double.nan;
AddCloud(above,pivot,color.dark_green,color.dark_green);
AddCloud(below,pivot,color.dark_red,color.dark_red);
 

Similar threads

Top