♥ 0 |
Hi Pete, I’m stuck with the color problem. The color fails to stay(keep) in green during/within the upward trend (even with the flat lines among upward trend), and I’ve tried many different ways but couldn’t get the color right. Here’s my thinkscript code as follows: #=============================== declare upper; def HH = Highest(high[1], 20); MM.DefineColor(“Up”, color.green); MM.AssignValueColor( if MM>MM[1] then MM.Color(“Up”) else MM.Color(“Down”)); #==========================================================# My logic is to make the 1st upward line turn to (stay in) green even with the flat line until it hits the 1st downward trend even with the flat line until it hits the 1st upward line. However, I’ve tried to modify my code but fail to make my logic work. Could you help me to fix this LINE color problem? Thanks in advance!
Marked as spam
|
Please log in to post questions.