Show or not show indicator value
Forums › ProRealTime English forum › ProBuilder support › Show or not show indicator value
- This topic has 6 replies, 5 voices, and was last updated 4 years ago by Vonasi.
-
-
11/30/2019 at 9:11 AM #113943
Hello
What is best practice to show or not to show an indicator value with return?
I would like to have a check box, where I can chose to show the 26 week line or not to show the 26 week line in the following indicator:
Highest High and lowest low 20 days or 26 week12345678910111213141516//// Highest High 20 days or 26 week according to Larry Williams//hh20 = highest[20](high)hl20 = lowest[20](low)//hh26w = highest[128](high)//hl26w = lowest[128](low)if show26 = 1 thenhh26w = highest[128](high)hl26w = lowest[128](low)endifreturn hh20 coloured (0,128,255) as "Hishest High 20 Days", hl20 coloured (0,128,255) as "Hishest Low 20 Days",hh26w coloured (0,255,255) as "Hishest High 26 Week", hl26w coloured (0,255,255) as "Hishest Low 26 Week"11/30/2019 at 10:06 AM #113945Add a 4th (optional) parameter with colour, it’s called Transparency or Fade and has a rang from 0 (invisible) to 255 (max visibility):
1coloured (0,128,255,255)you can use a variable and set it to 0 when you don’t want that line to be visible or any greater number to make it more or less visible:
12345t = 255IF DontShow = 1 THENt = 0ENDIFRETURN xyz coloured (0,128,255,t) AS "xyz"11/30/2019 at 11:18 AM #113947Or set it as UNDEFINED. The trouble with setting it as zero is that even when transparent a zero value line is drawn and the scaling of the chart is messed up.
123456789101112131415161718//// Highest High 20 days or 26 week according to Larry Williams//hh20 = highest[20](high)hl20 = lowest[20](low)if show26 thenhh26w = highest[128](high)hl26w = lowest[128](low)elsehh26w = undefinedhl26w = undefinedendifreturn hh20 coloured (0,128,255) as "Hishest High 20 Days", hl20 coloured (0,128,255) as "Hishest Low 20 Days",hh26w coloured (0,255,255) as "Hishest High 26 Week", hl26w coloured (0,255,255) as "Hishest Low 26 Week"2 users thanked author for this post.
11/30/2019 at 12:08 PM #113953Useful tip: the scaling is not messed up if you define your price option to adapt the scale to price only (setting available in the price menu).
3 users thanked author for this post.
12/04/2019 at 8:54 AM #11415612/04/2019 at 7:48 PM #114208Or go to the indicator window top left corner, then click on the spanner to open its properties window, and there on the left side click on your 26 week line and on the right side you can set its “style” where the last option after the type of line, or point etc… is: “invisible”
12/04/2019 at 10:52 PM #114216invisible
This works fine if you supply an ITF file and have fixed the settings before exporting it but if someone cuts and pastes code then the UNDEFINED option is a little more idiot proof.
-
AuthorPosts
Find exclusive trading pro-tools on