I have created an indicator that paints candles (based on The STRAT by Rob Smith). I like the colors I chose but I would prefer the user to be able to pick them. Any suggestions?
@Pelonsax Perhaps try using global colors? So something like this -
Code:
#coded in forum, likely has errors
DefineGlobalColor("Up", color.green);
DefineGlobalColor("Down", color.red);
plot sma = average(close,20);
sma.assignvaluecolor(if close > sma then GlobalColor("Up") else GlobalColor("Down"));
@Pelonsax Not to sound like a moocher, but do you plan on sharing the study? I started to work on a study/strategy for Robert Smith’s “The Strat” and noticed your posts on here looked similar to what I was looking for. I’d love to help as well.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.