Check for odd numbers
- This topic has 5 replies, 3 voices, and was last updated 4 years ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
Forums › ProRealTime English forum › ProBuilder support › Check for odd numbers
How do I skip odd numbers (or evens) in the following code:
1 2 3 4 5 6 7 8 9 10 |
//04.01.2021 //Grantx //vertical offset to draw text correctly over horizontal lines Voffset = 1.2*pipsize DRAWTEXT(IntradayBarIndex, barindex, high+Voffset, Dialog,Standard, 20) COLOURED(255,255,255) RETURN |
1 2 |
EvenNumber = ((Number MOD 2) =0) OddNumber = ((Number MOD 2) =1) |
only one of the two variables can be true each time.
No, there’s no way. You can’t use variables so you’ll have to change the code.