I have created a simple program for a 4-bar momentum indicator but want it to look like the PRT momentum indicator (i.e. having it oscillate on either side of zero line with different colours). Can anyone tell me what I need to add into the program to achieve this? Thanks. My coding so far is this:
Thank you so much for your coding help. Two things: (1) is there a way I can get the momentum line to be black; and (2) is there a way I can have the zero line label not show?
I may be a little confused by your request now! I thought that you wanted the line to change colour from green to red but did you really mean that you wanted the infill colour to change? If so then this can sort of be achieved by hard coding but it is far easier and gives a much better results if you just add a colour zone via the indicator settings and then save these settings as default for the indicator so that every time you apply the indicator it is the same. Your original code should produce a black line.
If you remove the zero bits of code and add a separate ‘Horizontal Line’ indicator via the indicator settings then you might get rid of the “0” label – not certain so you need to test.
Thanks so much for your help. I had wanted colour to either side of the 1% line, but the line itself to be black (which I’ve now got). If the line is coloured, the numbers/words come up in the data box as coloured text which is much harder to read on the screen than black.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.