R
RickAns
Guest
Seems to work alright. One thing I noticed is that if both plusDM and minusDM are both 0 then it colors the label red. Not sure if you want that.
To troubleshoot I used. Could have been in one line, I just did it with two.
Altered your label a bit to turn cyan if both are 0 but you can choose whatever color you like.
Is that what you were asking about?
Cheers,
Rick
edited
To troubleshoot I used. Could have been in one line, I just did it with two.
Code:
AddLabel(yes, "plusDM: " +plusDM+ "", color.gray );
AddLabel(yes, "minusDM: " +minusDM+ "", color.gray );
Altered your label a bit to turn cyan if both are 0 but you can choose whatever color you like.
Code:
AddLabel(yes, "DMI("+length+"):" + Round(DX/ATR,1),(if plusDM > minusDM then Color.GREEN else if minusDM > plusDM then Color.RED else color.cyan));
Is that what you were asking about?
Cheers,
Rick
edited
Last edited by a moderator: