Help with drawing daily lines
Forums › ProRealTime English forum › ProBuilder support › Help with drawing daily lines
- This topic has 6 replies, 2 voices, and was last updated 6 years ago by Leo.
-
-
01/31/2018 at 4:39 PM #61116
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:
1234567891011121314151617181920212223242526272829303132333435// GRID20 Indicator// LevelZERO and Levels 1up/1downdefparam drawonlastbaronly = true// GRID distancedisgrid1 = 10disgrid2 = 30// Defining GRID levelsIF time=010000 THENlevelZERO=closeENDIFlevel1up = levelZERO + disgrid1*pipsizelevel2up = levelZERO + disgrid2*pipsizelevel1down = levelZERO - disgrid1*pipsizelevel2down = levelZERO - disgrid2*pipsize//Drawing text and linesDRAWTEXT("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)RETURNThanks,
Juan
01/31/2018 at 5:31 PM #6112201/31/2018 at 9:57 PM #61142Hi Leo,
I don’t understand. If I change/remove/deactivate defparam drawonlastbaronly to false, as you can see in the attached screenshot I still got the same lines from today back in the past, plus the text multiplied by every single bar.
What I want is everyday draw lines at 010000 for that day. It is suppose to be different lines everyday, but now I just got the lines from today all the way to the past.
Thanks
Juan
01/31/2018 at 11:14 PM #61148Hi all,
I got it. It is solved. I have checked some of the indicators of the library and they show how to do it.
Thanks anyway,
Juan
02/01/2018 at 6:17 AM #6116102/01/2018 at 10:25 AM #61178Sure,
Actually, I have copied it from one of your indicators.
123456789101112131415161718192021// GRID20 Indicator// LevelZERO and Levels 1up/1downdefparam drawonlastbaronly = true// Distancia GRIDdisgrid1 = 10disgrid2 = 30// Determinición niveles GRIDIF time=010000 THENlevelZERO=closeENDIFlevel1up = levelZERO + disgrid1*pipsizelevel2up = levelZERO + disgrid2*pipsizelevel1down = levelZERO - disgrid1*pipsizelevel2down = levelZERO - disgrid2*pipsizeRETURN LevelZERO as "levelZERO", level1up as "level1up", level2up as "level2up", level1down as "level1down", level2down as "level2down"I just replaced the drawing lines. The command RETURN and the description of the parameters did it.
Regards,
Juan
02/01/2018 at 8:30 PM #61231 -
AuthorPosts
Find exclusive trading pro-tools on