Horizontal daytrade lines
Forums › ProRealTime English forum › ProBuilder support › Horizontal daytrade lines
- This topic has 5 replies, 2 voices, and was last updated 3 years ago by Nichart.
-
-
01/28/2021 at 10:10 PM #159741
Hi, I want to make an day trade indicator that plot 8 (or more) colored horizontal lines. The formula for every line has to be: (but are not final)
(openings price divide by 2 + 0.25) multiplied by 2 = 1st horizontal line blue
(openings price /2 + 0.50) x2 = 2de horizontal line green
(openings price /2 + 0.75) x2 = 3de horizontal line blue
(openings price /2 + 1 ) x2 = 4th horizontal line yellow
Then the same in minus
(openings price /2 – 0.25) x2 = 1st horizontal line blue
(openings price /2 – 0.50) x2 = 2de horizontal line green
(openings price /2 – 0.75) x2 = 3de horizontal line blue
(openings price /2 – 1 ) x2 = 4th horizontal line yellow
The lines may run over whole chart with the price stated at the end right side. If possible, can I add in the program a small text on every line?
Can someone help me starting so I can adjust it further? Thanks!
01/29/2021 at 1:19 PM #15983201/30/2021 at 1:20 AM #15988302/03/2021 at 3:11 PM #160253I have already come this far, but I like to have the price displayed on each horizontal line. So the result of line1 on the horizontal line, result of line2 on line2 etc…..
Maybe also thicker lines.
Is this possible, I have not found this immediately here in the forum.
Thanks
123456789101112131415line1 = (dopen(0)/ 2 + 0.25) *2line2 = (dopen(0)/ 2 + 0.50) *2//vertical offset to draw text correctly over horizontal linesVoffset = 1*pipsize//text on lineDRAWTEXT("text",barindex+10,line1+Voffset,SansSerif,Bold,12)coloured(0,0,255)DRAWTEXT("text",barindex+10,line2+Voffset,SansSerif,Bold,12)coloured(0,180,25)//horizontal linesDRAWLINE(barindex-1,line1,barindex,line1)coloured(0,0,255)DRAWLINE(barindex-1,line2,barindex,line2)coloured(0,180,25)RETURN02/03/2021 at 3:19 PM #160257To use a variable value with DRAWTEXT add # before and after the variable name:
123//text on lineDRAWTEXT("#line1#",barindex+10,line1+Voffset,SansSerif,Bold,12)coloured(0,0,255)DRAWTEXT("#line2#",barindex+10,line2+Voffset,SansSerif,Bold,12)coloured(0,180,25)02/03/2021 at 5:10 PM #160265 -
AuthorPosts