Hi all,
I am trying to create a very basic indicator, to help me visualise a strategy. I would like that everyday horizontal lines will be drawn to visualise some parameters.
I have been reading the instructions to draw and create indicators and I am missing something. Right now, I can just see lines from today, and I would like to see different lines for everyday’s values.
I am attaching the indicator:
// GRID20 Indicator
// LevelZERO and Levels 1up/1down
defparam drawonlastbaronly = true
// GRID distance
disgrid1 = 10
disgrid2 = 30
// Defining GRID levels
IF time=010000 THEN
levelZERO=close
ENDIF
level1up = levelZERO + disgrid1*pipsize
level2up = levelZERO + disgrid2*pipsize
level1down = levelZERO - disgrid1*pipsize
level2down = levelZERO - disgrid2*pipsize
//Drawing text and lines
DRAWTEXT("level2UP",barindex-1,level2up,SansSerif,Bold,14)coloured(200,200,0)
DRAWTEXT("level1UP",barindex-1,level1up,SansSerif,Bold,14)coloured(0,0,153)
DRAWTEXT("levelZERO",barindex-1,levelZERO,SansSerif,Bold,14)coloured(200,153,0)
DRAWTEXT("level1DOWN",barindex-1,level1down,SansSerif,Bold,14)coloured(0,0,153)
DRAWTEXT("level2DOWN",barindex-1,level2down,SansSerif,Bold,14)coloured(200,200,0)
DRAWHLINE(level2up) coloured(0,200,0)
DRAWHLINE(level1up) coloured(0,0,150)
DRAWHLINE(levelZERO)coloured(0,200,0)
DRAWHLINE(level1down)coloured(0,0,150)
DRAWHLINE(level2down) coloured(0,200,0)
RETURN
Thanks,
Juan