Hi
would like to add horizontal lines for
- last day High (yhigh)
- last day low (ylow)
- day before last high (yy high)
- day before last low (yy low)
anyone programmed this already ?
any clues how to solve this ?
thx
t
Hi
here my first attempt, but I can’t see any line…
// shows line for last 2 days high and low
DEFPARAM DRAWONLASTBARONLY = true
R = 0
V = 255
B = 255
a = 0
DRAWHLINE(DHigh(1))//Coloured(R,V,B,a)
DRAWHLINE(DLow(1))//Coloured(R,V,B,a)
DRAWHLINE(DHigh(2))//Coloured(R,V,B,a)
DRAWHLINE(DLow(2))//Coloured(R,V,B,a)
Return
Several of my strategies are based on this logic and work quite well. In many different markets.
HI @phoentzs
but how did you program this into the chart ?
thx
t
Draw in yourself if you want to see it or … there is an indicator somewhere in the library that does that. I don’t know exactly which one, I’m on the phone. Just look for Dhigh.
HI
think I got it
// shows line for last 2 days high and low
DEFPARAM DRAWONLASTBARONLY = true
R = 0
V = 255
B = 204
a = 255
LStyle = 1
LThickness = 3
// Day of week 1 is monday, 2 Tuesday
// DHigh does not work on weekends (it seems)
If DayOfWeek = 1 then
LookBack = 3
Elsif dayofweek = 6 then
lookback = 1
elsif dayofweek = 7 then
lookback = 2
Else
LookBack = 1
Endif
DRAWHLINE(DHigh(lookback)) Coloured(R,V,B,a)
DRAWHLINE(DLow(lookback)) Coloured(R,V,B,a)
DRAWHLINE(DHigh(lookback+1)) Coloured(R,V,B,a)
DRAWHLINE(DLow(lookback+1)) Coloured(R,V,B,a)
Return