Check for odd numbers
Forums › ProRealTime English forum › ProBuilder support › Check for odd numbers
- This topic has 5 replies, 3 voices, and was last updated 4 years ago by
robertogozzi.
Viewing 6 posts - 1 through 6 (of 6 total)
-
-
01/09/2021 at 11:09 PM #157145
How do I skip odd numbers (or evens) in the following code:
number bars12345678910//04.01.2021//Grantx//vertical offset to draw text correctly over horizontal linesVoffset = 1.2*pipsizeDRAWTEXT(IntradayBarIndex, barindex, high+Voffset, Dialog,Standard, 20) COLOURED(255,255,255)RETURN01/09/2021 at 11:28 PM #15714601/10/2021 at 12:29 AM #15715601/10/2021 at 12:37 AM #15715912EvenNumber = ((Number MOD 2) =0)OddNumber = ((Number MOD 2) =1)only one of the two variables can be true each time.
1 user thanked author for this post.
01/10/2021 at 1:49 PM #15719901/10/2021 at 2:02 PM #157201No, there’s no way. You can’t use variables so you’ll have to change the code.
-
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)